Ever wanted to know how the magic spell you always used to program that mystery ELF file onto your embedded target works? I did so in February 2019. This is the story of probe-rs, your magic spellbook to talk to embedded targets.
Close to a decade now, I have been working with embedded systems. While complaining about subpar tooling was always an option, stepping up and make better tooling somehow seemed impossible. One year ago, having no prior knowledge of this matter, I started to look into how debug probes work, how the debug interface of ARM cores works and how prior tooling, such as OpenOCD, pyOCD and Segger, approaches this.
One year later, we have a working library to interact with ARM and RISC-V targets, as well as a cargo plugin to program the target of your choice. Of course we are not done yet. There is a plethora of embedded targets, bugs arise everyday and there is way more awesome functionality and tooling, such as ITM, ETM and custom target hooks (e.g. chip unlock), w
I intend to first go over some of the prior tooling and why there is a need for a new tool. Then I would like to tell some more about how this process of embedded debugging actually works (what is a debug probe and why is it required, how can it access the chip, etc) and what problems come with it. Then I might go over some implementation details, such as how we obtain the flashing algorithms etc. Finally, I would like to talk about what works currently and what is planned for the future. Of course this part comes with some examples (usage of the library, usage of cargo flash/embed).
I intend to hold a more macroscopic talk, such that users get to know the idea behind embedded debugging and why it's complicated sometimes. I do not intend to show code samples about some intricate implementation details.
And last but not least, of course, I would like to motivate people to contribute to and use probe-rs.
Since ~ 66% of probe-rs project commits are authored by me and the other ~33% are most likely reviewed by me, it is quite possible I know probe-rs very well ;) I think the probe-rs project is VERY important for the embedded community (not limited to Rust!). I started the project because I felt the need for this tool, not because I had particular interest in this topic to begin with. It grew on me and learned so much about embedded development, which is why I spend the major share of my spare-time on the project.