News for hackers. Stuff that matters.
Re:Programming ARM Cortex-M Microcontrollers with Rust by japaric on Sunday April 09, 2017 @12:15PM (#14072941)
Hello, HN folks. Author here.

Sadly, the repository posted by the OP is not up to date. That's not to say it's wrong but just that doesn't contain recent developments. Also, this repository documents every single part of putting together a microcontroller project from scratch. Although interesting, this is not the fastest way to "Hello World". That's why I have put together a nicely packaged Cargo template [1] [2] to quickly start a new microcontroller project. This template works for any Cortex-M microcontroller and paired with the svd2rust code generator [3] you can easily get full device support (register level API) for any microcontroller for which the vendor has released a CMSIS-SVD file [4]. There's a database of such files in this repo. [5]

For some, directly working with registers may be too low level. In that case you can look at my Discovery book [6] which showcases a higher level API and several examples for the STM32F3DISCOVERY board. The API is documented here. [7]

What's missing from all this is a good concurrency history. (All the examples in the Discovery book are single task.) So, I have been working (not alone) on a multitasking framework that's suitable for real time systems and the focus has been minimizing overhead while guaranteeing memory safety. At this point, we have pretty much reached the goal and we are currently working on the ergonomics. I hope that we'll have something show Soon (TM).

I'm happy to answer questions about Rust on microcontrollers. I may take some time answer, though, as it's weekend :-).

P.S. I hope I got the formatting right. First time posting on HN.

P.P.S. Congratulations for reading the whole thing! As a reward, here's a robot [8] built with the framework I mentioned.

[1] https://github.com/japaric/cortex-m-template

[2] It seems that the Cargo template feature got removed recently (due to not having gone through a RFC process) but you can easily rollback your Rust installation to get an older Cargo that supports templates: `rustup default nightly-2017-04-01`

[3] https://docs.rs/svd2rust/0.5.1/svd2rust/

[4] http://www.keil.com/pack/doc/CMSIS/SVD/html/index.html

[5] https://github.com/posborne/cmsis-svd/tree/master/data

[6] https://japaric.github.io/discovery/

[7] https://docs.rs/f3/0.3.1/f3/

[8] https://mobile.twitter.com/japaricious/status/84569793557265...

Re:Programming ARM Cortex-M Microcontrollers with Rust by dbcurtis on Sunday April 09, 2017 @01:53PM (#14073461)
Thanks for doing this. I'm really excited about the potential of Rust for embedded, but it still requires too much trail-blazing to be compatible with my current priorities. FWIW I've been doing realtime embedded C for years, but feel it is high time we made some progress in the embedded world with respect to memory safety and concurrency correctness. I'm also a huge fan of Micropython, but of course Micropython isn't applicable everywhere.
Re:Programming ARM Cortex-M Microcontrollers with Rust by mkesper on Sunday April 09, 2017 @03:17PM (#14073871)
The github readme page of that project should point to https://github.com/japaric/copper/blob/master/src/intro.md