summaryrefslogtreecommitdiff
path: root/nuttx/arch
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-05-28 20:36:04 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-05-28 20:36:04 +0000
commitec35e939322aa09643fda0260ab19ac8fbfc7b16 (patch)
tree1877a1da3eea4f510ee7f6e234619ced5fd69a78 /nuttx/arch
parentde8741ffd56f55f277b0842be8600d893ed43a18 (diff)
downloadpx4-nuttx-ec35e939322aa09643fda0260ab19ac8fbfc7b16.tar.gz
px4-nuttx-ec35e939322aa09643fda0260ab19ac8fbfc7b16.tar.bz2
px4-nuttx-ec35e939322aa09643fda0260ab19ac8fbfc7b16.zip
Add support for CodeSourcery and devkitARM toolchains
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1832 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch')
-rw-r--r--nuttx/arch/arm/src/Makefile2
-rw-r--r--nuttx/arch/arm/src/cortexm3/up_hardfault.c40
2 files changed, 21 insertions, 21 deletions
diff --git a/nuttx/arch/arm/src/Makefile b/nuttx/arch/arm/src/Makefile
index cf85c741b..2c5526f9d 100644
--- a/nuttx/arch/arm/src/Makefile
+++ b/nuttx/arch/arm/src/Makefile
@@ -66,7 +66,7 @@ LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
-LIBGCC = ${shell $(CC) -print-libgcc-file-name}
+LIBGCC = "${shell $(CC) -print-libgcc-file-name}"
VPATH = chip:common:$(ARCH_SUBDIR)
diff --git a/nuttx/arch/arm/src/cortexm3/up_hardfault.c b/nuttx/arch/arm/src/cortexm3/up_hardfault.c
index fdd405130..0e637552a 100644
--- a/nuttx/arch/arm/src/cortexm3/up_hardfault.c
+++ b/nuttx/arch/arm/src/cortexm3/up_hardfault.c
@@ -90,26 +90,6 @@ int up_hardfault(int irq, FAR void *context)
uint16 *pc;
uint16 insn;
- /* Dump some hard fault info */
-
-#ifdef DEBUG_HARDFAULTS
- lldbg("Hard Fault:\n");
- lldbg(" IRQ: %d regs: %p\n", irq, regs);
- lldbg(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x\n",
- getbasepri(), getprimask(), getipsr());
- lldbg(" CFAULTS: %08x HFAULTS: %08x DFAULTS: %08x BFAULTADDR: %08x AFAULTS: %08x\n",
- getreg32(NVIC_CFAULTS), getreg32(NVIC_HFAULTS),
- getreg32(NVIC_DFAULTS), getreg32(NVIC_BFAULT_ADDR),
- getreg32(NVIC_AFAULTS));
- lldbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
- regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3],
- regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]);
- lldbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
- regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11],
- regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
- lldbg(" PSR=%08x\n", regs[REG_XPSR]);
-#endif
-
/* Get the value of the program counter where the fault occurred */
pc = (uint16*)regs[REG_PC] - 1;
@@ -134,6 +114,26 @@ int up_hardfault(int irq, FAR void *context)
}
}
+ /* Dump some hard fault info */
+
+#ifdef DEBUG_HARDFAULTS
+ lldbg("\nHard Fault:\n");
+ lldbg(" IRQ: %d regs: %p\n", irq, regs);
+ lldbg(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x\n",
+ getbasepri(), getprimask(), getipsr());
+ lldbg(" CFAULTS: %08x HFAULTS: %08x DFAULTS: %08x BFAULTADDR: %08x AFAULTS: %08x\n",
+ getreg32(NVIC_CFAULTS), getreg32(NVIC_HFAULTS),
+ getreg32(NVIC_DFAULTS), getreg32(NVIC_BFAULT_ADDR),
+ getreg32(NVIC_AFAULTS));
+ lldbg(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3],
+ regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]);
+ lldbg(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11],
+ regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
+ lldbg(" PSR=%08x\n", regs[REG_XPSR]);
+#endif
+
(void)irqsave();
dbg("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS));
PANIC(OSERR_UNEXPECTEDISR);