Easy to use Raspberry Pi Pico command line build sequence replacement. There is both C and shell script files for whatever tickles your fancy. There is also a version that works with FreeRTOS in raspberry_pi_pico_lora_template.
Instead of running the five commands used for building a Raspberry Pi Pico project:
rm -r build
mkdir build
cmake -D PICO_SDK_PATH=/Absolute/Path/To/pico-sdk -B ./build #cmake from project folder into build folder
make -C build # -C changes folder to build before running make
Replace that with shell script, or C code running shell commands, including export PICO_SDK_PATH=/Path/To/pico-sdk
.
The file structure shown here is the layout for the Raspberry Pi Github Examples with this file included.
- pico_projects
- rp2040Make.c
- rp2040Make.sh
- CMakeLists.txt
- main.c
For this to work on your machine, add the path to your pico_sdk folder in the cmake
command.
cmake -D PICO_SDK_PATH=/Absolute-Path-To/pico-sdk -B ./build
Then the rp2040Make.sh
file will need its execute permissions changes. For this run:
chmod +x rp2040Make.sh
Now this file can be run using ./rp2040Make.sh
.
For the C code, after you add your path, just compile the code and run the output.
gcc rp2040Make.c
./a.out
After running these command line prompts you should see a build folder appear, the output from CMake, and the build folder become populated.