Working with CLEV6630B, using LPC-link2 as a debug probe, I have lost the ability to see printf and other stdout traffic in the debug console. When I first loaded my project last month, I saw printf output in that window. It got less reliable during that session. Now a few weeks later, it is not working at all. The breakpoint after the printf hits when I place or remove a tag from the antenna. But nothing comes up in the display. See the attached screenshot.
So my question is, where can I look to see how that is supposed to work, so I can troubleshoot it? I tried stepping into printf and it just skipped over.
My project is built from NFC Reader Library, Basic Discovery Loop. Other open projects are DAL, FreeRTOS, lpc_board_nxp_lpcxpresso_1769, lpc_chip_175x_6x and NxpNfcRdLib. I have commented out all my changes and cannot get back to the earlier behavior.
Solved! Go to Solution.
To have 'printf' passed through to the debugger, you need to have a library using semihosting:
Are you using one of the semihost variants?
I hope this helps,
Erich
To have 'printf' passed through to the debugger, you need to have a library using semihosting:
Are you using one of the semihost variants?
I hope this helps,
Erich
I marked Erich's answer correct. I am still having trouble, but he told me the key word "semihosting".
Other Community articles chasing the same problem led me to Redlink:
Why did printf() stop working?
To me, the key is redlinkserv.exe in c:/nxp/MCUXpressoIDE_11.0.1_2563/ide/plugins/com.nxp.mcuxpresso.tools.bin.win32_11.0.1.201908271452/binaries
That program manages the USB link to the targets and provides a loopback telnet connection on port 3025 by default. It can be blocked by firewalls, crash, all the usual risks. The IDE has two buttons for Redlink and the first choice of Consoles is Redlink.
Maybe this is all too simple for the established NXP ARM developers, but I had no idea how things were working before.
Thanks.
Erich, thank you for the keyword "semihosting." I will look into that.
The NFC Reader Library examples use Redlib (semihost) at the top levels. Lower levels like lpc_chip_175x_6x have empty Libraries folders.