Air Collective Forum

Low-error approaches to building controllers quickly

We need to get a conversation going about controllers and QA, since this is going to be a big time-consuming factor for most projects. The sooner we start on this, the sooner every hardware project out there has workable solutions.

I asked Paul Florence from France, who has experience with bare-metals stm32 microcontrollers, using both C and Rust:

I hear Rust is good choice for this type of scenario, since we have limited time but also need to reduce error as much as possible. What are your thoughts on that?

His response:

I would say it is a good idea, as long as you pick a microcontroller that is well supported. I have much experience using the stm32f103 series, which have good support by the community. Moreover they are quite cheap, you can find dev board (the famous blue pill) for a few bucks on ebay.

I have used those [0] for a robotic competition, we were using the microcontrollers to control a robot (two motors + two encoders), a servomotor bus and I/O Logic.

I was thinking about this, and even if Rust seems a sensible approach at first I would be careful because there is no possibility of formal verification whatsoever. Even the compiler is not verified. For what we know, there could be a bug in the compiler that could produce invalid code breaking Rust guarantees (there has been quite a few case, see this reddit thread)

Since I don’t have any experience working on medical products I can’t say if it is a big deal or not. And even if the absence of formal verification is an issue, does formal verification fits in your time frame ?

1 Like

That’s a useful insight, thanks! The timeframe will be different for different projects so the best we can do right now is flag up different issues and approaches, and work out the pros/cons and which are most appropriate for different contexts.