Problem Setting Breakpoint

Sysprogs forums Forums VisualGDB Problem Setting Breakpoint

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9680
    kalfus.w
    Participant

    Hello,

    I am trying to put a breakpoint in my code for STM32L476RG, but I keep getting the error “The breakpoint will not currently be hit. Cannot resolve breakpoint location”. The code compiles fine, and I was able to create a brand new project with identical settings (but different code that simply toggles an LED, right from the STM32Cube samples) and debug with that. I checked the compile options and it does have the flags -O0 and -ggdb. What could be causing this error and how can I resolve it so that I may debug my code?

     

    Thanks,

    BillyK

    #9686
    support
    Keymaster

    Hi,

    Please look in the GDB Session window in Visual Studio and switch it to “All GDB Interaction”. This should display the internal commands that VisualGDB sends to gdb. Then clear the window contents, try setting a breakpoint and check the output. If it does not explain what goes wrong, please post the output here and we will help you understand what is wrong.

    #9690
    kalfus.w
    Participant

    This is the output. It looks like it got the breakpoint and then halted but kept going even though I never clicked Continue, because it never gave me the option to.

    Program
    received signal SIGINT, Interrupt.
    0x08000410 in HAL_Delay (Delay=1000) at C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:334
    334 while((HAL_GetTick() – tickstart) < Delay)
    *stopped,reason=”signal-received”,signal-name=”SIGINT”,signal-meaning=”Interrupt”,frame={addr=”0x08000410″,func=”HAL_Delay”,args=[{name=”Delay”,value=”1000″}],file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal.c”,line=”334″},thread-id=”1″,stopped-threads=”all”
    -break-insert -f C:/Users/billy_000/Documents/Micromouse/2017/MicromouseTest/MicromouseOrientationTest/Src/main.c:81
    &”No source file named C:/Users/billy_000/Documents/Micromouse/2017/MicromouseTest/MicromouseOrientationTest/Src/main.c.\n”
    ^done,bkpt={number=”2″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”<PENDING>”,pending=”C:/Users/billy_000/Documents/Micromouse/2017/MicromouseTest/MicromouseOrientationTest/Src/main.c:81″,times=”0″,original-location=”C:/Users/billy_000/Documents/Micromouse/2017/MicromouseTest/MicromouseOrientationTest/Src/main.c:81″}
    x/4xb 0x8000410
    &”x/4xb 0x8000410\n”
    0x8000410 <HAL_Delay+32>: 0x9a 0x42 0xf7 0xd3
    OK
    -file-list-exec-source-files
    ^done,files=[{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal.c”},{file=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\machine/_default_types.h”,fullname=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\machine\\_default_types.h”},{file=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys/_stdint.h”,fullname=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys\\_stdint.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/CMSIS_HAL/Include/core_cm4.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\CMSIS_HAL\\Include\\core_cm4.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/CMSIS_HAL/Device/ST/STM32L4xx/Include/system_stm32l4xx.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\CMSIS_HAL\\Device\\ST\\STM32L4xx\\Include\\system_stm32l4xx.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/CMSIS_HAL/Device/ST/STM32L4xx/Include/stm32l476xx.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\CMSIS_HAL\\Device\\ST\\STM32L4xx\\Include\\stm32l476xx.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/CMSIS_HAL/Device/ST/STM32L4xx/Include/stm32l4xx.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\CMSIS_HAL\\Device\\ST\\STM32L4xx\\Include\\stm32l4xx.h”},{file=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys/lock.h”,fullname=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys\\lock.h”},{file=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys/_types.h”,fullname=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys\\_types.h”},{file=”c:\\sysgcc\\arm-eabi\\lib\\gcc\\arm-eabi\\6.2.0\\include/stddef.h”,fullname=”c:\\sysgcc\\arm-eabi\\lib\\gcc\\arm-eabi\\6.2.0\\include\\stddef.h”},{file=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys/reent.h”,fullname=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys\\reent.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_def.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\STM32L4xx_HAL_Driver\\Inc\\stm32l4xx_hal_def.h”},{file=”../../../../../../../newlib-2.4.0.20160923/newlib/libc/string/memset.c”,fullname=”/q/gnu/auto/newlib-bu-2.27+gcc-6.2.0+gmp-5.1.3+mpfr-3.1.2+mpc-1.0.2+newlib-2.4.0.20160923-arm-eabi/arm-eabi/thumb/cortex_m4/newlib/libc/string/../../../../../../../newlib-2.4.0.20160923/newlib/libc/string/memset.c”},{file=”/usr/local/lib/gcc/arm-eabi/6.2.0/include/stddef.h”,fullname=”/usr/local/lib/gcc/arm-eabi/6.2.0/include/stddef.h”},{file=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/sys/lock.h”,fullname=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/sys/lock.h”},{file=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/sys/_types.h”,fullname=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/sys/_types.h”},{file=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/sys/reent.h”,fullname=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/sys/reent.h”},{file=”/cygdrive/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/locale/setlocale.h”,fullname=”/cygdrive/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/locale/setlocale.h”},{file=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/stdlib.h”,fullname=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/stdlib.h”},{file=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/wchar.h”,fullname=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/wchar.h”},{file=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/locale.h”,fullname=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/locale.h”},{file=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/string.h”,fullname=”/q/gnu/auto/newlib-2.4.0.20160923/newlib/libc/include/string.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/StartupFiles/startup_stm32l476xx.c”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\StartupFiles\\startup_stm32l476xx.c”},{file=”Src/main.c”,fullname=”C:\\Users\\billy_000\\Documents\\Micromouse\\2017\\MicromouseTest\\MicromouseTest\\Src\\main.c”},{file=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\machine/_default_types.h”,fullname=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\machine\\_default_types.h”},{file=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys/_stdint.h”,fullname=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys\\_stdint.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/CMSIS_HAL/Include/core_cm4.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\CMSIS_HAL\\Include\\core_cm4.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/CMSIS_HAL/Device/ST/STM32L4xx/Include/system_stm32l4xx.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\CMSIS_HAL\\Device\\ST\\STM32L4xx\\Include\\system_stm32l4xx.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/CMSIS_HAL/Device/ST/STM32L4xx/Include/stm32l476xx.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\CMSIS_HAL\\Device\\ST\\STM32L4xx\\Include\\stm32l476xx.h”},{file=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys/lock.h”,fullname=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys\\lock.h”},{file=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys/_types.h”,fullname=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys\\_types.h”},{file=”c:\\sysgcc\\arm-eabi\\lib\\gcc\\arm-eabi\\6.2.0\\include/stddef.h”,fullname=”c:\\sysgcc\\arm-eabi\\lib\\gcc\\arm-eabi\\6.2.0\\include\\stddef.h”},{file=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys/reent.h”,fullname=”c:\\sysgcc\\arm-eabi\\arm-eabi\\sys-include\\sys\\reent.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\STM32L4xx_HAL_Driver\\Inc\\stm32l4xx_hal_rcc.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gpio.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\STM32L4xx_HAL_Driver\\Inc\\stm32l4xx_hal_gpio.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_def.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\STM32L4xx_HAL_Driver\\Inc\\stm32l4xx_hal_def.h”},{file=”../../../../../../../newlib-2.4.0.20160923/newlib/libc/misc/init.c”,fullname=”/q/gnu/auto/newlib-bu-2.27+gcc-6.2.0+gmp-5.1.3+mpfr-3.1.2+mpc-1.0.2+newlib-2.4.0.20160923-arm-eabi/arm-eabi/thumb/cortex_m4/newlib/libc/misc/../../../../../../../newlib-2.4.0.20160923/newlib/libc/misc/init.c”},{file=”Src/system_stm32l4xx.c”,fullname=”C:\\Users\\billy_000\\Documents\\Micromouse\\2017\\MicromouseTest\\MicromouseTest\\Src\\system_stm32l4xx.c”},{file=”Src/stm32l4xx_it.c”,fullname=”C:\\Users\\billy_000\\Documents\\Micromouse\\2017\\MicromouseTest\\MicromouseTest\\Src\\stm32l4xx_it.c”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/CMSIS_HAL/Include/cmsis_gcc.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\CMSIS_HAL\\Include\\cmsis_gcc.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_rcc.c”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/CMSIS_HAL/Include/cmsis_gcc.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\CMSIS_HAL\\Include\\cmsis_gcc.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_pwr_ex.c”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_pwr_ex.c”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_gpio.c”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_gpio.c”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/CMSIS_HAL/Include/cmsis_gcc.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\CMSIS_HAL\\Include\\cmsis_gcc.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/CMSIS_HAL/Include/core_cm4.h”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\CMSIS_HAL\\Include\\core_cm4.h”},{file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_cortex.c”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_cortex.c”}]
    -exec-continue
    ^running
    *running,thread-id=”all”
    Program
    received signal SIGINT, Interrupt.
    HAL_GetTick () at C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:317
    317 return uwTick;
    *stopped,reason=”signal-received”,signal-name=”SIGINT”,signal-meaning=”Interrupt”,frame={addr=”0x080003e0″,func=”HAL_GetTick”,args=[],file=”C:/Users/billy_000/AppData/Local/VisualGDB/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32L4xxxx/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c”,fullname=”C:\\Users\\billy_000\\AppData\\Local\\VisualGDB\\EmbeddedBSPs\\arm-eabi\\com.sysprogs.arm.stm32\\STM32L4xxxx\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal.c”,line=”317″},thread-id=”1″,stopped-threads=”all”
    -break-after 2 0
    OK
    x/4xb 0x80003e0
    &”x/4xb 0x80003e0\n”
    0x80003e0 <HAL_GetTick+4>: 0x02 0x4b 0x1b 0x68
    OK
    -exec-continue
    ^running
    *running,thread-id=”all”

    • This reply was modified 7 years, 4 months ago by kalfus.w.
    #9692
    support
    Keymaster

    Hi,

    Looks like you are setting a breakpoint in C:/Users/billy_000/Documents/Micromouse/2017/MicromouseTest/MicromouseOrientationTest/Src/main.c, but the actual path to the file as reported by gdb is C:/Users/billy_000/Documents/Micromouse/2017/MicromouseTest/MicromouseTest/Src/main.c.

    Please double-check that you are using the correct file. You can also use the ‘breakpoint diagnostics’ button in the GDB Session window to automatically setup a path mapping so that VisualGDB can substitute the paths for you.

    #9694
    kalfus.w
    Participant

    Ah, makes sense. I recreated the project in its own solution and that seemed to fix it. Thanks for the help!

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