4 ms·
I've been looking for such thing for a long time as I don't really like C for embedded programming. Was following https://zinc.rs/ https://zinc.rs/ for a while
by flowless 9y ago
I've been looking for such thing for a long time as I don't really like C for embedded programming. Was following https://zinc.rs/ https://zinc.rs/ for a while but then I've discovered ivory/tower framework made by Galois (http://ivorylang.org/ http://ivorylang.org/). It's basically haskell DSL and C code generator for embedded world, currently targeting stm32 family.
Compared to these early rust attempts they've written a port of ArduPilot in ivory/tower called smaccmpilot (http://smaccmpilot.org/ http://smaccmpilot.org/).
In one of the papers they even compare ivory with rust in terms of memory safety.
I'm now trying to port ODriveFirmware written in C (+CubeMX/CMSIS) to ivory and so far I'm pretty surprised how well it goes. I'm going to start documenting this process on a blog soon, if interested I've created a wiki page collecting resources about embedded programming in Haskell at https://wiki.base48.cz/EmbeddedHaskell https://wiki.base48.cz/EmbeddedHaskell
- geokon 9y agoIn a similar vein there is ATS - which already compiles to C. And you can in theory write controller code in ATS if you want those functional features and more ex: (this guy has done examples on a ton of boards!) https://github.com/fpiot https://github.com/fpiot www.metasepi.org/doc/metasepi-icfp2015-arduino-ats.pdf https://github.com/fpiot/msp430-ats https://github.com/fpiot/msp430-ats