Well, I took a different approach. Microchip is having the bootloader reprogram the reset vector and the interrupt vector table. As I recall, the 24H series lets you write protect a boot section that starts at 0. So, if your bootloader is going to write stuff down at 0, besides overwriting the reset vector (sounds like a bad idea to me), it could overwrite the bootloader itself, since you will not be able to write protect that. What I did is to put the bootloader from 0x200 to 0x7ff. There is a goto the start of my application at 0x800. Right above that is a jump table for all the interrputs, whether I'm using them or not. The reset vector points to my bootloader, which checks a switch. If the switch is not closed, we go to 0x800, then to the start of the application. Everything below 0x800 is write protected. The bootloader I currently have in two products using the 24H does bootloading over Ethernet. Using an HTTP POST, the hex file for the application (addresses 0x800 and above) is sent to the PIC. It is parsed by the PIC and stored in external SPI flash. After the whole file is received without error, the bootload code in the boot section is called. Note that when the boot section is write protected, only the first few addresses (I think it's 32) in the section can be reached by a goto from another section. So, there's a goto in these early addresses that points to the actual code in the boot section. Also, interrupts are strange when executing in a secure segment, so I disable them. Anyway, once I have the code in SPI flash, I copy it to PIC flash using the code in the boot section of the PIC. In the unlikely event that this fails (perhaps bad code sent to the SPI flash), the user can hold a switch on power-up that copies the original code from SPI flash back to the PIC. During production, the PIC code that was loaded is copied out to SPI flash. The bootloader is just another module in the application instead of being a separate project. Harold -- FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist