Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8037

SDK • Re: Some notes on installing and using Pico SDK 2.1.1 on MSYS2

$
0
0
Google search has already picked this page up, so folks will find it if they go looking for "Pico SDK on MSYS2". :D

Tried ninja on a test program, worked fine I think. Then the -G option can be left out. For ninja:

Code:

mkdir build && cd buildcmake .. -DPICO_BOARD=pico -DPICO_PLATFORM=rp2040ninja
MSYS2 ninja turned out to be faster than make. On a quad core, ninja does multi-threading automatically:

Code:

$ time make -j4...real    0m27.562suser    0m1.887ssys     0m4.050s$ time ninja...real    0m10.002suser    0m0.000ssys     0m0.000s
The only significant stumbling block was doing "make install" for picotool and pioasm. "make install" did not work because CMAKE_INSTALL_PREFIX pointed to a Windows directory. Searched cmake online docs to change CMAKE_INSTALL_PREFIX. It turns out cmake can do the "make install" thing by itself and so the following worked:

Code:

cmake --install . --prefix /usr/local
Reference links for CMAKE_INSTALL_PREFIX and the related GNUInstallDirs:

https://cmake.org/cmake/help/latest/var ... REFIX.html
https://cmake.org/cmake/help/latest/mod ... nstallDirs

Statistics: Posted by katak255 — Wed Mar 05, 2025 2:47 pm



Viewing all articles
Browse latest Browse all 8037

Trending Articles