Twitter | Search | |
html2svd | svd2rust
A sneak peek at my Rust experiments in single source, no-std asymmetric multiprocessing! The clip shows the source of a dual core application from which I build two binaries using a Cargo subcommand Then I load each binary on a different Cortex-R5 core and run them 1/
Reply Retweet Like More
html2svd | svd2rust Dec 7
Replying to @japaricious
In the application the two cores increase the value of a shared variable in turns. Access is synchronized using a semaphore which also resides in shared memory. Here the target cores are R5s but the approach can be applied to heterogeneous devices e.g. M4F + M0+. 2/
Reply Retweet Like
html2svd | svd2rust Dec 7
Replying to @japaricious
Trickiest bit: ensuring that all binaries have the same layout for shared memory. e.g. `SHARED` must have the same address on all binaries regardless of optimizations. Solution: `cargo-amp`! It does a custom build process and then checks that all binaries look correct. 3/3
Reply Retweet Like
MⒶrtin HⒶboⓋštiak [🔑 ~6y before deadline] Dec 7
Replying to @japaricious
Very nice! How is the memory synchronized on physical level? Are there two controllers connected to the same memory or is it a dual-core controller?
Reply Retweet Like
html2svd | svd2rust Dec 7
Replying to @kixunil
There's no external memory chip if that's what you are asking. The R5 cores and the shared RAM are all in the same chip / package. Each core has its own chunk of RAM and they can access the shared RAM through a multiplexed bus.
Reply Retweet Like
Valeriy Reutskiy Dec 8
Replying to @japaricious
Awesome! What mcu/devboard do you use?
Reply Retweet Like
MⒶrtin HⒶboⓋštiak [🔑 ~6y before deadline] Dec 9
Replying to @japaricious
Thanks for explaining!
Reply Retweet Like
Jared Boone Dec 19
Replying to @japaricious
Yes, please! My primary application for RTFM is the NXP LPC4320 for software-defined radio. My existing, terrible C++ code uses M0 for user interface, M4F for signal processing. I *so* want to move to Rust...
Reply Retweet Like