Are costly debuggers from vendors necessary?

This page summarizes the projects mentioned and recommended in the original post on /r/embedded

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • defmt

    Efficient, deferred formatting for logging on embedded systems

  • yYeah. For example, instead of printf("Variable X = %d, y=%f", x, y), where the micro then formats the string and pushes it out a serial port, blocking until its sent, I can write LOG("Variable X = %d, Y=%f, x, y), and what actually happens is a unique pointer to the string, and a tagged raw int and float get pushed onto a buffer, which takes about 15 instructions and takes up 16 bytes in the buffer. The buffer is then asynchronously sent out over the serial port, and the PC knows how to map the string ID to the actual string (this can by dynamically fetched from the micro or stored like debug info if there's not enough flash for the strings), and applies the formatting. There's an added bonus that it's super easy to take any variable which is logged and plot it live over time. There's also stuff like if the system crashes and the watchdog resets it, the buffer can be read out from memory to catch anything which wasn't sent out yet. It's a bit more of a complex system to set up but it really makes printf feel like the stone age when you get to using it. For an example of a similar system in rust, https://github.com/knurling-rs/defmt is implementing the same ideas (I don't know of any publicly available equivalent in C or C++, but you can implement it the same, though C++ is easier and it helps to know your way around a linker script to make something properly ergonomic).

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts