picdem fs usb and sdcc/gputils
Alessandro Zummo <[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.gnupic |
|---|---|
| Organization | Tower Technologies |
| Message-ID | <20050714002930.1e92a8f3@inspiron> |
Hello, I'm trying to use the board in subject with sdcc/gputils. I've modified the linker script so that the vectors are located at 0x800 . CODEPAGE NAME=vectors START=0x800 END=0x829 PROTECTED I've recompiled crt0i.c along with a small example, and compiled and linked them this way: sdcc -c -mpic16 -p18f2550 crt0i.c sdcc -c -mpic16 -p18f2550 toggle.c gplink -o toggle.hex -s 18f4550.lkr crt0i.o toggle.o pic18f2550.lib however, gplink places the reset vector at 0x0000 because the crt0i.o object specifies a fixed address. I had to modify crt0i.c adding a #pragma code _entry 0x800 and removing the 0 after the __interrupt qualifier of the _entry function. It seems to work now, but I was wondering if this is the correct way to follow... -- Best regards, Alessandro Zummo, Tower Technologies - Turin, Italy http://www.towertech.it