5 ms·
I think the main blocking part there is getting LLVM working on AVR. I believe there is a fork of LLVM that does (https://github.com/sushihangover/llvm-avr http
by lambda 12y ago
I think the main blocking part there is getting LLVM working on AVR. I believe there is a fork of LLVM that does (https://github.com/sushihangover/llvm-avr https://github.com/sushihangover/llvm-avr), but you would have to merge that fork with the LLVM that Rust uses in order to run Rust on it, and it looks like the fork is a little out of date so it may take some work.
This particular likely doesn't affect running Rust on an Arduino at all, as what it is doing is removing the runtime for std, which contains many of the OS abstractions. You don't have an OS on an Arduino however, so std isn't particularly helpful there. Several months ago they already did what was necessary for that, factoring out much of the completely OS independent functionality into a "core" library (http://doc.rust-lang.org/core/ http://doc.rust-lang.org/core/), so you can opt out of using std and use "core" instead, plus add a little bit of platform specific glue, to run Rust on bare metal.
- MrBuddyCasino 12y agoToo bad, I was hoping for easier embedded usage as well. I don't particularly like the Arduino abstractions, too much is hidden, and to get decent performance or ADC precision often requires dropping to low-level C or even assembler. But the last commit to that fork was just 10 months ago though... might be tempted to have a look during the holidays.
- errordeveloper 12y agoYeah, as said above, checkout zinc.rs. It runs on ARM MCUs though, but AVRs are becoming legacy anyway.
- MrBuddyCasino 12y agoI love it. The day C and C++ die I'll be dancing on their grave and twerking on the tombstone. Will be hard to find an ARM equivalent for the ultra low power MSPs though.
- minthd 12y agoThe new atmel D21 arm looks interesting - 40ua/mhz , and 0.9ua standbay with ram retention and rtc.
- tormeh 12y agoAren't AVR and ARM different power envelopes, though? I thought ARM was for small computers and AVR is for things that want to be slightly more complicated than a gearbox.
- digikata 12y agoThere's a wide range of ARM processors, but you can maybe sort them into three tiers: small AVR-like scale (e.g. Cortex-M), the smartphone speed (e.g. Cortex-A8/9 what most people come into contact with), and edging it's way into the market - the server targeted ARMs. The small, deeply embedded scale usually runs bare-metal or a small RTOS, while the next tier up often runs Linux. Now the small scale ARM is basically on the fast side (32bit proc) the very low end embedded cpus class. But it's often selected for everything but the most cost or power sensitive applications which tend to go for very small, power sipping 8bit cpus (e.g. MSP430s)
- zokier 12y agoCortex-A series is for small computers (eg smartphones etc), Cortex-M is more of a contender for AVR, especially Cortex-M0 which are the smallest ARM cores. There is currently lot of activity around ARM and power-optimization in the industry, while AVRs are generally bit older design. Just for fun, I picked a semi-random example of ARM mcu from digikey: EFM32ZG110F32[1]. Based on the datasheet it consumes about 8mW when running on full 24MHz speed. Meanwhile the AVR chip used in eg. Arduino Uno[2] consumes about 10mW when running at 8MHz. Of course at these ultra-low power levels there are quite a large amount of variability depending exactly what you are doing and how well your code is made. [1] http://www.digikey.com/product-detail/en/EFM32ZG110F32-QFN24/336-2578-2-ND/4457701 http://www.digikey.com/product-detail/en/EFM32ZG110F32-QFN24... [2] Atmega 328p http://www.atmel.com/devices/atmega328p.aspx http://www.atmel.com/devices/atmega328p.aspx
- deleted 12y ago[deleted]
- minthd 12y agoWith rust-bindgen , you should be able to use vendor supplied HAL written in c quite easily.