For one of my projects using Flowcode v5, I'am using a PIC18F4550 with an USB connection to the computer, and I need to set-up a bootloader to program the code using USB, without any programmer.
The PIC18F4550 board has a 20MHz quartz, an USB connector, and a push button (active low) connected to RB.4.
I have successfully build and programmed the microchip bootloade. Here are the step I had to follow (given for reference):
- Download and run "microchip-application-libraries-v2012-04-03-windows-installer.exe" from the Microchip website
- Install the USB windows driver "mchpusb.inf"
- Install the windows software to program the target : "Pdfsusb"
- Build the bootloader "MCHPUSB Bootloader PIC18F4550 Family", using MPLAB 8.xx, and the full (eval, OK for 60 days) version of the C18 compiler (the linker step fails with the limited/student version

- Program the bootloader with my PicKit 3
So far so good, I'am able to program a .HEX code into my microcontroller. To do this, I need to hold donw the push button (RB.4) while the uC is going out of reset.
But, for th code I program to execute correctly, I need:
- To remap the code to 0x0800: To do this I have added "-rb 0x800" to the options of the linker (menu Build/Compiler Options/Linker)
- To remap the interrupt vectors.
And here is my question: How to perform this remapping ?
I have found the following in the forum, but I don't know where to set this up (I do not want to have to hand modify the generated code...):
RESET_VECTOR = 0x000800
HIGH_INTERRUPT_VECTOR = 0x000808
LOW_INTERRUPT_VECTOR = 0x000818
#pragma code reset_vector=0x0800
void _reset (void)
{
_asm GOTO main _endasm
}
Thanks in advance for your help,
Best regards,
Bernard