I have installed Raspberry pi pico sdk for cross compiling and development on this latest version of Leap 16.0
and it is quite simple.
I tested before some repos with the cross-compilers that are available on opensuse build service, I had some issues mainly the C++ version for the compiler I tested was not present. (I do not recall exactly which one).
The simple thing is to get the Toolchain directly from ARM
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
choose the arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi.tar.xz basically the latest as of this writting arm-none-eabi toolchain
I actually used version 13.2 Rel1 but for sure the latest works as well.
I installed in /opt/cross
should be like this:
> tree ./opt -L 2
./opt
└── cross
├── 13.2.Rel1-x86_64-arm-none-eabi-manifest.txt
├── arm-none-eabi
├── bin
├── include
├── lib
├── libexec
├── license.txt
└── share
Then the simple thing is to install both the Pi Pico SDK and say the examples.
just make a directory say ~/git/pipico
and them simply clone the projects on github inside your base folder
https://github.com/raspberrypi/pico-sdk
https://github.com/raspberrypi/pico-examples
https://github.com/raspberrypi/pico-extras
should be something like this your base/root directory :
~/git> tree ./pipico -L 1
./pipico
├── debugprobe
├── FreeRTOS-Kernel
├── pico-examples
├── pico-examples-eclipse
├── pico-extras
├── pico-playground
├── pico-sdk
├── setenv.sh
├── setup.sh
└── toolchain
Notice I install also from the same Pi Pico github repos FreeRTOS-Kernel and pico-playground (this last one contains interesting stuff on sensors and the like)
Notice that the debugprobe git project is also important since you can use a Pi Pico as your debugprobe, it will connect to your project hardware and becomes the programmer and also the debug interface … very very nice, no need to spend money on a dedicated debug hardware.
After this one has to set environment variables for the compiler and cmake to work
edit your ~/.bashrc file and add:
(the root of the project And of the SDK is the same ~/git/pipico)
export PICO_SDK_PATH=/home/user/git/pipico/pico-sdk
export PICO_TOOLCHAIN_PATH=/opt/cross
export PICO_EXTRAS_PATH=/home/user/git/pipico/pico-extras
now everything should be set and ready to go. Simply go to your ~/git/pipico/pico-examples/ directory and make inside a directory named build
mkdir build
go to that directory because otherwise the CMake process will clutter your base dir with all the output of the compilation and linking it would be a mess.
cd build
and then
cmake ..
after that
make
and you should have all your projects compiled inside ~/git/pipico/pico-examples/build/
each example project should have his own directory
enjoy …