This is the code i used,
void extint(void) __irq ; void main() { PINSEL0 = 0X0000000C; //selecting EXT0 IODIR0 = 0x0000ff00; VICVectCntl0 = 0x0000002E; VICVectAddr0 = (unsigned long)extint; VICIntEnable = 0x00004000; IODIR0 = 0x00ff0000; while(1) { IOSET0 = 0x00ff0000; IOCLR0 = 0x00ff0000; } } void extint(void) __irq { IOSET0 = 0x0000ff00; EXTINT = 0x00000001; VICVectAddr = 0; }
it compiles. but when I run it on the simulation it does not enters in to the ISR function.
when I checked it on debug mode, the 'int' bit in EINTO is getting set and the VICVectAddr
also updated with the address of VICVectAddr0.
I used an example and it worked fine.
In the disassembly, in the address 0x00000018"LDR PC, [PC, #-0x0FF0]"
Do you have a startup file in your project?
A normal project would link with the startup file starting from address zero, getting the reset vector first in memory. Only when doing advanced programming (like running on a system that has a boot loader) could it be relevant with a different address for the vector table.
It has the startUp file included while the project creating.
and I just tried the code in simulation.
I thought I missed some basic thing, which is faced by some people.
Thankyou,
My problem got solved.
if someone have the same problem follow this.
Project -> option for target -> Linker -> select the checkbox "Use Memory Layout From Target Dialog"