This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I'm trying to get GDB working in Linux (Ubuntu 14.04) with the MSP432P401R board using the instructions in SLAU688 -- GCC ARM Embedded Toolchain for MSP432 MCUs.
I can build the blinking light example using gcc, I can attach to the device using the gdb agent from the XDS software package (processors.wiki.ti.com/.../XDS_Emulation_Software_Package), and I can run the code successfully.
However, I'm unable to set and use breakpoints.
This is what the GDB terminal looks like:
(gdb) monitor reset CPU has been reset (gdb) break main Breakpoint 1 at 0x4ea: file msp432p401_cs.c, line 88. (gdb) c Continuing. Warning: Cannot insert breakpoint 1. Cannot access memory at address 0x4ea
This is what the GDB-agent terminal looks like:
Successfully configured xds110_msp432_jtag.dat CPU Name Port -------- ---- cortex_m4_0 :55000 Starting all cores CPU Name Status -------- ------ cortex_m4_0 Waiting for client cortex_m4_0 Client connected...Connecting to Target cortex_m4_0 - Processor type =CORTEX_MXX (Little endian) cortex_m4_0 - Target device is connected Unable to load libctools.so, Hardware breakpoints not available. Target connected...Starting server FAILED! GTI_SETBP_EX(hpid=0x8c40e38,addr=0x4ea,type=0,count=1,access=0)=ffffffff (Error -1066 @ 0x4EA) Unable to set/clear requested breakpoint. Verify that the breakpoint address is in valid memory. (Emulation package 6.0.228.0) ERROR: set_breakpoint() backend call returned 64
I noticed the line about unable to load libctools.so, so I also tried taking a copy of libctools.so from a CCS install and making it available to this process (from information here: e2e.ti.com/.../456749).
This is what the GDB-agent terminal looks like if I include the libctools from CCS in my LD_LIBRARY_PATH:
Successfully configured xds110_msp432_jtag.dat CPU Name Port -------- ---- cortex_m4_0 :55000 Starting all cores CPU Name Status -------- ------ cortex_m4_0 Waiting for client cortex_m4_0 Client connected...Connecting to Target cortex_m4_0 - Processor type =CORTEX_MXX (Little endian) cortex_m4_0 - Target device is connected Target connected...Starting server FAILED! GTI_SETBP_EX(hpid=0x8dd9e38,addr=0x4ea,type=0,count=1,access=0)=ffffffff (Error -1066 @ 0x4EA) Unable to set/clear requested breakpoint. Verify that the breakpoint address is in valid memory. (Emulation package 6.0.228.0) ERROR: set_breakpoint() backend call returned 64
My gcc is version 5.3.1 20160307 (from launchpad.net/gcc-arm-embedded) and my gdb is 7.10.1.20160210-cvs.
Any ideas? Debugging works inside CCS, I'd just much rather use the command line tools if I possible.
Thanks!
Ben
Let me clarify, I also figured out that I should be using 'hbreak' instead of 'break' to set hardware breakpoints.
The full output of the GDB agent when setting a hardware breakpoint is:
Successfully configured xds110_msp432_jtag.dat CPU Name Port -------- ---- cortex_m4_0 :55000 Starting all cores CPU Name Status -------- ------ cortex_m4_0 Waiting for client cortex_m4_0 Client connected...Connecting to Target cortex_m4_0 - Processor type =CORTEX_MXX (Little endian) cortex_m4_0 - Target device is connected Target connected...Starting server Exception trying to set hwbp (address=0x10000f0): Error enabling this function: There is no AET resource to support this job. ERROR: set_breakpoint() backend call returned 1
GDB says:
(gdb) hbreak 82 Hardware assisted breakpoint 1 at 0x10000f0: file main.c, line 82. (gdb) c Continuing. Warning: Cannot insert hardware breakpoint 1. Could not insert hardware breakpoints: You may have requested too many hardware breakpoints/watchpoints.
The update is now available.
http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP432GCC/latest/index_FDS.html
Regards,
Chris
**Attention** This is a public forum