diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-05-15 18:03:59 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-05-15 18:03:59 +0000 |
commit | cea1e420e768d287caf7203096d24a14d38014fa (patch) | |
tree | e2a57495272a5cf6fb2854d1238d8b4738b4fb44 /nuttx/arch | |
parent | 73c4d003de793f5f62c6374ce26b214a922fc205 (diff) | |
download | px4-nuttx-cea1e420e768d287caf7203096d24a14d38014fa.tar.gz px4-nuttx-cea1e420e768d287caf7203096d24a14d38014fa.tar.bz2 px4-nuttx-cea1e420e768d287caf7203096d24a14d38014fa.zip |
Early integration fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1783 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch')
-rw-r--r-- | nuttx/arch/arm/src/lm3s/lm3s_irq.c | 155 | ||||
-rw-r--r-- | nuttx/arch/arm/src/lm3s/lm3s_lowputc.c | 1 |
2 files changed, 79 insertions, 77 deletions
diff --git a/nuttx/arch/arm/src/lm3s/lm3s_irq.c b/nuttx/arch/arm/src/lm3s/lm3s_irq.c index def4ce391..c9f47c0df 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_irq.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_irq.c @@ -41,6 +41,8 @@ #include <nuttx/config.h> #include <sys/types.h> +#include <debug.h> + #include <nuttx/irq.h> #include <nuttx/arch.h> @@ -74,6 +76,83 @@ uint32 *current_regs; ****************************************************************************/ /**************************************************************************** + * Name: lm3s_nmi, lm3s_hardfault, lm3s_mpu, lm3s_busfault, lm3s_usagefault, + * lm3s_svcall, lm3s_dbgmonitor, lm3s_pendsv, lm3s_reserved + * + * Description: + * Handlers for various execptions. None are handled and all are fatal + * error conditions. The only advantage these provided over the default + * unexpected interrupt handler is that they provide a diagnostic output. + * + ****************************************************************************/ + +#ifdef CONFIG_DEBUG +static int lm3s_nmi(int irq, FAR void *context) +{ + (void)irqsave(); + dbg("PANIC!!! NMI received\n"); + PANIC(OSERR_UNEXPECTEDISR); + return 0; +} + +static int lm3s_hardfault(int irq, FAR void *context) +{ + (void)irqsave(); + dbg("PANIC!!! Hard fault received\n"); + PANIC(OSERR_UNEXPECTEDISR); + return 0; +} + +static int lm3s_mpu(int irq, FAR void *context) +{ + (void)irqsave(); + dbg("PANIC!!! MPU interrupt received\n"); + PANIC(OSERR_UNEXPECTEDISR); + return 0; +} + +static int lm3s_busfault(int irq, FAR void *context) +{ + (void)irqsave(); + dbg("PANIC!!! Bus fault recived\n"); + PANIC(OSERR_UNEXPECTEDISR); + return 0; +} + +static int lm3s_usagefault(int irq, FAR void *context) +{ + (void)irqsave(); + dbg("PANIC!!! Usage fault received\n"); + PANIC(OSERR_UNEXPECTEDISR); + return 0; +} + +static int lm3s_svcall(int irq, FAR void *context) +{ + (void)irqsave(); + dbg("PANIC!!! SVCALL received\n"); + PANIC(OSERR_UNEXPECTEDISR); + return 0; +} + +static int lm3s_dbgmonitor(int irq, FAR void *context) +{ + (void)irqsave(); + dbg("PANIC!!! Debug Monitor receieved\n"); + PANIC(OSERR_UNEXPECTEDISR); + return 0; +} + +static int lm3s_reserved(int irq, FAR void *context) +{ + (void)irqsave(); + dbg("PANIC!!! Reserved interrupt\n"); + PANIC(OSERR_UNEXPECTEDISR); + return 0; +} +#endif + +/**************************************************************************** * Name: lml3s_irqinfo * * Description: @@ -322,79 +401,3 @@ int up_prioritize_irq(int irq, int priority) return OK; } #endif - -/**************************************************************************** - * Name: lm3s_nmi, lm3s_hardfault, lm3s_mpu, lm3s_busfault, lm3s_usagefault, - * lm3s_svcall, lm3s_dbgmonitor, lm3s_pendsv, lm3s_reserved - * - * Description: - * Handlers for various execptions. None are handler and all are fatal - * error conditions. - * - ****************************************************************************/ - -#ifdef CONFIG_DEBUG -int lm3s_nmi(int irq, FAR void *context) -{ - (void)irqsave(); - dbg("PANIC!!! NMI received\n"); - PANIC(OSERR_UNEXPECTEDISR); - return 0; -} - -int lm3s_hardfault(int irq, FAR void *context) -{ - (void)irqsave(); - dbg("PANIC!!! Hard fault received\n"); - PANIC(OSERR_UNEXPECTEDISR); - return 0; -} - -int lm3s_mpu(int irq, FAR void *context) -{ - (void)irqsave(); - dbg("PANIC!!! MPU interrupt received\n"); - PANIC(OSERR_UNEXPECTEDISR); - return 0; -} - -int lm3s_busfault(int irq, FAR void *context) -{ - (void)irqsave(); - dbg("PANIC!!! Bus fault recived\n"); - PANIC(OSERR_UNEXPECTEDISR); - return 0; -} - -int lm3s_usagefault(int irq, FAR void *context) -{ - (void)irqsave(); - dbg("PANIC!!! Usage fault received\n"); - PANIC(OSERR_UNEXPECTEDISR); - return 0; -} - -int lm3s_svcall(int irq, FAR void *context) -{ - (void)irqsave(); - dbg("PANIC!!! SVCALL received\n"); - PANIC(OSERR_UNEXPECTEDISR); - return 0; -} - -int lm3s_dbgmonitor(int irq, FAR void *context) -{ - (void)irqsave(); - dbg("PANIC!!! Debug Monitor receieved\n"); - PANIC(OSERR_UNEXPECTEDISR); - return 0; -} - -int lm3s_reserved(int irq, FAR void *context) -{ - (void)irqsave(); - dbg("PANIC!!! Reserved interrupt\n"); - PANIC(OSERR_UNEXPECTEDISR); - return 0; -} -#endif diff --git a/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c b/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c index 7e675f110..1df228dec 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_lowputc.c @@ -220,7 +220,6 @@ void up_lowputc(char ch) void up_lowsetup(void) { - uint32 rcgc1; #if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG) uint32 ctl; |