Hi Johannes,

Whoops - sending to the list this time.

On Mon, May 10, 2010 at 6:34 AM, Johannes Bauer <jb....@gmx.de> wrote:
> Hello list,
>
> when relocating data into the flash, this works nicely using the PROGMEM
> attribute. However, when trying to relocate data into the bootloader
> section of the flash by using
>
> __attribute__ ((section(".bootloader")))
>
> this does still relocate the data into the non-bootloader flash section
> (although it works perfectly for functions). What must I do to force
> data into the bootloader?

The data section itself has to be located in RAM, or are you talking
about the initial value of the data section which is copied to RAM?

In my bootloaders, I link with the following command line:

-Wl,--section-start=.text=$(BOOT_START),-e,boot,--defsym,zero_addr=0 -nostdlib

where BOOT_START is the byte address of the start of the bootloader
(word address from the data sheet * 2), and boot is my entry point
symbol. The actual entry point is determined by your reset vector.

Since this relocates the .text section, the load address of the .data
section automatically updates as well.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to