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.
-
operating system? on a pico? maybe an RTOS, but i doubt an OS.– dandavisCommented Mar 10, 2021 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.– nerdguyCommented Mar 10, 2021 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.– nerdguyCommented Mar 10, 2021 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.– timemageCommented Mar 10, 2021 at 1:05
-
@timemage I wasn't entirely certain how to phrase it - thank you!– nerdguyCommented Mar 10, 2021 at 1:06
3 Answers
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.
Board menu selection
Tools
/Board
/Arduino Mbed OS RP2040
/Raspberry Pi Pico
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.
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.
-
-
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.– timemageCommented Mar 10, 2021 at 1:08
-
This doesn't seem to be a complete Arduino Core, may files and definition are missing.– hcheungCommented Oct 13, 2021 at 13:17
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.
-
2This alternative doesn't require the Pico to have a serial port (which it won't have when new), but rather can upload to a Pico in bootloader mode. See arduino.stackexchange.com/questions/84372 Commented Jul 5, 2021 at 0:15