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.

nerdguy
  • 63
  • 6
  • operating system? on a pico? maybe an RTOS, but i doubt an OS. – dandavis Mar 10 '21 at 00: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 '21 at 00: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 '21 at 00: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 '21 at 01:05
  • @timemage I wasn't entirely certain how to phrase it - thank you! – nerdguy Mar 10 '21 at 01:06
  • I recently saw an announcement that Arduino is going to officially include the Raspberry Pico as target board in their Arduino IDE. But I have not found a repo proofing that. – PMF Mar 10 '21 at 10:00

3 Answers3

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.

timemage
  • 5,181
  • 1
  • 13
  • 25
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.

brad
  • 201
  • 1
  • 11
  • Thank you! Sorry your original post didn't work out – nerdguy Mar 10 '21 at 01: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 '21 at 01:08
  • This doesn't seem to be a complete Arduino Core, may files and definition are missing. – hcheung Oct 13 '21 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.

fabianoriccardi
  • 346
  • 1
  • 5
  • 2
    This 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 https://arduino.stackexchange.com/questions/84372/ – user85471 Jul 05 '21 at 00:15