I am trying to figure out a way of how I can run 2 different cores in my ARM R series processors for different applications, is there any example which has been performed by anyone for this series ?
Typically, running things on different cores is handled by the operating system, which will move threads to different cores as it sees fit, so the way to access this in Rust is to start multiple threads using std::thread
. Different applications can normally access this by default, since each runs in its own thread (this means using std::process
can also work, depending on your use case).
If you are attempting to write an operating system and want to know how to implement this, then it is highly processor specific and not particularly Rust-specific. It usually needs to be done in assembly language because most programming languages don't expose such functionality (although you can take a look at core::arch
to see if it is exposed there). I'm afraid I don't know much about ARM architectures, you may have better luck in an OS development forum if that is the sort of thing you want.
The ARM R series is a tiny micro-controller. I suspect our OP is writing Rust to run on the bare metal, no operating system. As such I assume the std library is not available and no such threads.
There may be a Hardware Abstraction Layer (HAL) crate for these MCU's somwhere that enables use of two cores.
Is this a Raspberry Silicon RP2040 chip? If so this might help:
Ah, then in that case you would want to use one of the embedded crates as linked above (which does include multicore support), assuming that's the right crate (or there is a similar crate for the board in question). Sorry for the confusion.
It's a renesas board called RZ/T2M
Makes sense , maybe assembly is the right choice for now to activate the cores
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.