Hi, I am having an evaluation board from the ADI which contain ADXL345 and also MCU ADUC7024. I tried to build the files from the example code that they have provided. As shown below is the example code,
#include <ADuC7024.H> /* ADuC7024 definitions */
void wait (void) { /* wait function */ unsigned long i; /* Delay var */
for (i = 0; i < 100000; ) { /* Delay for 10000 Counts */ i++; } } void My_IRQ_Function(void);
int main (void) { T1LD = 0x20000; // Counter Value T1CON = 0xC4; // Enabled,Periodic,Binary and CLK/16 IRQ = My_IRQ_Function; // Specify Interrupt Service Rountine IRQEN = GP_TIMER_BIT; // Enable Timer1 IRQ
GP4DAT = 0x04000000; // P4.2 configured as an output. LED is turned on
while (1) { } }
/********************************************************************/ /* */ /* Interrupt Service Rountine */ /* */ /********************************************************************/
void My_IRQ_Function() { if ((IRQSTA & GP_TIMER_BIT) != 0) // Timer1 IRQ? { GP4DAT ^= 0x00040000; // Complement P4.2 T1CLRI = 0; // Clear Timer IRQ } return ; }
As shown above, the message error is: .\Flash\Blinky.axf: Error: L6218E: Undefined symbol IRQ (referred from blinky.o).
Well, is there any command i need to enter into the startup code or anywhere else. The interrupt handler also can't be called using the __irq method which i have tried few times. Therefore, i have found this interrupt method from the example they provided in the website and hoping someone would help me to solve this issue. Thanks a lot. Please leave a message if you know about this.
Regards.