I need to create bootloader for PIC18F that program flash from external I2C memory, eg 24lc512.
I'll probably write bootloader in pbp and asm.
If I understand correctly how bootloader works, there is 2 ways to implement bootloader.
-One is to make bootloader that sits on beginning of flash, then on address 4 and 8, need to be GOTO to new int vector. That will add one more GOTO before executing int, PBP already add one. I don't like that GOTO's.
-Other option is that first instruction in flash is GOTO Bootloader, and to put bootloader on end of flash. Then there is no need to remap interrupt. When bootloader finish job, then GOTO 1
In main program only need to remap reset vector to 1.
Am I understand how it works?
For now I'll create LED blink program, that use bootloader with reset vector at 1.
And then try to make bootloader that will program that hex to flash. For start hex will be in LOOKUP2, until I get flesh erase and write to work, then comunication...
Probably I should start with analyzing syntax of hex file.
Is there anyone interested and willing to help?
Bookmarks