We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello everybody,
I am trying to automate my tests with Keil uVision. I have written several unit-tests with the testing library Unity. Every test is encapsulated in a separate Keil project. The tests on the simulator. The test output is written to the Debug Viewer (debug_printf).
The created test-runner has a main function (int main(void))that returns after the tests are executed. When main returns I want the debug session to end. At the moment the debug session stays open.
Can anyone help me with that? Thank you in advance :)
Use a simulator script and put a breakpoint at the desired point of exit. When breakpoint is hit, just execute EXIT command.
/* C module code */ int main (void) { /* Test implementation */ .. .. /* End of tests */ exit_point(); }
/* uVision simulator script */ BS exit_point,1 G EXIT
Something like that should do the trick.
Thank you! That is exactly, what I am looking for.