TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Learning Rust for Embedded Systems

84 pointsby tekkertjeover 3 years ago

4 comments

kennywinkerover 3 years ago
I’m currently working on a product using rust on stm32 hardware. I’m very thankful to be using rust instead of c&#x2F;c++ for a variety of reasons. That said, so far the big pain points so far have been:<p>Each HAL implements different things, or the same thing in different ways. I’m in the middle of switching from the stm32f1 i started on to the more capable stm32f4 and it’s been a painful switch. I assume this would also suck in other languages, but it seems fixable in rust. There’s also widely varied support for other MCUs<p>Lack of emulation. You can emulate an arm cpu in qemu, but there’s no tools for mocking out hardware - which means testing has to happen on device (or you need to fragment your application into qemu-testable pieces)<p>Shared memory &#x2F; global initialization is overly complex. If you have a resource (say a gpio pin) that you want to set up in main but use in an interrupt and nowhere else, you have to use like five layers of abstraction to “safely” do that.
评论 #29270228 未加载
评论 #29270524 未加载
评论 #29271122 未加载
评论 #29270078 未加载
评论 #29271202 未加载
mcraealex16over 3 years ago
Type state programming with embedded Rust has stopped me from a number of bugs so far. The important thing for me is that these bugs were caught at compile time which makes a world of difference in terms of productivity. The biggest pain point is how different the libraries for different microcontrollers are. I feel over time they will converge as things stabilize, time will tell.
nynxover 3 years ago
We&#x27;re using rust on STM32F1 chips as part of the electronics for a liquid rocket engine that my university&#x27;s SEDS chapter is developing. Rust makes this all so much easier and quicker to write.
sdbranamover 3 years ago
Thanks for submitting my post, and I hope everyone finds it useful!
评论 #29294037 未加载