<div dir="ltr"><div><div><div><div><div><div><div>All,<br><br></div>Thanks for all your help, with suggestions and advice i now have both error trapping exceptions, interrupts and task switching running without any detectable stack corruption.<br>
<br></div>Sebastian in particular, if your ever in the UK around Birmingham i owe you a beer.<br><br></div>In case anyone looks at this thread in the future this is how i got it working on the NXP LPC2292.<br><br></div>1) Make sure you poke the MEMMAP register to move the vector address's from 0x0 (if thats flash), the on chip SRAM. If your ARM chip does not support this type of extension (its not a core ARM7TDMI feature), then you would need to use a trampoline in flash to redirect to another address.<br>
</div>2) Your start.s needs to move a pre configured vector_block into this address, most BSP's do this.<br></div>3) Your linkerscript needs to reserve address space at this address, again most BSP's do this.<br></div>
4) You need to ensure that you have stacks allocated and assigned for each exception type. It looks like the IRQ one needs at least 4k.<br><br><div><div><div><div><div><div><br><div><br></div></div></div></div></div></div>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 19 April 2013 09:54, Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 04/19/2013 10:44 AM, Matthew J Fletcher wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 >What do you mean with basic interrupt handlers?<br>
Not using the IRQ exception handler at 0x18, but like so.<br>
<br>
--------------------<br>
<br>
#define VICVectAddr0    REG32(0xFFFFF100)    /* Vector Address 0 Register */<br>
#define VICIntEnable    REG32(0xFFFFF010)    /* Interrupt Enable Register */<br>
#define VICIntEnClear    REG32(0xFFFFF014)    /* Interrupt Enable Clear Register */<br>
#define VICIntSelect    REG32(0xFFFFF00C)    /* Interrupt Select Register */<br>
<br>
VICIntEnClear = VIC_BIT(VIC_TIMER0);        // Ensure the interrupt is disabled<br>
...<br>
VICVectAddr0 = (ULONG)tick_handler;        // Address of the ISR<br>
VICIntSelect &= ~VIC_BIT(VIC_TIMER0);        // Timer0 selected as IRQ<br>
VICIntEnable = VIC_BIT(VIC_TIMER0);        // Timer0 interrupt enabled<br>
VICVectCntl0 = VIC_ENABLE | VIC_TIMER0;<br>
<br>
---------------------------<br>
</blockquote>
<br></div>
This will not work.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
 >If you want to keep your exception vectors in the flash, then simply use<br>
arm_exc_interrupt >(on 4.10) or _ARMV4_Exception_interrupt (on 4.11) as the<br>
entry point for the interrupt >exception.<br>
<br>
Do you mean passing arm_exc_interrupt as the handler into<br>
rtems_interrupt_handler_<u></u>install()  ? that still gives an unhandled IRQ<br>
exception, probably because there is no handler installed in 0x18.<br>
</blockquote>
<br></div>
No, the normal sequence is this:<br>
<br>
1. Interrupt event<br>
2. CPU calls _ARMV4_Exception_interrupt via exception table<br>
3. This calls bsp_interrupt_dispatch (defined in the BSP)<br>
4. This calls the handler installed via rtems_interrupt_handler_<u></u>install()<div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone   : <a href="tel:%2B49%2089%20189%2047%2041-16" value="+4989189474116" target="_blank">+49 89 189 47 41-16</a><br>
Fax     : <a href="tel:%2B49%2089%20189%2047%2041-09" value="+4989189474109" target="_blank">+49 89 189 47 41-09</a><br>
E-Mail  : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-<u></u>brains.de</a><br>
PGP     : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div><br>regards</div><div>---</div><div>Matthew J Fletcher</div><br>
</div>