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

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

Re: [avr-gcc-list] Boot loaders


From: Larry Barello
Subject: Re: [avr-gcc-list] Boot loaders
Date: Mon, 9 Jun 2003 10:03:22 -0700

Well, I got it to work (finally could connect to www.gnu.org - it must have been down last night - and read the linker script section) but it is a total hack and wish there was a better way.  It would also be nice if the resulting HEX file were not 90% 0xFF...  Here is what I did:
 
Hacked avr5.x
...
    *(.fini0)  /* Infinite loop after program termination.  */
    . = 0x1F000;  /* Force boot loader load address  */
    *(BootLoader)
     _etext = . ;
  } > text = 0xFF
Another question: It used to be that a simple .func/.global would do to get debug information on an Assembly code file.  Now I have no information at all.  It seems almost random whether a lable ends up in the symbols or not.  It makes debugging assembly stuff sort of hard.  What does one do to get debug information for assembly code into the COF files?
 
Cheers!
----- Original Message -----
From: Reza Naima
Sent: Monday, June 09, 2003 3:19 AM
Subject: Re: [avr-gcc-list] Boot loaders

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.

Reza

reply via email to

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