Any way to receive SWV ITM debug data without Cube being in the post-F11 debug context?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-01 1:08 AM
Currently the Cube SWV ITM debug console does not receive the data unless you have built the project using the build+debug option F11.
This is a problem sometimes, when running code which contains the debug statements but which wasn't loaded from Cube IDE.
Or maybe there is some other program which can interface to STLINK V3 and receive this data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-01 1:31 AM
You can use CubeProgrammer and connect to SWV :
+ just set real cpu frequ.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-01 1:36 AM - edited ‎2024-08-02 9:06 AM
ST-LINK Utilities used to do it and STM32 Cube Programmer can do so now.
Code running on MCU can set up ITM, DWT and FPB too depending on how hard core bare metal you want to go.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-01 12:42 PM
Yes this is great. I have the ST Link Utility and that picks up the data
Curiously it reboots the target when it starts up but that's OK.
Thank you all!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-02 8:59 AM
Hello @PHolt.1 ,
Yes, it is possible to receive Serial Wire Viewer debug data. These steps could be helpful:
- Enable the SWV feature in the debug configuration.
- Ensure that the clock settings are correctly configured to provide a stable clock for the SWV.
- Configure ITM by adding some code to "syscalls.c"
#include "stm32f4xx.h" in the write function: __attribute__((weak)) int _write(int file, char *ptr, int len) { (void)file; int DataIdx; for (DataIdx = 0; DataIdx < len; DataIdx++) { __io_putchar(*ptr++); ITM_SendChar(*ptr++); } return len; }
- Click Debug to start a debug session.
In the debug session, open the SWV IT Data Console window and configure the port for receiving data, then click the button to run the view.
Thanks,
Rim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-02 9:08 AM
Not sure if ST-LINK Utilities offer connectivity options, ie so you can hot-plug
STM32 Cube Programmer might have more, and less disruptive, connection modes.
There should be a SWV tab/pane on the newer versions
Up vote any posts that you find helpful, it shows what's working..
