I am trying to write an interrupt-driven bootloader. I plan to have ISRs for the UART (send and receive), and for SPM ready. I have read the avr-libc documentation on avr/interrupt.h and avr/boot.h, and I've also read the AVR documentation on bootloader support, but there are a few things I am still not sure about.
1) I am aware that the IVSEL bit is used to "move" the interrupt vector table from the application to the bootloader. Does this mean that I can have seperate ISRs for the same interrupt (e.g., have a UART receive ISR for the application and a seperate UART receive ISR in the bootloader)?
2) How do I tell avr-gcc that I want my ISR in the bootloader section? Simply adding the BOOTLOADER_SECTION macro to the end of the ISR declaration creates an error. I don't want my ISR to be erased during application re-programming!
Thanks in advance.