4.6.1.26 Undefints Option

The -mundefints=action option allows you to control how the compiler responds to uninitialized interrupt vectors, including undefined legacy low- and high-priority vectors, and entries in the interrupt vector table.

A warning is generated by the compiler if any uninitialized vectors are detected. This warning can be disabled by using the ignore action with this option.

The full list of possible actions is shown in the table below for target devices that are using the Vectored Interrupt Controller (VIC) module and for all other situations (which includes devices that do not have the VIC, or those that do but where the vector tables are disabled and the device is running in legacy mode).

For example, to have a software breakpoint executed by any vector location that is not linked to an interrupt function, use the option -mundefints:swbp.

The default action for projects using the VIC is to program the address of a reset instruction (which will be located immediately after the vector table) into each unassigned vector location; for all other devices, it is to leave the locations unprogrammed and available for other use.

If the target device does not implement a reset instruction or software breakpoint instruction and the reset or swpb action has been specified with this option, an instruction that can jump to itself will be programmed instead.

Table 4-15. Unused Interrupt Suboptions
Action Devices using the VIC All other devices
ignore No action; vector location available for program code. No action; vector location available for program code (default).
reset Program each unassigned vector with the address of a reset instruction (default). Program a reset instruction at each unassigned vector.
swbp Program each unassigned vector with the address of a software breakpoint instruction. Program a software breakpoint instruction at each unassigned vector.

An interrupt function can be assigned to any otherwise unassigned vector location by using the default interrupt source when defining that function (see 5.9.1 Writing an Interrupt Service Routine).

The -mundefints option is ignored if the target device does not support interrupts.