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.
How you started? Which framework? And how do you convince the team that is worth it? I have 8 years working in embedded and I am a bit embarrassed to ask this, but better ask than keep pretending.
Accepted answer
Written by
Diego Ramírez
Firmware engineer at automotive supplier in Guadalajara. C, FreeRTOS, CAN bus, oscilloscopes. Mechanical keyboard collector (too many).
Get the best of #bare_metal weekly
One email each Monday with the most useful posts. No spam; unsubscribe in one click.
Comments
Sign in to join the conversation.
Sign in to commentAccepted answer