2020-05-07 08:17 PM
Hello,
I am trying to write a simple hello world in order to make printf work with my setup. I have an own board, which I am programming it using ST-Link V3set (I also couldn't get it to work with ST-Link V2). I can program my board, debug it, I can see variables on live expression and everything is working perfectly.
The problem is when I try to redirect printf to ITM. I overwrite the _write function, I can step through it, I can see it writing to the register, but I get nothing on my console.
I basically followed this video and have also tried following articles, where everyone got it working. I have followed every possible step, but I still don't get anything on the console. What am I doing wrong?
Solved! Go to Solution.
2020-05-08 12:16 PM
>>What am I doing wrong?
Ok, so 11 minute video, nothing about your board, not attached the project...
>>I have an own board
And what processor do you have on this board? Perhaps you have a schematic or wiring diagram?
PB3/SWO needs to be connected
The clock settings on the core and the debugger need to match properly, otherwise no output
Do you have a working U(S)ART? Can you send data to both UART and ITM?
2020-05-08 11:45 AM
Are you using latest CubeIDE (1.3.1) and same MCU as in the video (STM32F466)?
-- pa
2020-05-08 12:16 PM
>>What am I doing wrong?
Ok, so 11 minute video, nothing about your board, not attached the project...
>>I have an own board
And what processor do you have on this board? Perhaps you have a schematic or wiring diagram?
PB3/SWO needs to be connected
The clock settings on the core and the debugger need to match properly, otherwise no output
Do you have a working U(S)ART? Can you send data to both UART and ITM?
2020-05-08 04:55 PM
Sorry it took me so long to answer. I have the latest CubeIDE version and I'm using STM32G431
2020-05-08 05:01 PM
Sorry, I am an idiot. It was a rough day, it was late here and I ended up forgeting.
I am using STM32G431. And I think you might have solved my problem. SWO is not connected, the line was accidentally cut.
2020-05-08 05:03 PM
Bu how do people get the st link v2 to work with printf when the jtag doesn't have an SWO pin? only an SWDIO and SWIM.
2020-05-09 05:00 PM
It looks like Cube IDE v 1.3.1 has regression with prints via ITM.
If it does not work for you, try v. 1.2.
-- pa