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.

Debugging CCS ELF files with msp430-gdb

Hello folks,

I'm trying to use msp430-gdb to debug CCS ELF files but I get the following error message:

$ msp430-objdump --section-headers i2c_slave.out 
msp430-objdump: i2c_slave.out: File format not recognized

I've tried messing around with the extensions (.exe, .elf) but nothing worked.

My next thought was that I was supposed to use the MSPGCC toolchain instead of the TI one. Unfortunately, I hit the following build error:

Description	Resource	Path	Location	Type
i2c_slave.out section `.data' will not fit in region `RAM'	i2c_slave		 	C/C++ Problem
gmake: Target `all' not remade because of errors.	i2c_slave		 	C/C++ Problem
gmake: *** [i2c_slave.out] Error 1	i2c_slave		 	C/C++ Problem
region `RAM' overflowed by 24 bytes	i2c_slave		 	C/C++ Problem

I find it hard to believe that I'm overflowing RAM by 24 bytes given that I'm just trying to build the sample code. Any ideas why this is happening? I tried messing around with the optimization flags as well but there was no difference.

(Also, I suspect the first question about the msp430-gdb failure isn't supported by this forum but the second one should be right?)

  • Ram overflow may happen easily when the there are functions from external libraries are used, which may use different amounts of ram for different compilers. Also, functions may be concatenated in a library and separate in another, so code size can differ greatly too.
    Also, are you sure you picked the correct target? A small typo may pick the linker script for an almost identical MSP with only half the ram size.

**Attention** This is a public forum