[DEV] RP2040 support

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
Ludeks
Posts: 9
Joined: Sun Mar 13, 2016 2:52 pm
Has thanked: 3 times

[DEV] RP2040 support

Postby Ludeks » Thu Jan 21, 2021 2:47 pm

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.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: [NOTES] Multi Core support

Postby Giovanni » Thu Jan 21, 2021 2:56 pm

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

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: [NOTES] Multi Core support

Postby Giovanni » Thu Jan 21, 2021 6:18 pm

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

Ludeks
Posts: 9
Joined: Sun Mar 13, 2016 2:52 pm
Has thanked: 3 times

Re: [NOTES] Multi Core support

Postby Ludeks » Thu Jan 21, 2021 7:32 pm

I have also ordered a piece, I'm very excited. :)

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: [NOTES] Multi Core support

Postby Giovanni » Tue Jan 26, 2021 6:44 pm

I just received mine, much earlier than expected.

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

Giovanni

steved
Posts: 823
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Re: [NOTES] Multi Core support

Postby steved » Tue Jan 26, 2021 10:03 pm

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!)

Ludeks
Posts: 9
Joined: Sun Mar 13, 2016 2:52 pm
Has thanked: 3 times

[DEV] RP2040 Support

Postby Ludeks » Tue Jan 26, 2021 11:26 pm

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.

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: [NOTES] Multi Core support

Postby Giovanni » Wed Jan 27, 2021 8:55 am

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

steved
Posts: 823
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Re: [NOTES] Multi Core support

Postby steved » Wed Jan 27, 2021 2:43 pm

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.

Ludeks
Posts: 9
Joined: Sun Mar 13, 2016 2:52 pm
Has thanked: 3 times

Re: [NOTES] Multi Core support

Postby Ludeks » Wed Jan 27, 2021 3:29 pm

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


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 13 guests