Hi there,
I have a big question mark here.. I have 2 microcontrollers, LPC1788 and LPC1758. I've made a driver for using IRQ's in LabVIEW (LabVIEW for ARM).
this works well except when I compile the same code for LPC1758 I get an error. it is this row (for config the vector table addres where the IRQ function must be placed):
volatile unsigned long *pVICVectAddr = pVICVectAddrBase + isr_vector_num;
on LPC1788 it compiles for this row C-code:
LDR r0,[pc,#164] ; @0x0000127C ADD r11,r0,r4,LSL #2
on lpc1758 it compiles:
LDR r2,[pc,#172] ; @0x00000D40
pVICVectAddrBase is 0x10000040 because there is no ADD on the lpc1758, the address is 0x10000040 instead of that base address plus an offset.
How is this possible that the compiler generates different code? I've checked the project settings and these are the same. I also changed the target to lpc1788 with no effect.
I am using KEIL uVision V4.03q with mdk-arm 4.11 on windows xp SP3 Armcc.Exe version V4.0.0.728
Suggestions anyone?