Index: ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/kernel/current/ChangeLog,v retrieving revision 1.143 diff -u -r1.143 ChangeLog --- ChangeLog 2 Jul 2007 11:49:09 -0000 1.143 +++ ChangeLog 23 Aug 2007 09:24:54 -0000 @@ -1,3 +1,9 @@ +2007-08-23 Hans Rosenfeld + + * tests/intr0.cxx, tests/kintr0.c: As suggested by Bart Veer, + priorities of the interrupts created by intr0 and kintr0 can now + be overridden by the HAL through HAL_INTR_TEST_PRIO_x constants. + 2007-07-02 Gary Thomas * src/debug/dbg_gdb.cxx: Index: tests/intr0.cxx =================================================================== RCS file: /cvs/ecos/ecos/packages/kernel/current/tests/intr0.cxx,v retrieving revision 1.13 diff -u -r1.13 intr0.cxx --- tests/intr0.cxx 11 Aug 2006 09:29:31 -0000 1.13 +++ tests/intr0.cxx 23 Aug 2007 09:24:55 -0000 @@ -60,6 +60,24 @@ #include "testaux.hxx" +#ifdef HAL_INTR_TEST_PRIO_A +# define PRIO_A HAL_INTR_TEST_PRIO_A +#else +# define PRIO_A 0 +#endif + +#ifdef HAL_INTR_TEST_PRIO_B +# define PRIO_B HAL_INTR_TEST_PRIO_B +#else +# define PRIO_B 1 +#endif + +#ifdef HAL_INTR_TEST_PRIO_C +# define PRIO_C HAL_INTR_TEST_PRIO_C +#else +# define PRIO_C 1 +#endif + static cyg_ISR isr0, isr1; static cyg_DSR dsr0, dsr1; @@ -97,7 +115,8 @@ static bool flash( void ) { - Cyg_Interrupt intr0 = Cyg_Interrupt(CYGNUM_HAL_ISR_MIN, 0, (CYG_ADDRWORD)333, isr0, dsr0 ); + Cyg_Interrupt intr0 = Cyg_Interrupt(CYGNUM_HAL_ISR_MIN, PRIO_A, + (CYG_ADDRWORD)333, isr0, dsr0 ); return true; } @@ -134,13 +153,13 @@ HAL_INTERRUPT_IN_USE( lvl1, in_use ); Cyg_Interrupt* intr0 = NULL; if (!in_use) - intr0 = new((void *)&intr0_obj[0]) Cyg_Interrupt( lvl1, 1, (CYG_ADDRWORD)777, isr0, dsr0 ); + intr0 = new((void *)&intr0_obj[0]) Cyg_Interrupt( lvl1, PRIO_B, (CYG_ADDRWORD)777, isr0, dsr0 ); cyg_vector lvl2 = CYGNUM_HAL_ISR_MIN + ( 15 % CYGNUM_HAL_ISR_COUNT); HAL_INTERRUPT_IN_USE( lvl2, in_use ); Cyg_Interrupt* intr1 = NULL; if (!in_use && lvl1 != lvl2) - intr1 = new((void *)&intr1_obj[0]) Cyg_Interrupt( lvl2, 1, 888, isr1, dsr1 ); + intr1 = new((void *)&intr1_obj[0]) Cyg_Interrupt( lvl2, PRIO_C, 888, isr1, dsr1 ); // Check these functions at least exist Cyg_Interrupt::disable_interrupts(); Index: tests/kintr0.c =================================================================== RCS file: /cvs/ecos/ecos/packages/kernel/current/tests/kintr0.c,v retrieving revision 1.12 diff -u -r1.12 kintr0.c --- tests/kintr0.c 11 Aug 2006 09:29:31 -0000 1.12 +++ tests/kintr0.c 23 Aug 2007 09:24:55 -0000 @@ -61,6 +61,24 @@ #include "testaux.h" +#ifdef HAL_INTR_TEST_PRIO_A +# define PRIO_A HAL_INTR_TEST_PRIO_A +#else +# define PRIO_A 0 +#endif + +#ifdef HAL_INTR_TEST_PRIO_B +# define PRIO_B HAL_INTR_TEST_PRIO_B +#else +# define PRIO_B 1 +#endif + +#ifdef HAL_INTR_TEST_PRIO_C +# define PRIO_C HAL_INTR_TEST_PRIO_C +#else +# define PRIO_C 1 +#endif + static cyg_interrupt intr_obj[2]; static cyg_handle_t intr0, intr1; @@ -103,7 +121,7 @@ cyg_handle_t handle; cyg_interrupt intr; - cyg_interrupt_create(CYGNUM_HAL_ISR_MIN, 0, (cyg_addrword_t)333, + cyg_interrupt_create(CYGNUM_HAL_ISR_MIN, PRIO_A, (cyg_addrword_t)333, isr0, dsr0, &handle, &intr ); cyg_interrupt_delete(handle); @@ -156,13 +174,14 @@ HAL_INTERRUPT_IN_USE( lvl1, in_use ); intr0 = 0; if (!in_use) - cyg_interrupt_create(lvl1, 1, (cyg_addrword_t)777, isr0, dsr0, - &intr0, &intr_obj[0]); + cyg_interrupt_create(lvl1, PRIO_B, (cyg_addrword_t)777, + isr0, dsr0, &intr0, &intr_obj[0]); HAL_INTERRUPT_IN_USE( lvl2, in_use ); intr1 = 0; if (!in_use && lvl1 != lvl2) - cyg_interrupt_create(lvl2, 1, 888, isr1, dsr1, &intr1, &intr_obj[1]); + cyg_interrupt_create(lvl2, PRIO_C, 888, + isr1, dsr1, &intr1, &intr_obj[1]); // Check these functions at least exist Index: include/hal_var_ints.h =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/var/current/include/hal_var_ints.h,v retrieving revision 1.2 diff -u -r1.2 hal_var_ints.h --- include/hal_var_ints.h 7 May 2006 18:36:18 -0000 1.2 +++ include/hal_var_ints.h 23 Aug 2007 09:30:49 -0000 @@ -95,6 +95,11 @@ #define CYGNUM_HAL_ISR_COUNT (CYGNUM_HAL_ISR_MAX+1) +/* use non-vectored interrupts in kernel tests intr0/kintr0 */ +#define HAL_INTR_TEST_PRIO_A 16 +#define HAL_INTR_TEST_PRIO_B 16 +#define HAL_INTR_TEST_PRIO_C 16 + //The vector used by the Real time clock #define CYGNUM_HAL_INTERRUPT_RTC CYGNUM_HAL_INTERRUPT_TIMER0 Index: ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/hal/arm/lpc2xxx/var/current/ChangeLog,v retrieving revision 1.7 diff -u -r1.7 ChangeLog --- ChangeLog 30 Jul 2007 18:09:47 -0000 1.7 +++ ChangeLog 23 Aug 2007 09:32:16 -0000 @@ -1,3 +1,13 @@ +2007-08-23 Hans Rosenfeld + + * include/hal_var_ints.h: use interrupt priority 16 for + kernel test intr0/kintr0 interrupts + +2007-08-17 Hans Rosenfeld + + * cdl/hal_arm_lpc2xxx.cdl: added VIC component to support + configuration of individual interrupt priorities + 2007_07-10 Uwe Kindler * cdl/hal_arm_lpc2xxx.cdl: Added option