rtic-rs / rtic

Real-Time Interrupt-driven Concurrency (RTIC) framework for ARM Cortex-M microcontrollers

Home Page:https://rtic.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation of Multicore Support in RTIC

explocion opened this issue · comments

Hi. I'm wondering if there is any examples or documentations on using RTIC in a multicore scenario. It seems that multicore support has already been merged in #204, but that was still for RTFM. The RTIC book explicitly says it only supports single core, and therefore a bit confusing to me.

Hi!

RTFM and RTIC v0.5 still has experimental multi-core support, more or less untouched since.

As part of going to v0.6, which became v1 of RTIC, this experimental support was dropped in order to overhaul and tidy up the codebase.

So the explicit note about RTIC not supporting multi-core is correct.

Running two separate RTIC systems, one per core can be an alternative depending on your use case.

For some more information on the multi-core support in the older versions:

http://ltu.diva-portal.org/smash/record.jsf?pid=diva2:1391552

https://blog.japaric.io/multicore-rtfm/

With more microcontrollers adding more cores this is something really interesting for the future, and if this interests you we welcome any efforts towards this goal :)

Thank you very much. Is there any references for running 2 RTIC application on different cores?

I have not attempted this, but something that I think @perlindgren were looking into?

Without nerdsniping myself into this I figure I would attempt something as follows:

Build two non-overlapping RTIC applications, using memory.x

Then using https://docs.rs/rp2040-hal/latest/rp2040_hal/multicore/index.html for "launching" the second core somehow by jumping directly to regular RTIC entry point on the second RTIC

If you get this going it would be really nice to hear about it 🎉

I intend to close this issue as done (regarding documentation), but don't hesitate opening a new one, or reaching out in the chat if there's something else!