Clone the pico-sdk repository alongside the project directory
git clone https://github.com/raspberrypi/pico-sdk.git --branch master
cd pico-sdk
git submodule update --init
cd ..For building the projects you'll need CMake and ARM GNU Toolchain
sudo pacman -S arm-none-eabi-gcc arm-none-eabi-newlib cmake
This project has been tested only for the Raspberry Pi Pico 2W. For other boards modify the DPICO_BOARD option.
You need to set the PICO_SDK_PATH environment variable.
mkdir build
cd build
export PICO_SDK_PATH=../../pico-sdk
cmake -DPICO_BOARD=pico2_w ..
makePass DCMAKE_EXPORT_COMPILE_COMMANDS=ON to CMake and link compile_commands.json to project root.
mkdir build
cd build
export PICO_SDK_PATH=../../pico-sdk
cmake -DPICO_BOARD=pico2_w -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
cd ..
ln -sf build/compile_commands.json compile_commands.jsonClone the OpenOCD repository
git clone https://github.com/raspberrypi/openocd.git
cd openocd
./bootstrap
./configure
make
sudo make install