Skip to main content
g. lewis
Associate III
April 11, 2017
Question

SWOTraces in debug for printf on SW4STM32

  • April 11, 2017
  • 1 reply
  • 1151 views
Posted on April 11, 2017 at 11:50

I'd like to be able to output printf string on the Serial Wire Viewer window during the debug on SW4STM32. I've followed the tutorial in the in

Help >> Help Contents >> SystemWorkbench for STM32 User Guide >> Advanced >>SWOTraces.

But can find how to open the Serial Wire Viewer window.

Any help would be apreciated.

My board is the F411RE runing on windows10.

Generated the sw by the mean of STM32CUBEMX.

Placed into the    /* USER CODE BEGIN 3 */ the code:

      printf('it works');

but it doesn't...

    This topic has been closed for replies.

    1 reply

    Nesrine M_O
    Associate
    April 11, 2017
    Posted on April 11, 2017 at 14:56

    Hi

    lievre.gilles

    ,

    Refer to this thread it may help you:

    https://community.st.com/0D70X000006StxhSAC

    -Nesrine-

    Tesla DeLorean
    Guru
    April 11, 2017
    Posted on April 11, 2017 at 18:23

    I think he's asking about opening the SWV output window, not output via a USART on to a terminal.

    I don't use SW4STM32, but it is likely a subview pane in the debugger, akin to the 'Memory View' or 'Stack View' in other tools. One could also confirm it is working using the ST-LINK Utilities, which provides a SWV Viewer. Make sure core frequency matches settings.

    The other thread also had an issue where the system Hard Faulted dues to an unaligned 64-bit read due to the stack not being at the correct alignment.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    g. lewis
    g. lewisAuthor
    Associate III
    April 11, 2017
    Posted on April 11, 2017 at 21:43

    The tutorial showes this window but I can't get a hand on it:

    0690X00000606k4QAA.png