[Top][All Lists]

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

Re: [avr-gcc-list] Boot loaders

From: Reza Naima
Subject: Re: [avr-gcc-list] Boot loaders
Date: Mon, 09 Jun 2003 03:19:06 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030507

I was able to write bootloader code without modifying the linker script (unless it already knows about '.bootloader').  I used the section attribute to label it in the header file, and used the --section-start gcc parameter.  What I wasn't doing that was causing me trouble was using my avr-objcopy, specifying  the text and data sections, but not the bootlaoder section to be copied to the output file.  If you look in your elf/lst file, is the bootloader code in it?   I'm planning on doing some code cleanup and posting my code... It works fine, but it takes 2 to 3 attemps before it syncs up with the PC-based bootloader code.  I'll try to get it up in the next day or two and post a link to it.


Larry Barello wrote:
Yeah, I forgot about the linker script modification.  Yuk.  I wish there was a more
straightforward way to do this than hacking the system scripts.  Now to dig around the
archives and find that email detailing how to do this.

Thanks for the reminder.

I reviewed what I am trying to do and I think keeping the vector tables where they
default to makes sense.  My boot code won't use interrupts - just hard loops & polling
for data.  If I change my mind, it is easy enough to put in a partial vector table at
the beginning of my boot code.

----- Original Message ----- 
From: "Tyler Hall" <address@hidden>
To: "Larry Barello" <address@hidden>; "AVR GCC List" <address@hidden>
Sent: Sunday, June 08, 2003 7:42 PM
Subject: Re: [avr-gcc-list] Boot loaders

You have to modify the linker script and add your new
section name to the list of sections that go into the
"code" memory space.

The default linker script describes a lot of object
sections and what target sections they go in, but your
new one isn't described. The linker will happily
relocate the bootloader section, but since you didn't
tell it to _also_ toss it into .text it will get
thrown away.


avr-gcc-list mailing list

reply via email to

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