This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: cyg_interrupt_set_vsr and ARM AEB-1
- To: ecos-discuss at sourceware dot cygnus dot com
- Subject: Re: [ECOS] cyg_interrupt_set_vsr and ARM AEB-1
- From: Hugo Tyson <hmt at cygnus dot co dot uk>
- Date: 31 May 2000 13:42:31 +0100
- Newsgroups: cygnus.sourceware.ecos.d
- Organization: Cygnus Solutions, a Red Hat company (Cambridge, UK)
- References: <002f01bfca75$7f9ddde0$ef0fa8c0@sslinc.com>
"Ivan Griffin" <ivan.griffin@parthus.com> writes:
> I'm trying to do the following in cyg_prestart() to hook the IRQ and FIQ
> interrupts on the ARM AEB-7. Can anyone tell me why the following code
> doesn't appear to work?
>
> #define ARM_IRQ_INTR 0x18
> #define ARM_FIQ_INTR 0x1c
>
> extern void IRQ_Veneer(void);
> extern void FIQ_Handler(void);
>
> void cyg_prestart(void)
> {
> cyg_interrupt_disable();
> cyg_interrupt_set_vsr(ARM_IRQ_INTR, (cyg_VSR_t*)IRQ_Veneer);
> cyg_interrupt_set_vsr(ARM_FIQ_INTR, (cyg_VSR_t*)FIQ_Handler);
> cyg_interrupt_enable();
> }
You should use these constants (from hal_intr.h) as the argument.
#define CYGNUM_HAL_VECTOR_IRQ 6
#define CYGNUM_HAL_VECTOR_FIQ 7
You are hitting trampoline addresses that are off the end of the table, and
no, sorry, it doesn't have any range checking ;-(
Aha, BUT it does have asserts on the vector range: a motto for life ;-) "if
in doubt, compile with asserts enabled" - I infer that you ain't or you
would have seen an assert fail.
Just in case: if those really are void...(void) C routines, it'll all go
horribly wrong. If you're using extern void FOO(void); just to get hold of
a external address in C, and they're proper interrupt handlers writ in asm,
you'll be OK.
- Huge