I’m working in a production setup (not a development/debug session), where each board must be prepared before its main flash image is programmed. Our process is (simulated with EVK):
- Connect to the MIMXRT1021-EVK via a Segger J-Link (SWD + SWO).
- Use J-Link Commander (JLink.exe / JLinkCommander) to load our custom firmware into RAM.
- Start execution immediately with the g command.
In this context I do not attach a debugger or IDE—everything runs “headless” via J-Link Commander scripts. What I’d like to do is have the running firmware emit simple status or log messages over the SWO pin (ITM port 0 → TPIU), so that our production test station can capture and display these messages without stopping the CPU.
My questions are:
- Is it possible to enable and view SWO output purely from J-Link Commander, without starting a full debug session?
- If so, what is the exact sequence of J-Link Commander commands to
- configure the SWO pin protocol and baud rate,
- enable the ITM stimulus port,
- and capture the output in the console?
I’m already comfortable initializing SWO in firmware (DEMCR, TPIU, ITM regs, etc.), but I need to know the proper J-Link Commander commands to turn on the trace port and route its output to the stdout of J-Link Commander.
Any example scripts or pointers to the relevant manual sections would be greatly appreciated!
Thank you in advance,
Max