I have analyzed and fixed an issue I was having with error 944 from the XC16 v1.26 Tool Chain. The issue is being experienced by others too:
http://www.microchip.com/forums/m917841.aspx
For me, the issue is only present when I build for Release Mode, but Release Mode is needed to build the flash-image. Debug Mode does not experience this issue because of the way the debug image is built.
In Release Mode, we use a Bootloader and a Runtime image. Our Bootloader holds the ivt (interrupt vector table) and the aivt (alternate interrupt vector table). The ivt is used by the Bootloader, and the aivt is pre-loaded with vectors to a jump-table located at a fixed location within the Runtime. The Runtime is "fixed" in PIC-memory via a custom .gld linker-file. Accordingly, the Runtime does NOT have an ivt or aivt, and its start-code enables usage of the aivt when it initializes - so an interrupt bounces from the Bootloader's aivt to the Runtime fixed jump-table, and into the Runtime's interrupt-handler.
Both the Bootloader and the Runtime get their .hex files built separately and correctly, but in Release Mode, the Compiler Tool Chain also combines both hex-files into the "unified" hex file to create the MPLAB X Program file that the ICD3 hockey-puck uses to flash the full Bootloader+Runtime into the PIC's memory.
It all works great and lasts a long time! That is, until we switched to the XC16 v1.26 Tool Chain.
The XC16 v1.26 Tool Chain seems to force inclusion of an ivt into our Runtime hex file, even though
- A) We don't use or reference it. This used to be all that was needed.
B) I have added explicit "DISCARD" instructions in the Runtime's linker-script file to eliminate the .ivt Section, to no effect.
C) I have even clicked the "Remove unused sections" in the Properties for the Release's xc16-ld, also to no effect.
I consider that to be a Tool Chain bug.
The fix is to drop back to the v1.25 Tool Chain, and everything works fine again.
Jeff