Compiler - In MPLAB® XC16 v1.26 or higher, why do I get build errors in the .gld file?

The custom address values defined in IVT (in the .gld file) are not recognized starting with v1.26 of XC16 compiler, resulting in build error. How do you fix this?

The .gld format is slightly modified starting with version 1.26 of MPLAB® XC16 compiler.
The Sections from the .gld file of the first project must be modified in the following way:
/* ----- */ #if __XC16_VERSION = 1026 */ SECTIONS { .ivt __IVT_BASE : { LONG(ABSOLUTE(0x2000)); /* __ReservedTrap0 - custom value */ LONG(ABSOLUTE(0x2100)); /* __OscillatorFail - custom value */ … } >ivt } #endif /* __XC16_VERSION

© 2021 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.