Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I am using STM32F4 discovery board and Atollic TrueStudio for ARM Lite 3

I would like to pass some debugging data to PC using printf and I can't find a way to do it through STLink. Is it even possible? It seems essential feature for any debugging process.

Edit: I need to use Serial Wire Viewer, but still no luck making it work.

share|improve this question

3 Answers

up vote 1 down vote accepted

OK, The way to achieve communication in Atollic TrueStudio for ARM Lite (yes it works under lite wersion since 3.0):

  1. Enable Serial Wire Viewer in active debug configuration
  2. Show SWV Console (under Debug prespective)
  3. Open Serial Wire Viewer settings (first button in SWV Console window)
  4. Enable ITM Stimulus Port 0
  5. Enable Start/Stop Trace button in SWV Console (second button)
  6. Use ITM_SendChar function
  7. Enjoy debugging strings!
share|improve this answer
This also works on Keil uCVision with all the ulink jtag family. – Katte May 10 '12 at 12:13

It is using Crossworks.. In crossworks, we use dbg_printf but it is slow, be warned.

share|improve this answer

When working with embedded systems, printf is not a generally included function. If you want to be able to use printf you have to write it yourself or find an already-written one. Typically printf functions used in embedded systems write to the serial port - you can use a serial terminal program such as RealTerm to read the serial port data.

share|improve this answer
I can write printf for myself. I can use uC serial and some adapter but I want to use only JTAG. What I was looking for is Serial Wire Viewer (SWV). When I will succeed with actually using it, I will post answer to my question. – Tokamak Apr 1 '12 at 16:28
Well, good luck, but the printf serial scheme is pretty typical in embedded systems debug. I wouldn't dismiss it so soon. – AngryEE Apr 1 '12 at 20:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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