Debugging w. VS2015 and Segger J-Link

Sysprogs forums Forums VisualGDB Debugging w. VS2015 and Segger J-Link

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

Viewing 15 posts - 16 through 30 (of 47 total)
  • Author
    Posts
  • #11990

    support
    Keymaster

    Hi,

    This generally could indicate some error during the debugging setup phase. Please check the entire GDB log and also the output from the J-Link stub for more clues. If you are not sure, please post both of them here and we will help you understand them.

    #11992

    erasmus
    Participant

    This was set-up and working Fine for debugging for months. VGDB updated the toolchain and now it does not work. Going back to old toolchain does not work.

    Reinstalling VGDB, toolchain and segger tools. Does VGDB test all the with all the toolchains before releasing?

    #11993

    support
    Keymaster

    Hi,

    We do run series of automated tests on all released packages, so it should not normally be the problem. However we have recently released an update to the Segger package that requires VisualGDB 5.3 Preview 5 (it will only be shown/installed if you are already using v5.3 Preview). Please check if you are using an older preview build of VisualGDB and update it if this is the case.

    #11994

    erasmus
    Participant

    Visual GDB 5.3.5.1707

    #11995

    support
    Keymaster

    This should be the correct one. Please check the output of the J-Link gdb stub and the entire gdb session log as suggested above. Feel free to post the output here if it does not help.

    #11997

    erasmus
    Participant

    Looks like All our VGDB Visual Studio projects are exhibiting similar failures now. We have tried completely removing the toolchains, visual GDB, and segger tools. Just to re-iterate these projects were working fine before the latest toolchain update. Now we consistently break all projects now when trying to load into the nRF51822. Here is the VGDB log for the second project that is now broken…..

    C:\tools\arm-eabi\bin\arm-eabi-gdb.exe –interpreter mi C:\srcroot\NordicMain\Dongle_BTLE\VisualGDB\Debug\Dongle_BTLE
    -gdb-version
    =thread-group-added,id=”i1″
    ~”GNU gdb (GDB) 7.12\n”
    ~”Copyright (C) 2016 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \”show copying\”\nand \”show warranty\” for details.\n”

    ~”This GDB was configured as \”–host=i686-pc-mingw32 –target=arm-eabi\”.\nType \”show configuration\” for configuration details.”

    ~”\nFor bug reporting instructions, please see:\n”
    ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/&gt;.\n”

    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”…\n”
    ~”Reading symbols from C:\\srcroot\\NordicMain\\Dongle_BTLE\\VisualGDB\\Debug\\Dongle_BTLE…”
    ~”done.\n”
    ~”GNU gdb (GDB) 7.12\n”
    ~”Copyright (C) 2016 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \”show copying\”\nand \”show warranty\” for details.\n”

    ~”This GDB was configured as \”–host=i686-pc-mingw32 –target=arm-eabi\”.\nType \”show configuration\” for configuration details.”

    ~”\nFor bug reporting instructions, please see:\n”
    ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/&gt;.\n”

    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”.\n”
    ^done
    -list-features
    ^done,features=[“frozen-varobjs”,”pending-breakpoints”,”thread-info”,”data-read-memory-bytes”,”breakpoint-notifications”,”ada-task-info”,”language-option”,”info-gdb-mi-command”,”undefined-command-error-code”,”exec-run-start-option”]
    -gdb-set disassembly-flavor intel
    ^error,msg=”No symbol \”disassembly\” in current context.”
    -gdb-set print demangle off
    ^done
    -break-insert -f main
    ^done,bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”0x0002745c”,func=”main”,file=”C:/srcroot/NordicMain/nRF51_SDK_9.0.0_2e23562/examples/ble_central/ble_connectivity/main.c”,fullname=”C:\\srcroot\\NordicMain\\nRF51_SDK_9.0.0_2e23562\\examples\\ble_central\\ble_connectivity\\main.c”,line=”131″,thread-groups=[“i1″],times=”0″,original-location=”main”}
    -data-evaluate-expression “sizeof(void *)”
    ^done,value=”4″
    -data-evaluate-expression “sizeof(int)”
    ^done,value=”4″
    -data-evaluate-expression “sizeof(short)”
    ^done,value=”2″
    -data-evaluate-expression “sizeof(long)”
    ^done,value=”4″
    -data-evaluate-expression “sizeof(long long)”
    ^done,value=”8″
    -data-evaluate-expression “sizeof(char)”
    ^done,value=”1″
    -data-evaluate-expression “sizeof(wchar_t)”
    ^done,value=”4″
    -data-evaluate-expression “sizeof(float)”
    ^done,value=”4″
    -data-evaluate-expression “sizeof(double)”
    ^done,value=”8″
    -data-evaluate-expression “sizeof(long double)”
    ^done,value=”8″
    info target
    &”info target\n”
    ~”Symbols from \”C:\\srcroot\\NordicMain\\Dongle_BTLE\\VisualGDB\\Debug\\Dongle_BTLE\”.\n”
    ~”Local exec file:\n”
    ~”\t`C:\\srcroot\\NordicMain\\Dongle_BTLE\\VisualGDB\\Debug\\Dongle_BTLE’, file type elf32-littlearm.\n”
    ~”\tEntry point: 0x272dc\n”
    ~”\t0x0001c000 – 0x00028140 is .text\n”
    ~”\t0x00028140 – 0x00028148 is .ARM.exidx\n”
    ~”\t0x20002800 – 0x20002880 is .data\n”
    ~”\t0x20002880 – 0x200037ec is .bss\n”
    ^done
    -data-evaluate-expression “&_estack”
    ^error,msg=”No symbol \”_estack\” in current context.”
    -data-evaluate-expression “&__StackLimit”
    ^done,value=”0x20003800 <error: Cannot access memory at address 0x20003800>”
    -var-create – * “*((void **)0x200037fc)”
    ^done,name=”var1″,numchild=”0″,value=””,type=”void *”,has_more=”0″
    -var-evaluate-expression “var1″
    ^done,value=””
    -exec-continue
    ^error,msg=”The program is not being run.”

    #11998

    support
    Keymaster

    Hi,

    It looks like the debug method package is not working properly. Please try re-downloading the VisualGDB 5.3 Preview 5 installer and re-installing it; then ensure you have the latest Segger debug package via Tools->VisualGDB->Manage VisualGDB Packages.

    If nothing helps, please make a screenshot of the Debug Settings page in your VisualGDB Project Properties and attach it here. This should help understand what is causing this.

    #11999

    erasmus
    Participant

    Creating an example from scratch now (e.g. – blinky) Also fails now in the same way as above. This is After uninstalling and reinstalling toolchain (latest from VGDB), VGDB, segger jlink tools. Also VS2015 and Visual GDB 5.3.5.1707.

    #12000

    support
    Keymaster

    Hi,

    Thanks, we have just rechecked Preview 5 and the latest Segger package and could not reproduce any problem. Please post a screenshot of the Debug Settings page of your VisualGDB Project Properties or the Debug Settings page of the Embedded Project Wizard so that we could check for common errors.

    #12001

    erasmus
    Participant

    Here are some screen shots from recently created blinky(BSP) example. We did this example several times when evaluating VGDB. Has always worked perfectly – until now. This is exactly the same error we see in our real projects now.

    Attachments:
    You must be logged in to view attached files.
    #12006

    erasmus
    Participant

    and one more of advanced GDB settings. These are defaults like we always use…

    Attachments:
    You must be logged in to view attached files.
    #12008

    support
    Keymaster

    Hi,

    Thank you for the screenshots, however looks like you missed the “Debug Settings” page (#4 on your screenshots) that contains the relevant settings that should explain what is going on. Please post it as well.

    #12009

    erasmus
    Participant

    Here it is…

    Attachments:
    You must be logged in to view attached files.
    #12011

    erasmus
    Participant

    And complete GDB log for the blinky example

    (gdb begin)
    VisualGDB is licensed to Jimmy Leo
    C:\tools\arm-eabi\bin\arm-eabi-gdb.exe –interpreter mi C:\vsProj\fixGDB2\VisualGDB\Debug\fixGDB2
    -gdb-version
    =thread-group-added,id=”i1″
    ~”GNU gdb (GDB) 7.12\n”
    ~”Copyright (C) 2016 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \”show copying\”\nand \”show warranty\” for details.\n”

    ~”This GDB was configured as \”–host=i686-pc-mingw32 –target=arm-eabi\”.\nType \”show configuration\” for configuration details.”

    ~”\nFor bug reporting instructions, please see:\n”
    ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/&gt;.\n”

    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”…\n”
    ~”Reading symbols from C:\\vsProj\\fixGDB2\\VisualGDB\\Debug\\fixGDB2…”
    ~”done.\n”
    ~”GNU gdb (GDB) 7.12\n”
    ~”Copyright (C) 2016 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \”show copying\”\nand \”show warranty\” for details.\n”

    ~”This GDB was configured as \”–host=i686-pc-mingw32 –target=arm-eabi\”.\nType \”show configuration\” for configuration details.”

    ~”\nFor bug reporting instructions, please see:\n”
    ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/&gt;.\n”

    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”.\n”
    ^done
    -list-features
    ^done,features=[“frozen-varobjs”,”pending-breakpoints”,”thread-info”,”data-read-memory-bytes”,”breakpoint-notifications”,”ada-task-info”,”language-option”,”info-gdb-mi-command”,”undefined-command-error-code”,”exec-run-start-option”]
    -gdb-set disassembly-flavor intel
    ^error,msg=”No symbol \”disassembly\” in current context.”
    -gdb-set print demangle off
    ^done
    -break-insert -f main
    ^done,bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”0x0001b2aa”,func=”main()”,file=”LEDBlink.cpp”,fullname=”c:\\vsProj\\fixGDB2\\LEDBlink.cpp”,line=”20″,thread-groups=[“i1″],times=”0″,original-location=”main”}
    -data-evaluate-expression “sizeof(void *)”
    ^done,value=”4″
    -data-evaluate-expression “sizeof(int)”
    ^done,value=”4″
    -data-evaluate-expression “sizeof(short)”
    ^done,value=”2″
    -data-evaluate-expression “sizeof(long)”
    ^done,value=”4″
    -data-evaluate-expression “sizeof(long long)”
    ^done,value=”8″
    -data-evaluate-expression “sizeof(char)”
    ^done,value=”1″
    -data-evaluate-expression “sizeof(wchar_t)”
    ^error,msg=”No symbol \”wchar_t\” in current context.”
    -data-evaluate-expression “sizeof(float)”
    ^done,value=”4″
    -data-evaluate-expression “sizeof(double)”
    ^done,value=”8″
    -data-evaluate-expression “sizeof(long double)”
    ^done,value=”8″
    info target
    &”info target\n”
    ~”Symbols from \”C:\\vsProj\\fixGDB2\\VisualGDB\\Debug\\fixGDB2\”.\n”
    ~”Local exec file:\n”
    ~”\t`C:\\vsProj\\fixGDB2\\VisualGDB\\Debug\\fixGDB2′, file type elf32-littlearm.\n”
    ~”\tEntry point: 0x1b5ec\n”
    ~”\t0x00000000 – 0x0001b000 is .softdevice\n”
    ~”\t0x20000000 – 0x20001fe8 is .softdevice_sram\n”
    ~”\t0x0001b000 – 0x0001b0c0 is .isr_vector\n”
    ~”\t0x0001b0c0 – 0x0001c408 is .text\n”
    ~”\t0x0001c408 – 0x0001c40c is .init_array\n”
    ~”\t0x0001c40c – 0x0001c410 is .fini_array\n”
    ~”\t0x20001fe8 – 0x20001fec is .data\n”
    ~”\t0x20001fec – 0x20002074 is .bss\n”
    ^done
    -data-evaluate-expression “&_estack”
    ^done,value=”0x20004000 <error: Cannot access memory at address 0x20004000>”
    -var-create – * “*((void **)0x20003ffc)”
    ^done,name=”var1″,numchild=”0″,value=””,type=”void *”,has_more=”0″
    -var-evaluate-expression “var1″
    ^done,value=””
    -exec-continue

    #12012

    support
    Keymaster

    Hi,

    Thanks, it looks like the debug plugin failed to load. Please try deleting the %LOCALAPPDATA%\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.segger-dmsp folder, restarting Visual Studio and creating a new project from scratch. VisualGDB should re-download the plugin. If it does not solve the problem, please check that the %LOCALAPPDATA%\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.segger-dmsp\SeggerEDP.dll file is present. If not, please check your antivirus logs, it might be removing the DLL during the installation.

Viewing 15 posts - 16 through 30 (of 47 total)

You must be logged in to reply to this topic.