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

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

Re: [avr-gcc-list] Modifying compiler output to suit Tiny13 bootloader


From: Stefan Ernst
Subject: Re: [avr-gcc-list] Modifying compiler output to suit Tiny13 bootloader
Date: Mon, 26 Oct 2009 09:43:37 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

David Carr wrote:
I wrote a very simple C program and looked at the assembly output produced by avr-gcc. The first line is:

00000000 <__vectors>:
  0:   10 c0           rjmp    .+32            ; 0x22 <__ctors_end>

My bootloader lives in the last 192 bytes of flash, so I'd like to replace this instruction (at address 0) with an rjmp to that location. Where/how does this line get generated?

1) Why you don't simply let the bootloader replace the first two
bytes when flashing the application?

2) How does the bootloader start the app? The address of __ctors_end is
not fixed. E.g. it changes if the app uses PROGMEM. So the bootloader
needs to know where the original jump was going to. Isn't this another
reason for not changing the code generation, but to handle it in the
bootloader?




reply via email to

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