AnsweredAssumed Answered

Trace ITM using STM32L4 Discovery Board not working

Question asked by Naresh R on Jun 2, 2018
Latest reply on Jun 6, 2018 by Clive Two.Zero

Hi all, 

I am working with a discovery board having STM32L476 on board. I am trying to retarget "printf()" using ITM port 0 but having difficulties in making it work.


This is what I have done till now:

a) There is a solder bridge, SB14 which was not connected to the ST-Link-V2/1 on the discovery board; I have connected this bridge.

b) I have updated firmware version of on-board ST-Link-V2/1 to the latest using ST-LinkUpgrade software.

c) I am using Keil-MDK for my development where I am getting "internal command error" as soon as I click on debug icon. After I click "ok" on this error box, another error window pops up saying "Target DLL has been cancelled. Debugger Aborted!"

d) I have also tried using STM32 ST-Link Utility software, I did enter the core clock frequency correctly as 8 MHz and selected the ITM port 0 in the SWO printf viewer window but once I click on the start button, the same error window "internal command error" appears.

e) I did enable "connect under reset" and "debug even in low power mode" in ST-Link Utility just as a fail safe correction but no avail. 

f) I did double check that I was using SWD and not JTAG while I was working on the above mentioned things.


By the way, when I don't enable Trace in Keil-MDK, SWD works fine; no issues at all.


Any  leads on how to make this work?