Hi Chris! Chris Liechti wrote on 20/01/08 17:33 MET: > Friedrich Lobenstock schrieb: >> Which file in the gcc source tells gcc which sections should get which >> flags per default? > > the linker scripts? > e.g. /opt/mspgcc/msp430/lib/ldscripts/msp430x149.x
Thanks. Using the OpenSuSE Crosstools (=MSPGCC) for MSP430 those files are at "/opt/cross/msp430/lib/ldscripts" How do I update the flags for a specific section? I don't see where the flags are set. Currently I'm looking at msp430x2121.x In the future I will need to find out how I can update the Repository at <http://download.opensuse.org/repositories/CrossToolchain:/msp430/> to incorporate the patches for the msp430F2013 and msp430F2274. > and you were looking at msp430-jtag. do you think it looks at the wrong > flags to decide whether a section needs to be programmed or not, or is > it correct? What I found is that GCC does not set the "ALLOC" Flag when assembling. msp430-objcopy as well does not copy a section to eg. Intel-HEX when the "ALLOC" flag of that section is not set. msp430-readelf -S testprogram There are 6 section headers, starting at offset 0xbc: Section Headers: [Nr] Name Type ~ Flg Lk Inf Al [ 0] NULL ~ 0 0 0 [ 1] .text PROGBITS ~ AX 0 0 1 [ 2] .vectors PROGBITS ~ 0 0 1 [ 3] .shstrtab STRTAB ~ 0 0 1 [ 4] .symtab SYMTAB ~ 5 10 4 [ 5] .strtab STRTAB ~ 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific) Either msp430-objcopy and msp430-jtag should be looking for the section type PROGBITS or we should add the "ALLOC" flag to the .vectors section per default. > it always worked well for me. and it looks like the compiler uses the > correct flags as the interrupts are no problem when using msp430-gcc to > link C code. I'm currently using assembler only - doing my first steps on MSP430 with an EZ430-F2013 (USB Stick). Maybe it will work for C/C++ but I did not have time yet to try that. See <ftp://ftp.fl.priv.at/pub/msp430/ez430/demo> for the code and the makefile used. -- MfG / Regards Friedrich Lobenstock
