Skip to content

Tags

#firmware

Posts tagged #firmware on Dynamo Geeks: 2 posts from the community, most useful first.

2 posts

Posts tagged #firmware

  1. Question

    How do you unit test firmware? We test almost nothing on host

    Honest question. In my team all the testing is on the target hardware: flash, run, look at the logs and the scope. We have some integration tests on a HIL bench but zero unit tests. When I propose unit tests, the people say is impossible because the code touch registers everywhere. Is a codebase of around 60k lines of C, STM32, FreeRTOS. The drivers call the HAL directly from the application logic in many places.…

    Diego Ramírez3likes3comments

  2. Article

    volatile is not a mutex: sharing data between an ISR and your main loop

    Every few months a junior in my team come with the same bug: a counter updated in an interrupt, read in the main loop, and sometimes the value is garbage. And the first answer is always "but I put volatile". So here is the explanation I give them, maybe is useful for someone else. What volatile does volatile tells the compiler: this variable can change outside of the normal program flow, so read it from memory every…

    Diego Ramírez3likes3comments