Thomas - 2017-01-06

I made a little blink program for a 12F1822 in MPLAB, XC8 compiler v1.40.

Programmed with a PICKit2 the program runs, but when it is loaded via the Tiny bootloader+
(V0.11.0) it is not working.

I read the hex-file and found the problem: the XC8 mapping starts with:
000 0000 NOP
001 2802 GOTO 0x2
002 2FA6 GOTO 0x7A6
As you can see there are 2 goto's after each-other

The 4 words in front of the bootloader area is now (after bootloading the hex-file):
3FFF 3FFF 3FFF 3FFF 018A 0000 2802 2FA6

Now it goes wrong, because the program jumps back to address 2, and the bootloader is started again.

Are you aware of this problem, or must I change some settings in the XC8 compiler/linker?

As quick fix I changed the goto address at the end of the bootloader code so it skips the first goto.