Hello,
I recently upgraded my mps430 toolchain to 4.1.0.0 from 3.2.2.0. I'm seeing some rather strange issues. I'd post a bug on the Bugzilla myself, but I'm not entirely sure what's happening with some of these issues.
1. DWARF error, mangled line number section
When an executable is linked with :
/opt/ti/msp430/gcc/bin/msp430-elf-gcc -Wl,--gc-sections -Wl,--gc-sections -mmcu=msp430f5529 -Wl,-Map,firmware-msp430f5529.map -T /opt/ti/msp430/gcc/include/msp430f5529.ld CMakeFiles/firmware-msp430f5529.elf.dir/main.c.obj -o firmware-msp430f5529.elf -L/opt/ti/msp430/gcc/include <other library object files to be linked>
Both the resulting commands result in a bunch of DWARF errors :
msp430-elf-nm -l -a -S -s --size-sort firmware-msp430f5529.elf > firmware-msp430f5529.sym
msp430-elf-objdump -h -S firmware-msp430f5529.elf > firmware-msp430f5529.lst
/opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section. /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section (bad file number). /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section (bad file number). /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section (bad file number). /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section (bad file number). /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section (bad file number). /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: mangled line number section (bad file number).
This is also discussed in the later conversation between Orlando Arias and Nick Clifton in bugzilla bug 17940. The strange part, however, is that precisely the same sources, using precisely the same build system and methods and commands, does _NOT_ result in these errors for MSP430F5521. Additionally, changing the linker script (msp430f5529.ld) as discussed there seems to fix the issue:
in msp430f5529.ld ... /*.debug_line 0 : { *(.debug_line) } */ .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) } ...
However, msp430f5521.ld also has the same apparant problem. The error just doesn't seem to show up for it :
in msp430f5521.ld: .. .debug 0 : { *(.debug) } ..
2. The following commands both produce DWARF errors. This seems to be a known issue.
$ msp430-elf-objdump -h -D -f -l -S -a libhal-uc-uart-msp430f5529.a > hal-uc-uart-msp430f5529.s /opt/ti/msp430/gcc/bin/msp430-elf-objdump: Dwarf Error: Line info data is bigger (0xfffffffc) than the section (0x22a) /opt/ti/msp430/gcc/bin/msp430-elf-objdump: Dwarf Error: Line info data is bigger (0xfffffffc) than the section (0x142) $ msp430-elf-nm -l -a -S -s --size-sort libhal-uc-uart-msp430f5529.a > hal-uc-uart-msp430f5529.sym /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: Line info data is bigger (0xfffffffc) than the section (0x22a) /opt/ti/msp430/gcc/bin/msp430-elf-nm: Dwarf Error: Line info data is bigger (0xfffffffc) than the section (0x142)
Are there plans to fix this in the 'official' tools at some point?