I am using sdcc for pic16 development, so sdcc uses gputils for assembling et linking operations.
I intend to use a bootloader on a USB device (pic16f4550), and so, the generated code have to begin at absolute address 0x800. This address is pointed by the bootloader program to start the user application after loading.
To obtain a code relocated in the 0x800 address, I tried several things :
CODEPAGE NAME=vectors START=0x800 END=0x829
CODEPAGE NAME=page START=0x800 END=0x7FFF
The last statement solution give a code located in the rigth adress 0x800 except the reset vector which stays anyway in 0x0 location.
So I want my program to start after the bootloader leaves the control, not on reset. Anyway, the 0x0 location is protected on the chip to avoid the corruption of the boot loader.
I make a mistake, or is it a bug, or isn't it implemented ?
I submit this problem in the sdcc discussion forum, but I am afraid that it could be a gplink problem.
Where this functionality is implemented in the source code of gplink to propose a patch ?