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
This commit is contained in:
patacongo 2009-05-28 20:36:04 +00:00
parent edf2f4954b
commit 0fe7421469
2 changed files with 21 additions and 21 deletions

View File

@ -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)

View File

@ -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);