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?


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to