Post History
I am soon finished writing the firmware for a relay control board that will help us automate some of the electrical tests we run at the company I work. In essence, the board more or less just turns...
#1: Initial revision
How do I test firmware code for my embedded system that also controls hardware peripherals?
I am soon finished writing the firmware for a relay control board that will help us automate some of the electrical tests we run at the company I work. In essence, the board more or less just turns relays on and off by communicating with an external PC via USART - simple enough. The challenge I am facing now, is that I want to test the correctness of my firmware before we start deploying these boards around the facility, but I'm not sure how to do that. To me, firmware is special in that regard. In hardware/analog electronics everything exists "outside" the PC. If I want to check if my low pass filter works correctly I apply an excitation waveform at the input, measure the output and test if it matches my expectation. In software everything exists "inside" the PC. The variables, the memory, the commands and results are all available to see in the PC as long as you know where to peek. But firmware is sort off in-between. Some things happen on the outside world (control of hardware, switches, interfaces ...) while some things happen inside the embedded system (incrementing counters, handling interrupts, controlling program flow and logic, etc.). What are some of the ways I can test my firmware to see if it operates correctly?
