Using Pico SDK with RP2040

Hello,

I’ve been working on a project using RP2040s, and I’m hoping to use the watchdog API and potentially some of the other functionality present in the Pico SDK. It appears this library is not directly supported by PlatformIO yet, but thankfully this thread describes the necessary steps to make the Pico SDK accessible to my project.

I thought I’d share just a few leads for the next person to try to figure this out because it took me a while to find these steps. I am admittedly new to PlatformIO but this had been stumping me for a while, and @wizio 's github project was exactly what I needed. Would be great to see some form of this integrated into PlatformIO at some point.

This page has the necessary instructions. Here’s a few bits from it that were pretty much all I needed to do to start calling the watchdog functions in the Pico SDK.

Install Platform

Note: be sure [git] is installed

  • PIO Home > Platforms > Advanced Installation
  • paste https ://github.com/Wiz-IO/wizio-pico
  • INSTALL

[note: remove the space after https above, I am a new user here and posts are limited to two links, max, so I had to work around that]

Baremetal - New Project

PlatformIO → Home → New

  • Enter Project Name - Board search ‘WizIO-PICO’ boards - Select Baremetal
  • Click BUILD and you will have basic project ( from template )
  • For CPP project, rename main.c to main.cpp ( if you delete main file, builder will create new main.c as template )
  • Connect Pico as Mass Storage Device
  • Open platformio.ini and edit your settings
  • BUILD / UPLOAD
  • [READ WIKI - BAREMETAL]

Once I did this, I was able to add calls to the watchdog apis and successfully build an executable.

Special thanks to @wizio for putting all the work into making Pico SDK available.

4 Likes