Simple question: When I program a demo program that uses PRINTD, where does the serial console data go? I followed the tutorials and I can see the serial data if I run it in Visual Studio Code in the debugger. However, when I program the chip, exit Visual Studio code and then reset the chip none of the messages appear. Perhaps it is being re-directed to a different UART, but which one? I am using TeraTerm and the data appears there totally outside of Visual Studio Code, but only when the debugger is running inside of VS Code.
I have several USB to UART converters, so I don't really care if it is on another set of port pins. I just need to output to provide log messages of what is happening in my code.
Thank you.
Semihosting is a mechanism where the target MCU uses the debugger to send output (like printf) to the host PC. It’s great for development, but it requires an active debugger session. Once you flash the board and run it standalone, semihosting won’t work.
BR,
Omar
So, I discovered the following by accident. As I said, the serial console is active if I have the debugger running. I accidentally killed VS Code with the debugger running. The serial port kept running. Even if I press the reset button or power cycle the board, it keeps working. If I return the VS Code and again program the flash, then I get the startup serial messages once as it finished programming. After that it quits outputting the serial port until I again do the debugger trick above. I am building the debug version as I am just starting the code. Don't know if that makes a difference.