Sunday 22 September 2019

microcontroller - ST-LINK is serial communication possible?



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.



Answer



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!


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...