Rob Young | digital

This Week: 5

This week I started thinking about the next post in First steps with Embedded Rust. I have two posts I want to do, I'm not sure sure which I should do first.

Something about embedded debugging

Debugging plays a slightly different role in the embedded world. The debug probe can be used to flash a program onto the device and stream arbitrary data to and from the device as well as the more familiar step-through debugging. It can also be more difficult to set up, often requiring a separate device.

I do not want to do a post that explains what debugging means to embedded. There are enough good sources for that. And I do not want to do a post that gets a debugging environment set up for a development board, the new micro:bit discovery book does a great job of that.

I do think there is a gap in showing how to get set up debugging with a few different boards. I'm unsure whether a single general post or multiple specific posts would be more useful.

Something exploring the Embedded Rust ecosystem

There are already great resources describing the different parts of the ecosystem. While the PACs are obviously very similar there is often quite a bit of variety between HALs and even more so between different BSPs. I'd like to do a post that builds a small very general program for multiple boards to see how the BSPs and HALs differ. I think it would be really interesting to follow them down to the PAC level and see how a similar low level API can result in quite different higher level APIs.

The program I've thought of doing is called tick-tick-boom. An on board LED is flashed at a regular interval (the tick). After a random number of intervals as many LEDs as are available are flashed at random (the boom) until a button is pressed to go back to ticking. I think this would be interesting because it would require accessing a few common peripherals; the GPIO (both for output and input), an RNG and a Timer. It also offers the opportunity to look at pulling out core logic defined against common traits from embedded-hal and rand_core.

I think this is the post I have clearest in my mind but it feels long and potentially rambling. I am a bit worried I'd struggle to pull it off as well as I'd like to.