Target path mapping problem

Sysprogs forums Forums VisualGDB Target path mapping problem

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #36379
    intector
    Participant

    Hello,

    I’ve got a project and a message that the target mapping is wrong(see attached screenshots). I’ve checked everything, and it looks correct.

    For testing, I made a new bare-bone project, which works OK. I copied that project and renamed everything. That copy project compiles without any issues, but when I try to debug, I get the target path error again.

    Next, I used the working bare-bone project and tried to make it my starter project. I renamed everything and compiled it without errors. The target path error is back when I start debugging.

    The upload limitation prevents me from uploading those two projects, but I’ve created a GitHub repo with them.

    GitHub repo: VisualGDB_Target_Path_Error

     

    Thank you

    Kai

    Attachments:
    You must be logged in to view attached files.
    #36382
    support
    Keymaster

    Looks like something is broken with the symbols. Please make sure you understand which symbols are loaded, which paths are referenced by them, and what paths are expected by gdb.

    #36383
    intector
    Participant

    Hello,

    I encountered many boulders on my way, but my project is finally ported to the STM32H7R3L8H6H MCY and compiles without errors. The download to the external memory is also working, and the debugger stops on the breakpoints. The only issue is that I can see any values on any variables. Some variables have random values, and others have standard initial values, but no changes are shown during debugging.

    I had this issue earlier and followed the instructions you guys gave me in my earlier post about it, after which it worked. The issue came back for some reason, and I can’t see any values. The program runs and stops on the breakpoints, but that is it pretty much.

    I’ve attached the log file for your information.

    Thank you

    Kai

    Attachments:
    You must be logged in to view attached files.
    #36385
    intector
    Participant

    Hello,

    Thank you for the fast answer.

    The reason for that behavior was the linker file. I compared the linker file with one generated by STM32CubeMX and found that some spaces in the wrong places caused this problem. I don’t understand how this could cause such issues, but it’s working now. I’ll probably have to learn more about the linked script syntax.

     

    Again, thank you

    Kai

    #36387
    intector
    Participant

    Hello Support,

    The issue with missing values during debugging is back. I can compile my project without any issues, and the debugger stops on the correct breakpoints, but the variables show only the initial values.

    This is from the “VisualGDB Program Output” window:

    C:\Users\KaiJensen\AppData\Local\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.openocd.st\bin\openocd.exe -c "gdb_port 59761" -c "telnet_port 59759" -f interface/stlink-dap.cfg -f target/stm32h7rx.cfg -c init -c "reset init" -c "echo VisualGDB_OpenOCD_Ready"
    Open On-Chip Debugger 0.12.0 (2025-01-22) [https://github.com/STMicroelectronics/OpenOCD]
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    Info : auto-selecting first available session transport "dapdirect_swd". To override use 'transport select <transport>'.
    stm32h7x_dbgmcu_mmw
    Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
    Info : STLINK V3J15M7 (API v3) VID:PID 0483:374E
    Info : Target voltage: 3.294024
    Info : Unable to match requested speed 1800 kHz, using 1000 kHz
    Info : Unable to match requested speed 1800 kHz, using 1000 kHz
    Info : clock speed 1000 kHz
    Info : stlink_dap_op_connect(connect)
    Info : SWD DPIDR 0x6ba02477
    Info : [stm32h7x.cpu0] Cortex-M7 r1p2 processor detected
    Info : [stm32h7x.cpu0] target has 8 breakpoints, 4 watchpoints
    Info : gdb port disabled
    Info : starting gdb server for stm32h7x.cpu0 on 59761
    Info : Listening on port 59761 for gdb connections
    [stm32h7x.cpu0] halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x0800119c msp: 0x20010000
    Info : Unable to match requested speed 4000 kHz, using 3300 kHz
    Info : Unable to match requested speed 4000 kHz, using 3300 kHz
    VisualGDB_OpenOCD_Ready
    Info : Listening on port 6666 for tcl connections
    Info : Listening on port 59759 for telnet connections
    Info : accepting 'gdb' connection on tcp/59761
    Info : Device: STM32H7Rx/7Sx
    Info : flash size probed value 65535k
    Info : STM32H7 flash has a single bank
    Info : Bank (0) size is 65535 kb, base address is 0x08000000
    Info : New GDB Connection: 1, Target stm32h7x.cpu0, state: halted
    Warn : Prefer GDB command "target extended-remote :59761" instead of "target remote :59761"
    [stm32h7x.cpu0] halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x0800119c msp: 0x20010000
    Info : Unable to match requested speed 4000 kHz, using 3300 kHz
    Info : Unable to match requested speed 4000 kHz, using 3300 kHz
    [stm32h7x.cpu0] halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x0800119c msp: 0x20010000
    Info : Unable to match requested speed 4000 kHz, using 3300 kHz
    Info : Unable to match requested speed 4000 kHz, using 3300 kHz
    force hard breakpoints
    Error: Failed to read memory at 0x70000c00
    Error: Failed to read memory at 0x70000d12
    Error: Failed to read memory at 0x70000c1a
    Info : dropped 'gdb' connection
    shutdown command invoked

    I also attached the log file.

    Thank you

    Kai

     

    Attachments:
    You must be logged in to view attached files.
    #36394
    intector
    Participant

    Hello,

    I have a project with an STM32H7R3L8H6H MCU, and I can’t see the values of the variables at breakpoints. This issue occurred earlier, but I applied a patch, and everything worked fine. For some reason, the problem is back. When I start debugging, the variables’ values are always at their initial values.

    Here is the “VisualGDB Program Output” window content:

    C:\Users\KaiJensen\AppData\Local\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.openocd.st\bin\openocd.exe -c "gdb_port 59761" -c "telnet_port 59759" -f interface/stlink-dap.cfg -f target/stm32h7rx.cfg -c init -c "reset init" -c "echo VisualGDB_OpenOCD_Ready"
    Open On-Chip Debugger 0.12.0 (2025-01-22) [https://github.com/STMicroelectronics/OpenOCD]
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    Info : auto-selecting first available session transport "dapdirect_swd". To override use 'transport select <transport>'.
    stm32h7x_dbgmcu_mmw
    Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
    Info : STLINK V3J15M7 (API v3) VID:PID 0483:374E
    Info : Target voltage: 3.294024
    Info : Unable to match requested speed 1800 kHz, using 1000 kHz
    Info : Unable to match requested speed 1800 kHz, using 1000 kHz
    Info : clock speed 1000 kHz
    Info : stlink_dap_op_connect(connect)
    Info : SWD DPIDR 0x6ba02477
    Info : [stm32h7x.cpu0] Cortex-M7 r1p2 processor detected
    Info : [stm32h7x.cpu0] target has 8 breakpoints, 4 watchpoints
    Info : gdb port disabled
    Info : starting gdb server for stm32h7x.cpu0 on 59761
    Info : Listening on port 59761 for gdb connections
    [stm32h7x.cpu0] halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x0800119c msp: 0x20010000
    Info : Unable to match requested speed 4000 kHz, using 3300 kHz
    Info : Unable to match requested speed 4000 kHz, using 3300 kHz
    VisualGDB_OpenOCD_Ready
    Info : Listening on port 6666 for tcl connections
    Info : Listening on port 59759 for telnet connections
    Info : accepting 'gdb' connection on tcp/59761
    Info : Device: STM32H7Rx/7Sx
    Info : flash size probed value 65535k
    Info : STM32H7 flash has a single bank
    Info : Bank (0) size is 65535 kb, base address is 0x08000000
    Info : New GDB Connection: 1, Target stm32h7x.cpu0, state: halted
    Warn : Prefer GDB command "target extended-remote :59761" instead of "target remote :59761"
    [stm32h7x.cpu0] halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x0800119c msp: 0x20010000
    Info : Unable to match requested speed 4000 kHz, using 3300 kHz
    Info : Unable to match requested speed 4000 kHz, using 3300 kHz
    [stm32h7x.cpu0] halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x0800119c msp: 0x20010000
    Info : Unable to match requested speed 4000 kHz, using 3300 kHz
    Info : Unable to match requested speed 4000 kHz, using 3300 kHz
    force hard breakpoints
    Error: Failed to read memory at 0x70000c00
    Error: Failed to read memory at 0x70000d12
    Error: Failed to read memory at 0x70000c1a
    Info : dropped 'gdb' connection
    shutdown command invoked

    I also attached the logfile.

     

    Thank you

    Kai

    Attachments:
    You must be logged in to view attached files.
    #36397
    support
    Keymaster

    Sorry, this doesn’t look like any known issue. Please try following the tutorials from scratch, make sure it works there, and then try comparing the broken project against the working one. If you can point out a specific setting that consistently triggers the problem, we might be able to suggest a workaround.

    #36398
    intector
    Participant

    Hello,

    Thank you for the fast answer.

    It’s quite possible that this is not a known issue, but what makes me wonder is those error messages:

    Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED

    Error: Failed to read memory at 0x70000c00
    Error: Failed to read memory at 0x70000d12
    Error: Failed to read memory at 0x70000c1a

    Why does it have an issue with the libusb_open(), and why is it problematic to read the memory at those addresses? I can read those addresses in the memory listing without any issues.

    However, I’ll follow your recommendation and start a new project from scratch as soon as possible. In the meantime, I decided to switch to an STM32H753 MCU. Those “Bootflash” MCUs are fantastic devices, but it’s hard to find good support for them. I might get back to those later.

    Thank you

    Kai

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.