I might be missing something here, where does the printf output go to when you run unit tests with the option to redirect printf to test output window? I can’t find a test output window which would make sense!
I’m using a Segger J-Link debugger and an STM32 device.
As long as you use the TinyEmbeddedTest framework, you can set the “Redirect printf() to Test Output window” option in the Test Framework Properties and the output will then appear under the test results (Show Additional Output link). That said, make sure you don’t have multiple conflicting options enabled (see this page).
I’m definitely missing something then! Can you tell me exactly where to find that link as its not obvious to me. I have the correct options set as per that page.
If you are new to VisualGDB, please do allocate some time to go through the documentation and tutorials (e.g. unit testing tutorial). They do show the location of all the relevant settings (e.g. see the “Recovering from assertion failures” section) and will save you considerable time if you are planning a non-trivial setup.
Got it, thanks. for anyone else wondering, the function is OutputTestMessage.
I read pretty much all the guides and this one https://visualgdb.com/documentation/tests/TinyEmbeddedTest/ says to use printf with the option to redirect printf to the test output window. Does this not do the same thing?
Sorry, not sure what you meant. If you have tried following the tutorial and VisualGDB is not working as expected, please share the screenshots of all the steps you take on your side (including all GUI settings) and the output you get (including any missing windows or differences compared to the tutorial), and we will try to check what is going on.
No, I think it is fine. I was mistaken that printf statements in the one guide outputs to the test window but in fact i should have followed the guide which shows the OutputTestMessage function sends text to the test window. It works with the latter and that’s all that matters.
It would be nice to have a guide that shows how to integrate the unit test project with an existing project.