Relevant scripts are provided, similar to my other templates. This template works on the basis of using pico-sdk as well as picotool to handle hardware abstraction and uploading.
This repo requires the use and full set up of pico-sdk (last known working ver 1.5.0) and picotool. I personally develop using a Raspberry Pi as a "build server" as well as a debugger. I suggest the same approach, as you will have enough of a headache figuring things out.
You will need these just for starters, and they are pretty heavy so install might take a while:
sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib build-essential pkg-config libusb-1.0-0-devpico-sdk
- navigate to
/usr/lib- this will be where we clone the sdk to git clone https://github.com/raspberrypi/pico-sdk.gitsudo nano /etc/profileand scroll all the way down- add
export PICO_SDK_PATH=/usr/lib/pico-sdkthen save and quit source /etc/profileor reboot, your choice.
picotool
- navigate to
/usr/bin- this will be where we clone picotool to git clone https://github.com/raspberrypi/picotool.gitcd picotoolmkdir build && cd buildcmake ..make- You may have to
make installtoo. I can't remember. sudo cp udev/99-picotool.rules /etc/udev/rules.d/- This is so you can just run picotool without having to use sudo all the time
You are primarily going to be working out of the scripts/ directory, and all of the scripts need your working directory to be scripts/ to do what they do correctly. The work flow is as follows:
- run
./get_dependencies.sh - Code your stuff
- run
./format.sh - Commit your stuff
- run
./compile.sh -u-uis a flag that tells the build process to upload after a compilation-cis another useful flag that will UNSAFELY deletebuild/which can be used to get out of any ninja or cmake jam.-bcan be used like-b Releaseto target release build optimizations, as the build process is defaulted toDebug