6 ms·
Rust your ARM microcontroller
- MrBuddyCasino 9y agoI had no idea Rust MCU support has come so far, the generated code is indeed very lean. This is fantastic! God I'd love to use this, but ESP8266/ESP32 is where its at right now (at least for me).
- kirillkh 9y agoI take it Rust is not supported on ESP8266 yet?
- kam 9y agoNope, LLVM doesn't have a backend for the Xtensa architecture.
- DanWaterworth 9y agoYou could potentially go via C. https://github.com/draperlaboratory/llvm-cbe https://github.com/draperlaboratory/llvm-cbe
- wyldfire 9y agoIIRC the C backend lags LLVM pretty far. Thankfully, rust tries to be compatible among a few different generations of LLVM, so maybe it's feasible.
- sesutton 9y agoLooks dead. No commits for almost 2 years.
- johncolanduoni 9y agoI suspect you'd be much better off with a Rust MIR -> C compiler. Rust's memory and execution model is much closer to C than C is to LLVM.
- adrianN 9y agoThe C backend was expelled from LLVM several years ago because it was too buggy and nobody wanted to fix it and since then has hardly been updated. That doesn't seem like a very pleasant route.
- MrBuddyCasino 9y agoSome Espressif guy is said to be working on a backend for LLVM, but I wouldn't hold my breath.
- axoltl 9y agoI'd say ESP* is 'it' for a very small set of people. The Cortex M cores are significantly more ubiquitous.
- wyldfire 9y agoI think Aparicio himself is a decent-sized part of that support. BTW, regarding ESP8266 [1] [1] http://hackaday.com/2017/01/04/rust-running-on-the-realtek-rtl8710-esp8266-alternative/ http://hackaday.com/2017/01/04/rust-running-on-the-realtek-r...
- polyfractal 9y ago++ to japaric driving embedded Rustlang development. He's built a lot of the low-level tooling, and many of the articles/tutorials are form him as well. Re: RTL8710... That was me! :) I haven't had much chance to continue hacking on the RTL8710 (we just moved, hobbies are still packed away) but I was pleasantly surprised how easy it was to get up and running. Especially considering how little I know about embedded development, I imagine someone with more knowledge would be a lot more productive.
- vvanders 9y agoIncredible. Here I was expecting another small project and instead this post delivers in spades. Awesome to see svd2rust, there's definitely a couple edge cases(global #define) that bindgen doesn't quite cleanly handle yet and that's a clean solution to it.
- jwr 9y agoVery interesting work. I'm looking forward to when I'll be able to use Rust to write production ARM code (I mostly use NXP Kinetis devices, but it seems most of the tooling is universal).
- Animats 9y agoNice. That's what Rust is really good for. This is a deluxe environment, with a debugger built in. In the next episode, they add a CPU dispatcher.
- andars 9y agoBrilliant. I worked on getting rust to run on an arm core a few years ago, and the process was honestly pretty miserable. This is so far ahead from what I had going, it is hardly comparable. Looks like a very streamlined and elegant process. Excellent work.