Using FreeRTOS with the Raspberry Pi Pico Blog Series

Interested in using FreeRTOS with the Raspberry Pi Pico? Check out this 4-part blog series published on Embedded Computing Design covering various topics like environment setup, multitasking, queues, message buffers, semaphores, event-driven design, and symmetric multiprocessing (SMP).

Part 1 | Part 2 | Part 3 | Part 4

See also:


Code samples from the blog series are now available from this repo:

That link leads to a 404 error

Apologies! the repo is public now.

Thanks for fixing that. I got it and built it successfully.
While I have you on the line so to speak, how can standard debugging using gdb be done? Seems like that ought to be the topic covered right after setting up your environment.
The standard Arduino debugging style using prints is not so helpful in tougher development environments.
Chris Arena
Jeffersonville, VT, USA

Wow this is amazing. Looking forward to reading about the gdb debugging info too.

As I remember there is documentation on using GDB and OpenOCD for Raspberry PI in the document “Getting started with Raspberry Pi Pico”. in chapter 5 & 6. Their instructions involved Visual Studio Code, but likely can be adapted to any IDE that fronts GDB, and GDB itself.

Right, here’s a link to that PDF mentioned above:

Also, here is a related video that might be useful if you have 2 Pi Picos: How to Debug the Raspberry Pi Pico Using Another Pico! - Picoprobe and VSCode Tutorial - YouTube

Thanks for taking a look and building it, Chris. Much appreciated. You are right, debugging is a good topic. Perhaps I can explore that. See the other replies for some pointers on debugging with the Pico.

As noted above, you can use the Pico as a PicoProbe with OpenOCD.
I wrote about this here: Getting Started: Raspberry Pi Pico RP2040 with Eclipse and J-Link | MCU on Eclipse
Most tutorials describe how to use VSC with the Pico, but it is easy to use Eclipse with gdb too, see Getting Started: Raspberry Pi Pico RP2040 with Eclipse and J-Link | MCU on Eclipse
This gives you full hardware debugging capabilites (memory, registers, hardware breakpoints, …) including FreeRTOS awareness and RTOS thread-aware debugging.

1 Like

Note, if you use CLion, it now has FreeRTOS and SMP support out of the box (independent of gdb) which works great with the Raspberry Pi Pico/RP2040.

1 Like