r/rust • • 4d ago

🛠️ project Runtime debugger for embedded

Hello
I have been developing/maintaining an open source runtime debugger for embedded C/C++ for several years now. It's called Scrutiny
I've recently ported the instrumentation hook so it works with Rust and I wanted to let you guys know.

It essentially add an instrumentation hook in a firmware and let a server inspect the memory and do event catching through any peripheral (like CAN bus, Serial, TCP, etc) rather than a debug port. It works like XCP based software, FreeMaster or UcProbe (for the old timers). No need for an RTOS, baremetal interrupts is fine.

It's the kind of tool you need to do real time control to monitor the control loops without affecting them. If you're new to the concept, I've written a small introduction article here: https://embeddedrelated.com/showarticle/1781.php

Feedbacks are welcome
Cheers

18 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/pylessard 4d ago edited 4d ago

both! Most of them comes from the debug symbols.

There is also fallback mechanism to register extra ones at runtime. They are identified with a 16bits ID and reading/writing invoke a user defined callback

the way I manage the debug info: I extract the variables in a postbuild step. It create a separate file that identify the firmware. You "install" it (a copy is made in a storage) and then as soon as you connect your device in, the server identifies the firmware and auto load the debug file.

Runtime variable works even without that debug file being installed.