5

I recently bought a Raspberry Pi Pico to play with, and am attempting to upload my first program to it the Arduino way, as my own operating system rather than a c++ program over an existing operating system (meaning to replace the built-in Raspberry Pi Pico operating system which runs MicroPython, not in the sense of running Linux, Windows, Mac, or any derivative or fork). I have not found any record of people hacking it like that - is it possible? If so, how would I go about it? Sorry if this is in the wrong Stack Exchange.

6
  • operating system? on a pico? maybe an RTOS, but i doubt an OS.
    – dandavis
    Mar 10 at 0:50
  • @dandavis What I mean is that an Arduino program is an operating system, albeit extremely minimal and simplistic. Will edit for clarity.
    – nerdguy
    Mar 10 at 0:54
  • Technically an OS is just a program which has a lot of functionality including advanced memory management. I have edited for clarity.
    – nerdguy
    Mar 10 at 0:56
  • @nerdguy, don't have a good answer for you, but maybe phrasing that would help. What you're looking for is "Arduino Core for the Raspberry Pi Pico." in the sense that the UNO uses the Arduino Core for the AVR. I see one thing on github, but it's an initial commit, and probably with no substance.
    – timemage
    Mar 10 at 1:05
  • @timemage I wasn't entirely certain how to phrase it - thank you!
    – nerdguy
    Mar 10 at 1:06
3

Official support.

Apparently there's official support for it, now anyway.

I was digging around in the Arduino-mbed core, trying to help someone else, specifically in the boards.txt and spied the line:

pico.name=Raspberry Pi Pico

Unfortunately, I don't have any way to give it a proper test as I don't have one of these. But I did go so far as to install the core and compile a simple hello world program.

In boards manager

Search for "mbed rp2040"; these names sometimes change, but those terms work well now. You can see in the lower item, I have version 2.0.0 installed.

Boards manager dialog shown with search terms "mbed rp2020"

Board menu selection

Tools/Board/Arduino Mbed OS RP2040/Raspberry Pi Pico

Shows Menu with board selected.

Seems to work.

As you see it at least builds without error. As I said, I'm unable to give it a real test. But that at least looks promising.

Shows successful build.

2

Here is the library for the Arduino IDE and a Raspberry Pi pico.

https://github.com/lrusak/Arduino-Core-Pico

Just install normally as a .zip.

3
  • Thank you! Sorry your original post didn't work out
    – nerdguy
    Mar 10 at 1:05
  • Yeah, this does look to be more along the lines of what's being asked for. I dug around that repo a bit and I'm a little skeptical that it actually works though. Seems to be very early work in progress.
    – timemage
    Mar 10 at 1:08
  • This doesn't seem to be a complete Arduino Core, may files and definition are missing.
    – hcheung
    Oct 13 at 13:17
2

It is worth mentioning this excellent alternative to the Arduino one from Earle F. Philhower. It seems well-maintained and doesn't depend on Mbed OS, so it leaves more space (ram and flash) for your application.

Here an informal comparative list.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.