The software app being developed runs on the embedded hardware and spits the debug output through a serial port during various functionality of the app. Following are the questions.
-
Can I use the JTAG interface to the MCU in testing the app flashed on to it ?
-
Is there a way to automate testing especially for regression testing?
I am currently thinking of creating an app that looks for the debug output over the serial and scans for various sentences spitted out? Is this a good idea.
Any ideas pertaining to this topic will be appreciated.
Best Answer
Using JTAG allow you to take full control over the MCU. Depending on MCU hardware settings (see pin BOOT0 description for STM32F4), the MCU will decide if
So, my answer to your question
is No. You can't. But you can test the app that will be finally flashed to it with JTAG, and then flash it once you're happy with it.
Sure, many ways but it really depends on your application. Consider a simple APP that will take INPUT data (from sensors for example) to produce OUTPUT data (LED lighting for example).
For non-regression testing it is a good idea to have a library of INPUT test data, for which you know the expected OUTPUT results. The main challenge there is how you could send the INPUT test data in place of the sensors. And this will depends on you application.
I suggest you to take the non-regression testing as a requirement of your embedded application, and consider an architecture where you could easily switch the INPUT data receiver from JTAG input to actual sensors.