[Top][All Lists]

[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: Christian Ludlam
Subject: Re: [avr-libc-dev] Defining available flash area if bootloader is used
Date: Sun, 19 Jan 2003 16:26:48 +0000
User-agent: POPstar/2.02

On 19 Jan 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).
> The bootloader should check the address being programmed and refuse
> to overwrite itself, then you will see that the program is too big.

AIUI, avr-size only displays the size of the object files. It would be nice
to have a program which would check the sizes and give an error it the
program gets too big - then you could stick this in a Makefile and forget
about it.

Is there a program which can do this?

Christian Ludlam

reply via email to

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