avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] Defining available flash area if bootloader is used


From: Volkmar Dierkes
Subject: Re: [avr-libc-dev] Defining available flash area if bootloader is used
Date: Sun, 19 Jan 2003 17:45:13 +0100
User-agent: 40tude_Dialog/2.0.3.1 Hamster/2.0.0.0

Marek,

On Sun, 19 Jan 2003 17:18:12 +0100 (CET), Marek Michalkiewicz wrote:

>> I am using a bootloader on my mega8, which works very well. Now I am 
>> implementing a small application. The linker stops if the 
>> application area is not big enough for the program. That's ok, but 
>> with the bootloader is the application area smaller than without. 
>> How can I define the available flash area for the application?
>
> The only reliable way (with boot loader, or without) is to check
> the map file or output of avr-size (text + data size must fit within
> available flash size, and the linker only checks text size, so this
> is not reliable: if the text section alone will fit, but text + data
> will not, the linker won't complain, but the application won't work
> as there is not enough room in the flash for all initialized data).

Thanks for the information, I forgot that I have to add the data 
segment to the text segment. In this case you are right, it does not 
make sense that the linker look only at the text segment size.
 
> The bootloader should check the address being programmed and refuse
> to overwrite itself, then you will see that the program is too big.

Yes, I have such a check/error integrated in my bootloader. But it 
would be fine to get the information before trying to load it via 
the bootloader ;-) However, it is not a big problem.

Volkmar




reply via email to

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