Page 1 of 7

[DEV] RP2040 support

Posted: Thu Jan 21, 2021 2:47 pm
by Ludeks
Raspberry Pi Pico has been just released with Dual-core Arm Cortex M0+ processor at 133 MHz and some interesting features like inter-core FIFOs and Hardware Spinlocks.

From hobbyist perspective, I think it would be very interesting to get ChibiOS running on this device.

Re: [NOTES] Multi Core support

Posted: Thu Jan 21, 2021 2:56 pm
by Giovanni
Hi,

Interesting, I didn't know they made a MCU. Yes, it could be the right platform for a basic SMP OS. Making an HAL looks simple too.

What is needed to get started?

Giovanni

Re: [NOTES] Multi Core support

Posted: Thu Jan 21, 2021 6:18 pm
by Giovanni
I ordered a couple of those but delivery is expected next month.

After a first look I don't see problems, the MCU appears to be very simple.

Giovanni

Re: [NOTES] Multi Core support

Posted: Thu Jan 21, 2021 7:32 pm
by Ludeks
I have also ordered a piece, I'm very excited. :)

Re: [NOTES] Multi Core support

Posted: Tue Jan 26, 2021 6:44 pm
by Giovanni
I just received mine, much earlier than expected.

Now next step is: how to load code in those?

Giovanni

Re: [NOTES] Multi Core support

Posted: Tue Jan 26, 2021 10:03 pm
by steved
Just happened across this link, which might be a bit quicker than threading through all the woffle on the Pico Forum. (And the documentation - almost too much!)

[DEV] RP2040 Support

Posted: Tue Jan 26, 2021 11:26 pm
by Ludeks
Giovanni wrote:Now next step is: how to load code in those?


You should be able to connect the device as a USB Mass Storage and just drop UF2 firmware onto it.

All documentations can be found on this site: https://www.raspberrypi.org/documentati ... g-started/
- RP2040 datasheet
- Pico datasheet
- Getting Started guides with the board and SDK

This is the source of the ROM bootloader: https://github.com/raspberrypi/pico-bootrom
I think it might be helpful to understand the boot sequence.

Re: [NOTES] Multi Core support

Posted: Wed Jan 27, 2021 8:55 am
by Giovanni
Is it possible to use an stlink with this board? if not, what should I get as debugger?

Just loading the code is fine but for an OS port debug capability is needed.

Giovanni

Re: [NOTES] Multi Core support

Posted: Wed Jan 27, 2021 2:43 pm
by steved
Maybe: https://www.raspberrypi.org/forums/view ... 4&t=299705

Certainly the device supports 2-wire SWD, which IIRC is the recommended debug approach for "serious" work.

You may know the answer for the ST-Link; if that doesn't work, I'd imagine something like a Segger, but probably not the cheap clones.

Note: "kilograham" is one of the RPi engineers who did a lot of of the Pico software. It's well worth asking questions in the RPi forums; as well as the RPi engineers there are a good number of knowledgeable and capable people there. You're likely to get good answers to the sort of question you're likely to ask.

Re: [NOTES] Multi Core support

Posted: Wed Jan 27, 2021 3:29 pm
by Ludeks
Debugging with SWD should be definitely possible and even encouraged to upload the firmware.

The official docs mention plugging the SWD port from the Pico into UART on another Pico or Raspberry Pi computer.

Also, a custom OpenOCD build might be needed.

See section 5. of https://datasheets.raspberrypi.org/pico ... h-pico.pdf
https://github.com/raspberrypi/openocd