Hi Guys, I am applying the patch below to add a couple of minor tweaks to the msp430.h header file. The first is to pass the -md command line option to the assembler, to enable the copying of data from ROM to RAM. (This is a code size optimization. The assembler and linker conspire to detect when the .data section is empty and, if it is, the code to perform the copying is omitted from crt0.o. The -md command line option enables this feature).
The other tweak is to define ASM_DECLARE_FUNCTION_NAME so that msp430_start_function can provide some annotations describing the function in the assembler output. This is mainly for debugging purposes. Cheers Nick gcc/ChangeLog 2013-09-18 Nick Clifton <ni...@redhat.com> * config/msp430/msp430.h (ASM_SPEC): Pass -md on to the assembler. (ASM_DECLARE_FUNCTION_NAME): Define. Index: gcc/config/msp430/msp430.h =================================================================== --- gcc/config/msp430/msp430.h (revision 202680) +++ gcc/config/msp430/msp430.h (working copy) @@ -54,6 +54,7 @@ "%{mmcu=msp430x:-mmcu=msp430X;mmcu=*:-mmcu=%*} " /* Pass the MCU type on to the assembler. */ \ "%{mrelax=-mQ} " /* Pass the relax option on to the assembler. */ \ "%{mlarge:-ml} " /* Tell the assembler if we are building for the LARGE pointer model. */ \ + "%{!msim:-md} %{msim:%{mlarge:-md}}" /* Copy data from ROM to RAM if necessary. */ \ "%{ffunction-sections:-gdwarf-sections}" /* If function sections are being created then create DWARF line number sections as well. */ /* Enable linker section garbage collection by default, unless we @@ -399,3 +400,7 @@ ) #define ACCUMULATE_OUTGOING_ARGS 1 + +#undef ASM_DECLARE_FUNCTION_NAME +#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ + msp430_start_function ((FILE), (NAME), (DECL))