[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.
User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: [NOTES] Multi Core support

Postby Giovanni » Sat Jan 30, 2021 7:04 pm

I could make a stub CMSIS header with just the minimal definitions, drivers could use existing headers but I would prefer CMSIS-style headers or define register structures in the driver itself.

Tomorrow I will give a try to your suggestion about using a pico as debugger.

Giovanni

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

Re: [NOTES] Multi Core support

Postby steved » Sat Jan 30, 2021 10:10 pm

Giovanni wrote:I could make a stub CMSIS header with just the minimal definitions, drivers could use existing headers but I would prefer CMSIS-style headers or define register structures in the driver itself.

Superficially it appears that the header files are already split to make what you want to do quite straightforward.

I've set up a development environment on a Raspberry Pi, including using their bitbanged SWD driver running on the Pi itself, and that works. Picoprobe presumably uses the same basic driver, so there's hope!

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

[DEV] RP2040 Support

Postby Giovanni » Thu Mar 11, 2021 10:26 am

Hi,

About RPI Micro, I have not forgot, I got picoprobe and openocd working but I broke my other board, something went wrong when I soldered the headers or with wiring (my sight is no more that good...).

I am waiting for more boards but the thing is progressing, I still find it very interesting.

Giovanni

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

Re: [NOTES] Multi Core support

Postby steved » Thu Mar 11, 2021 12:02 pm

Giovanni wrote:Hi,

About RPI Micro, I have not forgot, I got picoprobe and openocd working but I broke my other board, something went wrong when I soldered the headers or with wiring (my sight is no more that good...).

I am waiting for more boards but the thing is progressing, I still find it very interesting.

Giovanni

Pleased to hear that - I wondered!
If you have a long wait for boards, I have some spares, and would be happy to send you one or two. (I'd even solder on the headers if that helped!)

I looked into mainstream OpenOCD support, and Graham Sanderson (who is one of the RPi developers) submitted a patch RP2040 support just over 2 years ago (22nd February 2019!) Not read all the threads, but looks as if they thought he'd done it wrong! They do support other RPi processors, don't know what the difference is.

I'm keeping a bit of an eye on the relevant Pi forum and issues tracker, so happy to highlight relevant-looking posts if that would help.

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

Re: [NOTES] Multi Core support

Postby Giovanni » Thu Mar 11, 2021 1:34 pm

Thanks, boards are readily available now so there is no need.

It would be great if they merged RP2040 support in main OpenOCD anyway, are they stuck with that?

Giovanni

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

Re: [NOTES] Multi Core support

Postby steved » Thu Mar 11, 2021 2:45 pm

Giovanni wrote:Thanks, boards are readily available now so there is no need.

Better than over here - 6-8 weeks from my normal suppliers! And here's where they started.

Giovanni wrote:It would be great if they merged RP2040 support in main OpenOCD anyway, are they stuck with that?

I'm sure the Pi people will do whatever's needed to get it merged in due course; just not the highest priority when they had a working fork available. (They appear to be very responsive to feedback, as long as you don't criticise their choices of cMake and Microsoft's Visual Studio too much!). I'll ask the question next time I'm logged on there.

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

Re: [NOTES] Multi Core support

Postby Giovanni » Sat Mar 20, 2021 12:07 pm

I committed startup support, it gets to the main() function (loading in RAM, will look into the flash boot later), the hardest part is over :)

Giovanni

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

Re: [NOTES] Multi Core support

Postby Giovanni » Sat Mar 20, 2021 6:11 pm

RTOS and HAL both compile in the demo, HAL is just a stub so far. I need to verify if it is possible to wrap the Pico SDK code in the HAL.

Giovanni

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

Re: [NOTES] Multi Core support

Postby steved » Sun Mar 21, 2021 10:02 am

Giovanni wrote:RTOS and HAL both compile in the demo, HAL is just a stub so far. I need to verify if it is possible to wrap the Pico SDK code in the HAL.

Giovanni

Good going. Will have a try when I find some time. Are you using one Pico as a debugger?

One trivial thing I noted in the scatter file; the Pico has 2M of flash. Howevever others (such as Adafruit, Pimoroni) have produced boards with up to 16M of flash (discussions here: https://www.raspberrypi.org/forums/viewforum.php?f=147)

Thought I'd highlight https://github.com/raspberrypi/pico-feedback/issues/50 in case you hadn't found it - those porting other OS to the RP2040. Looks as if you could possibly just create an include file which includes a load of other header files.

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

Re: [DEV] RP2040 Support

Postby Giovanni » Sun Mar 21, 2021 11:38 am

Yes, picoprobe FW on one board to debug the other.

https://www.melopero.com/ has some stock for those of you that are interested.

Giovanni


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 20 guests