Content originally posted in LPCWare by fjrg76 on Wed Nov 07 22:43:41 MST 2012
Quote: mrob
Well, I tried copying the "aeabi_romdiv_patch.s"file over from a LPC12xx project and adding the project settings to my 11u24 project. Unfortunately it did not work. The asm listing still shows it calling the standard division routines, not the ROM routines. It seems that it had no effect on the project at all.
Look into your cr_startup_lpc11xx.c file and you'll find the references to the ROM routines. E.g.
[FONT=Courier New]Line 341 cr_startup_lpc12xx.c
// Patch the AEABI integer divide functions to use MCU's romdivide library
#ifdef __USE_ROMDIVIDE
// Get base address of romdivide area in MCU ROM
unsigned int *pDivRom = (unsigned int *) DIVROM_BASE;
// Load first word of romdivide area, which contains address of first
// divide function.
unsigned int *romdiv_func = (unsigned int *)*pDivRom;
// Get address of first divide function (signed divide)
pDivRom_idiv = (unsigned int *)*romdiv_func;
// Get address of second divide function (unsigned divide)
pDivRom_uidiv= (unsigned int *)*(romdiv_func+1);
#endif[/FONT]