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

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

Re: [avr-gcc-list] Bootloader suggestions


From: Volkmar Dierkes
Subject: Re: [avr-gcc-list] Bootloader suggestions
Date: Fri, 21 Mar 2003 22:04:09 +0100
User-agent: 40tude_Dialog/2.0.3.1 Hamster/2.0.0.1

On Thu, 20 Mar 2003 10:27:17 +1200, Ralph Mason wrote:

> I have seen about using a bootloader section and passing this to the linker
> for a given function - but how Do I go about making a whole application a
> boot loader?  How do it tell the linker that this is the function that
> should be at the start address and that all other functions in the
> bootloader should follow that,

As the bootloader is a complete application, and you have no other 
applications in this code, you can get it to a higher address by 
using the --section-start option for the linker, like this in the 
makefile:
        LDFLAGS = -Wl,-Map=$(TARGET).map,--cref,--section-start=.text=0x1F000

There is no other action on the compilere necessary (but use the 
correct address ;-)

At the mega128 you need to set the BRST fuse to let the mcu start at 
the bootloader. If you want to use interrupts, you have to set the 
desired fuse too.


Now I've read the section "7.3.18 How do I relocate code to a fixed 
address?" in TFM of WinAVR again, and I understand why you ask this. 
There is the explanation missing which is used as the entry point. 
Maybe someone can give a more detailed description to that issue. I 
do not have any experience with that :-(

But with my proposal you didn't have that problem. And if you are 
using interrupts, this is no problem too. But in this case the best 
to jump to your application is to do a watchdog reset.


>  Finally how can I fix the addresses of my
> data tables (so they fill the last 1k of flash space).

That's defined at "7.3.18 How do I relocate code to a fixed 
address?" as I mentioned above.

Volkmar


reply via email to

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