Hello everyone. I'm trying the program "lpc21xx_insidersguide\Keil CARM Examples\ EX11-InterruptFIQ. The linker gives me this error: FIR.axf: Error: L6801E: rtentry2.o(.ARM.Collect$$rtentry$$0000000D) containing ARM and Thumb code cannot use the address of '~IW (The user intended not all code should interwork)' ARM function main. My C code is:
#include <LPC21xx.H> __irq void FIQ_Handler (void); void initFiq (void); int main (void) { initFiq(); IOCLR1 = 0x00FF0000; while(1){;} } __irq void FIQ_Handler (void) { IOSET1 = 0x00FF0000; EXTINT = 0x00000002; } void initFiq(void) { IODIR1 = 0x00FF0000; PINSEL0 = 0x20000000; VICIntSelect = 0x00008000; VICIntEnable = 0x00008000; }
abstract of my startup.s is:
................. PRESERVE8 AREA RESET, CODE, READONLY ARM Vectors LDR PC, Reset_Addr LDR PC, Undef_Addr LDR PC, SWI_Addr LDR PC, PAbt_Addr LDR PC, DAbt_Addr NOP ; Reserved Vector ; LDR PC, IRQ_Addr LDR PC, [PC, #-0x0FF0] ; Vector from VicVectAddr LDR PC, FIQ_Addr Reset_Addr DCD Reset_Handler Undef_Addr DCD Undef_Handler SWI_Addr DCD SWI_Handler PAbt_Addr DCD PAbt_Handler DAbt_Addr DCD DAbt_Handler DCD 0 ; Reserved Address IRQ_Addr DCD IRQ_Handler FIQ_Addr DCD FIQ_Handler IMPORT FIQ_Handler Undef_Handler B Undef_Handler SWI_Handler B SWI_Handler PAbt_Handler B PAbt_Handler DAbt_Handler B DAbt_Handler IRQ_Handler B IRQ_Handler ;FIQ_Handler B FIQ_Handler ; Reset Handler EXPORT Reset_Handler Reset_Handler ............
I am using UVision4 and the target device is a LPC2138. Someone can help me. Thank you.