Embedded Tdd Series
23 May, 22Category: tdd
I recently posted about my little environmental sensor that I built. I have been reading a lot about Test Driven Development (TDD) and wondered if it was worth re-writing the software following this methodology.
I’m proposing to publish blog posts updating my progress along the way. This will only be a software rewrite as I am not making any hardware changes. I did look into changing the microcontroller but component availability is still pretty bad so I decided against it. The hardware works well and, afterall, this is about TDD.
The original firmware was genererated using STs CubeMX tool. I also plan to use the same bring-up code and peripheral init code from before. This is for two reasons. Firstly, I can’t be bothered to reinvent the wheel. And secondly, it’s difficult to unit test firmware that can only run on the target processor. Everything that runs on top of the hardware/firmware can be compiled to run on an x86 processor and therefore can be unit tested easily. This is a well known ‘issue’ with embedded TDD.
#100daystooffload 2022. Post 14/100