This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Command-line GDB startup .gdbinit

Ole Morten has suggested using command-line GDB in a number of postings on this forum. Accordingly, I've tried to do that but always getting the following error ("Cannot find bounds of current function") on startup.

$ arm-none-eabi-gdb.exe tmp_gcc_s110_xxaa.out GNU gdb (GNU Tools for ARM Embedded Processors) 7.4.1.20130913-cvs Copyright (C) 2012 Free Software Foundation, Inc. This GDB was configured as "--host=i586-mingw32 --target=arm-none-eabi". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... 0x00012b98 in ?? () Flash download enabled Selecting device: nrf51822 Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal] No symbol table is loaded. Use the "file" command. Target interface speed set to 1000 kHz Target endianess set to "little endian" Resets core & peripherals via SYSRESETREQ & VECTRESET bit. Reading symbols from C:\Nordic Semiconductor\nrf51_sdk_v5_1_0_36092\nrf51822\Board\nrf6310\s110\tmp\gcc_build/tmp_gcc_s110_xxaa.out...done. (gdb) l 1482 } 1483 1484 1485 /**@brief Function for application main entry. 1486 */ 1487 int main(void) 1488 { 1489 // Initialize. 1490 leds_init(); 1491 timers_init(); (gdb) n (gdb) Cannot find bounds of current function

My .gdbinit file contains the following:

target remote localhost:2331 monitor flash download = 1 monitor flash device = nrf51822 break main mon speed 1000 mon endian little mon reset 0

Does anyone know how to get command-line GDB to work? Does my .gdbinit contain the correct startup sequence? Thanks

Parents
  • You can actually just remove everything from your.gdbinit except for target remote localhost:2331, as long as you make sure to configure the GDB server correctly when starting it (i.e. choose device, interface, speed).

    As for your exact problem, could it be that the chip is running the wrong code? Have you tried doing a load and a mon reset, and then continue? Also, are you sure you have the softdevice on the chip?

    Even though you're apparently on Windows, you may have use in taking a look at my private GitHub repository here, which I'm using on Linux for personal development. This includes a target to start gdb, which as far as I've seen works nicely, and in principle the same should be doable on Windows.

Reply
  • You can actually just remove everything from your.gdbinit except for target remote localhost:2331, as long as you make sure to configure the GDB server correctly when starting it (i.e. choose device, interface, speed).

    As for your exact problem, could it be that the chip is running the wrong code? Have you tried doing a load and a mon reset, and then continue? Also, are you sure you have the softdevice on the chip?

    Even though you're apparently on Windows, you may have use in taking a look at my private GitHub repository here, which I'm using on Linux for personal development. This includes a target to start gdb, which as far as I've seen works nicely, and in principle the same should be doable on Windows.

Children
No Data
Related