A couple of questions regarding porting some Keil code over to WinARM:
(1) How do I program in an offset of 0x2000 to the code start in the hex
file? In other words, I want the hex file to have zeros in the first
0x2000 locations (0x0000 to 0x1FFF), and the code base to start at
location 0x2000. This is to allow space for my resident bootloader
program which transfers execution to the main app at location 0x2000.
In the Keil compiler I am able to do this by putting the following in
the "user classes" section of the LA locate tab:
DATA (0x40001FFF-0x40003FFF), CODE (0x2000-0x1FFFF), CONST
(0x2000-0x1FFFF)
(2) How do I specify a function to be an interrupt service routine? In
the Keil compiler, I have to do it with an __irq statement like this:
void keypad_irq(void) __irq
and then I assign it in the interrupt initialization routine like this:
VICVectAddr1 = (unsigned long) keypad_irq;
VICVectCntl1 = 0x00000030;
Is there a corresponding directive like the "__irq" in WinARM to
identify a routine as being an IRQ, or is that not necessary? I noticed
in the example UART ISR routines there was nothing to label the routine
as an interrupt service routine, but I didn't know if there was any
other code elsewhere that might be necessary.
Thanks,
Randall Aiken