Now I got it.
I have done bootloaders on top of main program. At address 64000. So in main program i call bootloader with @ GOTO 64000. No need to remap anything.
When you use reset org 3000h, PBP expect int vectors on 3008h, but CPU will jump at 08h.
So in your bootloader you need to have
Code:
@ ORG 8
@ GOTO 3008h
@ ORG 4
@ GOTO 3004h
Then CPU will jump to 08h, then jump to 3008h, then jump to ISR. Lot of jumping...
Also, when you power PIC it will enter to bootloader first, so you need exit from bootloader
eg
But this
Code:
@ ORG 8
@ GOTO 3008h
@ ORG 4
@ GOTO 3004h
will generate warning in ASM, overwriting prev address, or something like that. Then it depends, what was last, so it may assemble correctly, maybe not.
EDIT:
You could try something like this in bootloader:
Code:
Reset org 10h
@ ORG 0
@ GOTO 10h
@ ORG 8
@ GOTO 3008h
@ ORG 4
@ GOTO 3004h
Bookmarks