What is the recommended build chain for PicoCalc guthub projects run from command line with cmake/make.
I installed the gcc-arm-embedded cask via brew, as well as cmake and picotool. Make is still from the Xcode SDK tools. I also cloned the pico-sdk from github. System symbols are set up.
I am still getting various errors building projects like uf2loader.
I can debug, but want to make sure my basic setup is ok.
It’ll be easier to diagnose your issue if you provide the errors you’re seeing. It’s likely not going to be a toolchain issue, with maybe one possible exception.
Got it to work with uf2loader pico1. The problem was with picotool. When it was not present, the build process was not able to generate it. Installing it via brew solved the issue. I did not want to go down that rabbit hole any further.
Since I am writing about uf2loader, what is the cmake option to build for the pico 2w (2350?)
Ok, found in in the boards folder for pico-dk: pico2_w.h
cmake completed without error.
make failed with:
% make [ 0%] Building ASM object pico-sdk/src/rp2350/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.o :2:1: error: unknown directive .syntax unified ^ /Users/Shared/repo/github/pico-sdk/src/rp2350/boot_stage2/boot2_w25q080.S:143:1: note: while in macro instantiation pico_default_asm_setup ^ :3:6: error: unknown CPU name .cpu cortex-m33 ^ /Users/Shared/repo/github/pico-sdk/src/rp2350/boot_stage2/boot2_w25q080.S:143:1: note: while in macro instantiation pico_default_asm_setup ^
If you are using VS Code on a Mac with the RPI extension, the SDK will download all of the files needed.
That being said, I am having a problem on the Mac with VS Code getting the debugprobe (in a second Pico) working. I have a DebugProbe on order but it hasn’t gotten here yet.
No matter what I do I get an error in VS Code that prompts that GDB quits without being connected to.
pico2 worked. Here is my little script for the next pull. My pico-sdk location is defined globally during my shell initialization.
#!/bin/bash
# Build both versions of the uf2 loader
if [[ ${PWD##*/} == uf2loader ]]; then
echo "Current directory ok: in uf2loader"
else
echo "Current directory needs to be uf2loader" >&2
exit 1
fi
echo "Building pico1..."
if [[ -d build ]]; then
echo "Clearing previous build"
rm -rf build
fi
cmake -DPICO_BOARD=pico -B build -S .
pushd build
make -j8
popd
echo "Building pico2..."
if [[ -d build ]]; then
echo "Clearing previous build"
rm -rf build
fi
cmake -DPICO_BOARD=pico2 -B build -S .
cd Build
make -j8
cd ..
echo "Done"
Thanks, everyone, for the help. I confirmed that the result is working.