This article takes a look at a few different aspects of C structure initialization. In particular, we’ll look at when it matters, the current state of things in Clang and GCC, recommendations, and the ✨ future ✨. Time to dive into this very niche, but occasionally hazardous corner of the C language!
Here are the articles, videos, and tools that we’ve been excited about this January. We hope you enjoy these links, and we look forward to hearing what you’ve been reading in the comments or on the Interrupt Slack.
As much as I enjoy writing firmware, I am, at heart, a hardware engineer. I love hunting for minutia in chip datasheets. I love fiddling with eval boards, tacking on wires, and reworking nets together. I love flipping through The Art of Electronics, finding a new circuit, and piecing through its operation. This is why, when invited to write for Interrupt, I jumped at the chance to write about a hardware-related topic that’s near and dear to my heart: debug tools.
If you develop software for an embedded system, you need some kind of system feedback. Debuggers are awesome tools, but when it comes to analyzing dynamic behavior in the field, they cannot be used. For remote debugging, many engineers turn to printf, which can usually be quickly put in place after having a putchar() implemented. This turns out to be an expensive way, in terms of processor clocks and required FLASH memory for the strings.
🎉 Happy 2022 everyone! 🎉 Here are the articles, videos, and tools that we’ve been excited about this December. We hope you enjoy these links, and we look forward to hearing what you’ve been reading in the comments or on the Interrupt Slack.
Here are the articles, videos, and tools that we’ve been excited about this November. We hope you enjoy these links, and we look forward to hearing what you’ve been reading in the comments or on the Interrupt Slack.
Imagine there’s an embedded system that needs to persist some state when the processor restarts (either intentionally or due to a catastrophic error). This could be some external hardware information (what’s the position of a motor or actuator?) or a method to communicate the reset to the user (display some information on the device’s display). A simple way to store information through a reboot is to use what’s called“non-initialized” memory.