Hi,
I have been struggling to get stepping to work with the open source toolchain (GCC + GDB) for the MSP432 with C++. I am using the currently latest version of MSPGCC (1_01_00_01) with the bundled XDS emulation package running under Fedora Linux. I have tried the provided examples from the MSPGCC package and they are working flawlessly (I can use hardware breakpoints & stepping instructions). However when running a program written in C++, I can still use hardware breakpoints but stepping no longer works. GDB produces the following output when using the next command (after loading the program and resetting the CPU):
(gdb) next
Single stepping until exit from function __do_global_dtors_aux,
which has no line number information.
Warning:
Cannot insert breakpoint -7.
Cannot access memory at address 0x7674
With the accompanying output from gdb-agent-console:
FAILED! GTI_SETBP_EX(hpid=0x245df50,addr=0x7674,type=0,count=1,access=0)=ffffffff
(Error -1066 @ 0x7674)
Unable to set/clear requested breakpoint. Verify that the breakpoint address is in valid memory.
(Emulation package 6.0.407.3)
ERROR: set_breakpoint() backend call returned 64
Since this looks like an issue with the code being in Flash and not in SRAM, I am using the same system initialization routine as in the provided C examples, so in theory the Code should be copied from Flash to SRAM. To be precise, I am using the following Reset_Handler():
void Reset_Handler() { // Call system initialization routine SystemInit(); // Jump to the main initialization routine. _mainCRTStartup(); }
where SystemInit() is a function defined in an extern "C" block, as is the function main().
Thanks in advance for any suggestions,
Dan