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.

Breakpoints in GDB with MSP432P401R board

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

  • I figured out how to use software breakpoints. It looks like I was trying to set breakpoints in code that was being loaded into the Flash memory of the MSP432. Using the files here: forum.43oh.com/.../ I was able to move functions to RAM and use software breakpoints.

    It would be nice to use the hardware breakpoints though.

    Exception trying to set hwbp (address=0x10000f0): Error enabling this function: There is no AET resource to support this job.

    Any ideas on where I might look? I found a post (e2e.ti.com/.../335425) by Ki-Soo Lee that suggests I my debugger might be using all these AET resources for itself. How do I turn this stuff off in GDB?
  • 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.
    

  • Ben,
    Thank you for posting the information regarding the software breakpoints. I will ask for some help from the tools team to provide some guidance on the HW breakpoints.

    Thanks and Regards,
    Chris
  • Ben,
    Some DLL are missing from the standalone package. A bug has been filed but I do not have a timeline on the resolution.

    Best Regards,
    Chris
  • Any updates on this?  Im having the same exact issue.

  • Paulo,
    I do not have an update other than the issue has been resolved. I will be notified when this is released and update this thread. Thank you for your patience.

    Regards,
    Chris
  • Thanks for following up, Chris!

**Attention** This is a public forum