Rust bare metal on ARM microcontroller
antoinealb.net
antoinealb.net
$ cargo build --target thumbv7em-none-eabi
instead of $ rustc -C opt-level=2 -Z no-landing-pads --target thumbv7em-none-eabi -g --emit obj -L libcore-thumbv7m -o runtime.o runtime.rs
or other shenanigans. You can run that Cargo command right now, but you still need to do a little bit of work first.Safety at the Rust level is very valuable in embedded work. Debugging small embedded machines is not fun.
If anybody has experience with writing C macros to rust bindings I would be interested in hearing about it.
Maybe they'll be interested in funding rust development? it might give them some competitive advantage, some amount of control of a possible future platform, i.e. rust.
Can you please expand on that, especially assuming(a big assumption) that the c code you're interfacing is high quality , with rare bugs ?
Personally I think the best way is to wrap existing C code into higher level, safer Rust APIs.
While wrapping C libraries in safer Rust APIs is useful for many application, having something as fundamental as time-sharing, task interruption, etc would be much better if written in Rust and care is taken to define simple semantics for the system (e.g. like the recent HN post regarding state-machine based asynchronous IO in Rust).
You should try ST's discovery/nucleo boards. Much cheaper and ChibiOS (www.chibios.org) has some nice API and examples to get started.