avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Relocate Data into bootloader-Section


From: Dave Hylands
Subject: Re: [avr-gcc-list] Relocate Data into bootloader-Section
Date: Mon, 10 May 2010 07:22:14 -0700

Hi Johannes,

Whoops - sending to the list this time.

On Mon, May 10, 2010 at 6:34 AM, Johannes Bauer <address@hidden> 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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]