cancel
Showing results for 
Search instead for 
Did you mean: 

ITM_SendChar, ST-Link/V2 and Eclipse/gdb

rea5245-stm
Associate II
Posted on October 03, 2012 at 03:58

Hi,

Is anyone getting debug text via ITM_SendChar using ST-Link, gdb, and Eclipse? I've tried it for the first time, and I'm not seeing my debug text displayed in the Eclipse console view. I can confirm with breakpoints and single-stepping that ITM_SendChar is working, but I don't know if the ITM is not initialized correctly, or ST-Link/V2 doesn't support ITM text, or if ST-LINK_gdbserver doesn't support it, or if it needs a command line argument, or if I'm looking at the wrong Eclipse view.

Any help would be greatly appreciated.

Thanks,

   Bob

6 REPLIES 6
Sirma Siang
ST Employee
Posted on March 03, 2017 at 10:39

Hello Bob,

Could you detail a bit more your settup:

what is your OS ?

Are you using a printf for your debug message ?

Have you inserted the GNU part to allow a printf to be sent throught the UART ?

Kind regards

Sirma

AVI-crak
Senior
Posted on March 03, 2017 at 16:59

Use a leg (SWO) for the printing of messages.

The printing of messages through (SWO) uses program wait loops. There is no complete hardware support, there is no protection of messages, there is no back coupling.

There is only one plus from this technology, it can work completely independently - without initialization of additional interfaces of debugging.

For example, it is possible to forbid (to change) debug jgag and swd interfaces, to leave only one line (SWO) - and to read a log from the processor. It sometimes happens the useful to long-time independent testing of a ready-made product (days and months).

Posted on March 03, 2017 at 17:09

Requires the connection of SWO (PB3). Not supported by Cortex-M0

The ST-LINK supports SWV, the ST-LINK Utilities provide an SWV window for viewing the messages, and will configure the connection. It is critically important to have the clock speed setting match that of the target processor.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 04, 2017 at 14:00

Why are you responding to questions posed 5 years ago?

Posted on March 04, 2017 at 14:28

Good question, I didn't even notice that, it just showed up in current activity. I'd assume it was listed as a related question, or flagged to ST Staff as an unanswered question.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 06, 2017 at 11:50

Sorry, my bad.

It was unanswered, but I haven't notice the very old submission date.