fast semihosting + segger j-link + ignore if no debugger = no semihosting

Sysprogs forums Forums VisualGDB fast semihosting + segger j-link + ignore if no debugger = no semihosting

This topic contains 5 replies, has 2 voices, and was last updated by  support 1 week, 2 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28384

    davidoz
    Participant

    Hi Support,

    I have an application running on an STM32F0.  I would like it to execute regardless if a debugger is attached.  If a debugger is attached I would like it to send semihosting messages.  I can get that working with the st-link, but not with the Segger j-link.

    If I have this environment, I do get semihosting, but it won’t run without the debugger:
    <table style=”border-collapse: collapse; width: 61.2482%;” border=”1″>
    <tbody>
    <tr>
    <td>Fast Semihosting</td>
    <td>Enabled</td>
    </tr>
    <tr>
    <td>Debugger Probe</td>
    <td>J-Link Attached</td>
    </tr>
    <tr>
    <td>When running without a debugger</td>
    <td>Wait for debugger to attach</td>
    </tr>
    </tbody>
    </table>
     

    If I have this environment, I don’t get any semihosting when the debugger is attached:
    <table style=”width: 67.4342%; border-collapse: collapse; border-style: hidden; height: 59px;” border=”1″>
    <tbody>
    <tr style=”height: 13px;”>
    <td style=”width: 36.6818%; height: 13px; border-style: hidden;”>Fast Semihosting</td>
    <td style=”width: 54.2757%; height: 13px; border-style: hidden;”>Enabled</td>
    </tr>
    <tr style=”height: 23px;”>
    <td style=”width: 36.6818%; height: 23px; border-style: hidden;”>Debugger Probe</td>
    <td style=”width: 54.2757%; height: 23px; border-style: hidden;”>J-Link Attached</td>
    </tr>
    <tr style=”height: 23px;”>
    <td style=”width: 36.6818%; border-style: hidden; height: 23px;”>When running without a debugger</td>
    <td style=”width: 54.2757%; border-style: hidden; height: 23px;”><span style=”text-decoration: underline;”>Ignore profiling/semihosting calls</span></td>
    </tr>
    </tbody>
    </table>
    I’m assuming it is something to do with the J-Link because the st-link works ok.  Is there an easy fix for this issue?

    Cheers

    David

     

    • This topic was modified 3 months, 1 week ago by  davidoz.
    • This topic was modified 3 months, 1 week ago by  davidoz.
    #28387

    davidoz
    Participant

    Sorry, the tables aren’t working, but it’s suffice to say when the “When running without a debugger”  setting is “Ignore profiling/semihosting calls” and a J-Link is attached then no semihosting messages are received.

     

     

    #28389

    support
    Keymaster

    Hi,

    No problem, we can help you get it working, however we would first kindly ask you to renew your technical support here as it has recently expired.

    #28390

    davidoz
    Participant

    Wow, has it been a year already.  I’ll let you know when the payment is authorised.

    #29005

    davidoz
    Participant

    Hi, I forgot I had this question outstanding.  I believe we’re all paid up again, so do you have any suggestions on how to fix the issue?

    Cheers

    David

    #29006

    support
    Keymaster

    Thanks for renewing your license. We will explain how VisualGDB handles this.

    Please try locating the CanInvokeSemihostingCalls() function in DebuggerChecker.h and searching for all references to it. This function is invoked each time your program tries to write anything via the fast semihosting mechanism. It normally just checks the C_DEBUGEN bit to see if a debugger is attached.

    The easiest way to troubleshoot it is to set a breakpoint in the function and try outputting anything via the printf() call (don’t forget to end the printed line with “\n” as otherwise it will get buffered). Does the CanInvokeSemihostingCalls() get invoked? Does it return true as expected when running under debugger?

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.