How do I locate “Fixup error” messages?
Q: I get the message “Fixup error referencing …”; or “Fixup error in expression …” What does this mean and what can I do about it? A: Briefly, it means the linker was instructed to adjust (fixup) a reference to a memory location, and the address that it calculated would not fit in the space available, e.g. a byte (8 bit) reference was asked to contain a value larger than 0xFF. Typically this occurs with the PICC compiler where pointers have not correctly been declared. For example: bank2 char ch; char *ptr; ptr = &ch; // fixup error This is a fixup error because “ptr” is a bank0 pointer – it needs to be bank2. ie: bank2 char *ptr; To locate the cause of the fixup error, look at the error message. Here’s an example: gmain6.obj:113:Fixup overflow referencing psect rbss_1 (loc 0x8C8 (0x8C2+6), size 1, value 0xA8) This is from the PIC compiler. The “size” tells us it’s a one byte reference – in fact it’s a 7 bit data reference, hence the value 0xA8 is too big to fit. The fact that it r