Semihosting using GDB from the command line

Sysprogs forums Forums VisualGDB Semihosting using GDB from the command line

This topic contains 3 replies, has 2 voices, and was last updated by  support 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #33337

    davidoz
    Participant

    Hi All,

    I have semihosting working when using Visual Studio, however I’d like to receive semihosting messages using GDB from the command line.  I follow this setup:

    1. Run openocd.exe in a command box and attach it to the st-link probe.
    2. Run arm-none-eabi-gdb.exe in a separate command box.
    3. Set target to the openocd server by “target extended-remote localhost:50648” (successful)
    4. Reset board with “monitor reset halt” (successful)
    5. Enable semihosting with “monitor arm semihosting enable” (successful)
    6. Run the application with “Run” (successful)
    7. wait a few seconds….
    8. Breakpoint is hit (assuming it is the fast semihosting breakpoint)
    9. Resume execution with “Continue” (successful)

    No semihosting is seen.  I suspect there is something I need to do at step 8.  I’m assuming semihosting messages would normally be echoed by openocd/gdb or are they sent out through some other mechanism?

    Appreciate any help.

    Cheers

     

     

    #33338

    support
    Keymaster

    Hi,

    The OpenOCD implementation of semihosting is rather unreliable, hence VisualGDB provides its own one. Naturally, it will only work when using VisualGDB for debugging.

    #33343

    davidoz
    Participant

    Hi Support,

    Thanks for your quick reply.  I was using your version of OpenOCD but there must be more to it than I thought.

    Cheers

     

    #33345

    support
    Keymaster

    Hi,

    Our fork of OpenOCD mainly focuses on improved integration with VisualGDB (e.g. faster memory reading API for VisualGDB to use) and does not duplicate any of VisualGDB’s features on its own.

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

You must be logged in to reply to this topic.