ESP32 Semihosting not working

Sysprogs forums › Forums › VisualGDB › ESP32 Semihosting not working

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #37504
    MrZANE
    Participant

    Hi
    I’m using VisualGDB 6.1R3 (Build 5547) on Visual Studio 2026 Insiders and when debugging my ESP32 (Classic) the Semihosting window doesn’t show anything.
    The data is recieved as can be seen in both the openocd window as an incrementing counter and by opening the latest tmp file created (for example a file named C:\Users\jimmy\AppData\Local\Temp\tmpBA9B.tmp) after the debugging starts.
    If I tail the .tmp file I can read all the semihosting data as it comes in. A new tmp file is created for each debug session so this isn’t very practial (Also my editor Notepad++ doesn’t parse the ANSI code so that doesn’t improve the readability).
    Is there anything I need/can to do to fix this or is it a bug?

    Could it be something GDB related?:
    Command line:
    -f interface/ftdi/esp_ftdi.cfg -c “adapter speed 3000” -f target/esp32.cfg

    GDB Commands:
    set remotetimeout 30
    set print elements 2048
    set print repeats 2048
    set max-value-size unlimited
    target remote :$$SYS:GDB_PORT$$
    mon gdb_breakpoint_override hard
    mon reset halt
    load

    #37505
    MrZANE
    Participant

    If I enable logging in VisualGDB diagnostics i get this even though the only application that has a handle (I’ve checked with both resmon, procmon and ProcessExplorer) to the named file is openocd. :

    ESP32 semihosting client failed: —————— System.IO.IOException ——————
    System.IO.IOException: The process cannot access the file ‘C:\Users\jimmy\AppData\Local\Temp\tmpFBCC.tmp’ because it is being used by another process.
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
    at ep2.h()
    trace=[System.IO.__Error.WinIOError:472, System.IO.FileStream.Init:928, System.IO.FileStream..ctor:24, ep2.h:19]

     

    I’ve attached a image that shows the parameters openocd creates the file with

    Attachments:
    You must be logged in to view attached files.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.