2
\$\begingroup\$

The question is very similar to this one:

I'd like to to printf debugging via the ST-LINK adapter and JTAG, not SWD, in IAR Workbench. Is this possible?

\$\endgroup\$
1
\$\begingroup\$

No. JTAG requires that the clock stops, and then you dump the registers and other states. In the similar question, that was using USB so you could get information from the running system by sending text via CDC, since it looks like a serial port.

I haven't used the most recent IAR workbench, but due to the architecture of JTAG, you would probably have to get "printf" style information out of the UART. You could use JTAG to copy information to a spot in memory, and then dump that memory segment when the clock restarts.

\$\endgroup\$
0
\$\begingroup\$

Yes, its physically possible. The mechanism might be different since SWD support multiplexing the pin with SWO/ITM, but I've not checked what is actually implemented in STM32. Its possible to use the same semi-hosting technique from pre-SWD days - this will need JTAG to keep polling for activity.

You might find that the JTAG approach uses halting debug, but for an STM32 part, JTAG supports the same access properties as SWD (memory mapped access rather than direct to a TAP controller in the core).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.