8.5.2 Micromips Option

The -mmicromips option informs the compiler to generate code using the microMIPS instructions. This feature is available only in the PRO edition.

When your device is configured to boot into the microMIPS compressed Instruction Set Architecture (ISA) mode (for example, if #pragma config BOOTISA=MICROMIPS was specified), the -mmicromips option should be used when linking to select microMIPS startup code.

The -mno-micromips form of this option informs the compiler to use MIPS32 instructions.

The ISA can also be indicated on a per-function basis through the micromips and nomicromips attributes.

On PIC32M devices, bit 0 of the program counter indicates the ISA mode. When this bit is clear, the device is running in MIPS32 mode. When this bit is set, the device is running in either MIPS16 or microMIPS mode, depending on the core of the selected device. This means that if you execute a hard-coded jump, bit 0 must be set to the appropriate value for the destination function. Hard-coded jumps are most commonly seen when jumping from a bootloader to a bootloaded application.