Re: Raspberry Pi Pico C/C++ development on FreeBSD?

From: Tamas Szakaly <sghctoma_at_gmail.com>
Date: Tue, 05 Mar 2024 16:35:41 UTC
On Tue, Mar 05, 2024 at 03:58:00PM +0000, Arthur Chance wrote:
> Is anyone using FreeBSD as the C/C++development environment for Pi Picos
> (the small microcontrollers, not the boards that can run Linux or
> FreeBSD)? If so, can you tell me how to set things up?
> 
> -- 
> ChatGPT, translate the INTERCAL manual into the medium of interpretive
> dance.
>

Hi,

It's pretty straightforward. You need the devel/gcc-arm-embedded package, and
need to set the PICO_TOOLCHAIN_PATH environment variable to
/usr/local/gcc-arm-embedded.

After this, you just need to follow what's in the pico_setup.sh file; basically
clone pico-{sdk,examples,extras,playground} and set the corresponding
environment variables (PICO_$REPO_PATH) to where you cloned them.

You can also clone the picotool repo, which builds without a problem, and
Raspberry's OpenOCD, which needs some tweaking after the bootstrap step:

$ sed -i.bak -e '/PKG_CONFIG/{/1\.0/!s/libusb/&-0.1/;}' configure
$ ./configure --disable-werror CFLAGS='-I/usr/local/include' LDFLAGS='-L/usr/local/lib'
$ gmake

You'll also need the devel/gmake package for this.

Hope this helps.

Cheers,
Toma

-- 
Tamas Szakaly
@sghctoma