2020-07-09 12:03 PM
Hello,
I'm just a beginner that tryes to migrate from the arduino world to ST and before I start the dev jorney I'd like to hand on to a debbuging method that requiers as little hardware and sofware setup as possible while still having the logging and direct debugging capabilities now ST linkV2 as a debugger works just fine by default but I'd like to also have a running debugging option with printf like in arduino so following this guide:
I saw it is possible and relativelly simple but can't manage to make it work no matter if I just the ITM_SendChar( 65 ); function of printf(); the SWV ITM data @Port0 just stays empty and I've enabled everything that the guide shows
Any idea what else needs to happen or if that even possible using an stm32F411ceu black pill with ST-Link V2 dongle?
2020-07-09 12:44 PM
Do you really need Arduino style printf. Arduino has no real IDE, integrated development environment, just a tool to download code to CPU and a good serial monitor.
With STM32 CPU and real IDE you can single step your code one instruction at time and see easily what the SW is doing. There is very little need for huge amount of print commands.
For serial bus/UART/USART you need a serial to USB converter and serial monitor in your computer.
2020-07-09 01:25 PM
But why do it with additional device instead of using the same st link for debugging and printing?
2020-07-09 04:53 PM
Is the SWO pin connected to the ST-LINK?
--pa
2020-07-10 12:02 AM
No, but is it necessary if I could debug and flash the chip in the current setup with just two wires?
2020-07-11 12:19 AM
ITM_SendChar() sends data over SWO line...