LPC11Uxx ROM Divide
Like the NXP LP12xx family, the LPC11Uxx family provides built in ROM divide functionality.
However, unlike for the LPC12xx, the Code Red IDE does not currently provide built in project wizard support for accessing the LPC11Uxx ROM divide functionality.
Attached to this FAQ is a simple ROM divide example for the LPC11U14, based on the codebase generated by the Red Suite / LPCXpresso IDE LPC12xx project wizard. This example can easily be modified for other LPC11Uxx parts by changing the selected MCU in Project Properties.
LPC11U14_DivExample.zip (updated 9 May 2013)
The file aeabi_romdiv_patch.s causes all integer divide routines generated by the compiler to be vectored onto the rom divide code.
The symbol __USE_ROMDIVIDE must be defined for both the compiler and assembler.
- The startup file has been modified from that generated by the Code Red IDE LPC11Uxx project wizard in order to set up the required pointers to the rom divide code.
The project requires the CMSISv2p00_LPC11Uxx library project to exist in the same workspace.