• Zephyr West tips and tricks

    The Zephyr west tool is a powerful workspace manager, but it is admittedly pretty feature-rich: there’s a lot of functionality buried inside that tool!

    I thought it would be interesting to share a few tips and tricks that I use with west to make my Zephyr development workflow a little smoother.

  • The Hidden Cost of Misalignment

    But pack(1) costs more than you think. It destroys the compiler’s ability to generate efficient code for every field access, including fields that are perfectly aligned.

    On RISC-V, a single 32-bit store to an aligned field in a pack(1) struct compiles to 7 instructions instead of 1!

    In this post, we show how to fix using the packed and aligned attributes, and how to avoid byte-decomposition even as the struct grows in the future.