Porting (RP2040) kernel to Arduino IDE

Hello everyone, first of all I would like to thank you all since the forum helped me a lot during my incredible amount of mistakes.

I used for a while FreeRTOS in the past on an Arduino board with a SAMD21, and the building process was as simple as downloading a library since the kernel was already ported for the Arduino IDE.

Still I would like to make a project with the Rasberry Pico (RP2040) and FreeRTOS would help me a lot in the development process.
I’ve seen that the kernel is available on the official Github and that it is compatible with the Pico SDK, so I was wondering where should I begin (maybe you can give me some words of advice) in order to create a porting of the FreeRTOS kernel for the RP2040 as an Arduino library.

Best regards.

This can be a good starting point - SMP Demos for the Raspberry Pi Pico Board - FreeRTOS

Hello, this might actually be a good idea, which I hadn’t thought about when I took the official FreeRTOS RP2040 port and added support for it to the Arduino core for the RP2040 chip made available by Earle F. Philhower. Since that core contains some basic SMP support I had to modify the core’s startup code to not interfere with FreeRTOS.

However, since the official RP2040 Mbed core does not contain SMP support, it probably would have been a better starting point, enabling FreeRTOS support to be implemented as a library, allowing the core to be updated separately. I’ll have to check if that can be done easily.

How did your efforts to that end go in the meantime?

Hello, sorry for the late reply. I started by porting the AVR version while changing the files with the appropriate RP2040 version. Still I would say my work was far from perfect due to the lack of spare time and probably knowledge as well.

Anyway I saw the discussion on the Philhower version of the core (the guy who started it is actually a friend of mine, and I saw your code as well!) so we downloaded the repo and started checking the stuff that works and trying to fix the one that does not.

I would like to thank you and also say that, even though I can’t exactly tell right now how long it’s gonna take nor how many edits to the original core should be made until most of peripherals and stuff work correctly, we’ll provide any significant result as we go.