kbeckmann / PicoCart64

N64 development cart using a Raspberry Pi RP2040
BSD 2-Clause "Simplified" License
775 stars 44 forks source link

Integrate FreeRTOS #15

Closed kbeckmann closed 2 years ago

kbeckmann commented 2 years ago

We need an RTOS to run CIC emulation and EEPROM + FlashRAM emulation on the same core.

Investigate if there is a FreeRTOS port for RP2040 out there already, otherwise port it.

gcochard commented 2 years ago

There's a ChibiOS port for the rp2040 which could be viable: https://forums.raspberrypi.com/viewtopic.php?t=308510

kbeckmann commented 2 years ago

Thanks! I haven't looked closer at ChibiOS. How does it compare to FreeRTOS feature wise? I think we mostly only need some sort of scheduler that runs on one of the cores that lets us run multiple tasks in parallel with preemption. We probably don't need "proper" multicore support, since the core that handles the N64 PI interface has absurdly high latency requirements, so it will be fully busy with that.

kbeckmann commented 2 years ago

Just noticed that the pico_w examples include a FreeRTOS integration too: https://github.com/raspberrypi/pico-examples/blob/master/pico_w/freertos/CMakeLists.txt

kbeckmann commented 2 years ago

Integrated FreeRTOS now.