On 23.10.13 12:32, Dhakshinamoorthy, Soundararajan wrote: > I will give a try in implementing the idea of having a separate > configuration file for each device in lib/defs, that could be used to > parameterize the linker script. But that implies cascading the mmcu > parameter to avr-ld ?
Yup - passed on essentially transparently as received on the avr-gcc command line, with only a constant prefix. Point 2 of the upthread proposal suggests prepending enough relative pathname to specify the "separate configuration file" dropped into lib/defs. (That allows automatic avr-ld behaviour to do the rest.) When avr-ld encounters e.g. lib/defs/atmega12345 on its command line, then (from man ld): » If the linker cannot recognize the format of an object file, it will assume that it is a linker script. A script specified in this way augments the main linker script used for the link (either the default linker script or the one specified by using -T). « Thus a legal linker script line like: __boot_start = 0x12345 ; in lib/defs/atmega12345 will augment the linker script which is already being invoked, so that if the main script contains: .boot __boot_start : { *(.boot_vectors) *(.boot) } > text then the desired location should take effect. (And any future similar customisations can be dropped into the already existing configuration file. If there are any hiccups, then please post. (Well, please post anyway. :-) Erik -- You can't have everything. Where would you put it? - Steven Wright _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-gcc-list