mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
Rename *lldbg to *llerr
This commit is contained in:
+12
-12
@@ -85,37 +85,37 @@ static void a1x_dumpintc(const char *msg, int irq)
|
|||||||
/* Dump some relevant ARMv7 register contents */
|
/* Dump some relevant ARMv7 register contents */
|
||||||
|
|
||||||
flags = enter_critical_section();
|
flags = enter_critical_section();
|
||||||
lldbg("ARMv7 (%s, irq=%d):\n", msg, irq);
|
llerr("ARMv7 (%s, irq=%d):\n", msg, irq);
|
||||||
lldbg(" CPSR: %08x SCTLR: %08x\n", flags, cp15_rdsctlr());
|
llerr(" CPSR: %08x SCTLR: %08x\n", flags, cp15_rdsctlr());
|
||||||
|
|
||||||
/* Dump all of the (readable) INTC register contents */
|
/* Dump all of the (readable) INTC register contents */
|
||||||
|
|
||||||
lldbg("INTC (%s, irq=%d):\n", msg, irq);
|
llerr("INTC (%s, irq=%d):\n", msg, irq);
|
||||||
lldbg(" VECTOR: %08x BASE: %08x PROTECT: %08x NMICTRL: %08x\n",
|
llerr(" VECTOR: %08x BASE: %08x PROTECT: %08x NMICTRL: %08x\n",
|
||||||
getreg32(A1X_INTC_VECTOR), getreg32(A1X_INTC_BASEADDR),
|
getreg32(A1X_INTC_VECTOR), getreg32(A1X_INTC_BASEADDR),
|
||||||
getreg32(A1X_INTC_PROTECT), getreg32(A1X_INTC_NMICTRL));
|
getreg32(A1X_INTC_PROTECT), getreg32(A1X_INTC_NMICTRL));
|
||||||
lldbg(" IRQ PEND: %08x %08x %08x\n",
|
llerr(" IRQ PEND: %08x %08x %08x\n",
|
||||||
getreg32(A1X_INTC_IRQ_PEND0), getreg32(A1X_INTC_IRQ_PEND1),
|
getreg32(A1X_INTC_IRQ_PEND0), getreg32(A1X_INTC_IRQ_PEND1),
|
||||||
getreg32(A1X_INTC_IRQ_PEND2));
|
getreg32(A1X_INTC_IRQ_PEND2));
|
||||||
lldbg(" FIQ PEND: %08x %08x %08x\n",
|
llerr(" FIQ PEND: %08x %08x %08x\n",
|
||||||
getreg32(A1X_INTC_FIQ_PEND0), getreg32(A1X_INTC_FIQ_PEND1),
|
getreg32(A1X_INTC_FIQ_PEND0), getreg32(A1X_INTC_FIQ_PEND1),
|
||||||
getreg32(A1X_INTC_FIQ_PEND2));
|
getreg32(A1X_INTC_FIQ_PEND2));
|
||||||
lldbg(" SEL: %08x %08x %08x\n",
|
llerr(" SEL: %08x %08x %08x\n",
|
||||||
getreg32(A1X_INTC_IRQ_SEL0), getreg32(A1X_INTC_IRQ_SEL1),
|
getreg32(A1X_INTC_IRQ_SEL0), getreg32(A1X_INTC_IRQ_SEL1),
|
||||||
getreg32(A1X_INTC_IRQ_SEL2));
|
getreg32(A1X_INTC_IRQ_SEL2));
|
||||||
lldbg(" EN: %08x %08x %08x\n",
|
llerr(" EN: %08x %08x %08x\n",
|
||||||
getreg32(A1X_INTC_EN0), getreg32(A1X_INTC_EN1),
|
getreg32(A1X_INTC_EN0), getreg32(A1X_INTC_EN1),
|
||||||
getreg32(A1X_INTC_EN2));
|
getreg32(A1X_INTC_EN2));
|
||||||
lldbg(" MASK: %08x %08x %08x\n",
|
llerr(" MASK: %08x %08x %08x\n",
|
||||||
getreg32(A1X_INTC_MASK0), getreg32(A1X_INTC_MASK1),
|
getreg32(A1X_INTC_MASK0), getreg32(A1X_INTC_MASK1),
|
||||||
getreg32(A1X_INTC_MASK2));
|
getreg32(A1X_INTC_MASK2));
|
||||||
lldbg(" RESP: %08x %08x %08x\n",
|
llerr(" RESP: %08x %08x %08x\n",
|
||||||
getreg32(A1X_INTC_RESP0), getreg32(A1X_INTC_RESP1),
|
getreg32(A1X_INTC_RESP0), getreg32(A1X_INTC_RESP1),
|
||||||
getreg32(A1X_INTC_RESP2));
|
getreg32(A1X_INTC_RESP2));
|
||||||
lldbg(" FF: %08x %08x %08x\n",
|
llerr(" FF: %08x %08x %08x\n",
|
||||||
getreg32(A1X_INTC_FF0), getreg32(A1X_INTC_FF1),
|
getreg32(A1X_INTC_FF0), getreg32(A1X_INTC_FF1),
|
||||||
getreg32(A1X_INTC_FF2));
|
getreg32(A1X_INTC_FF2));
|
||||||
lldbg(" PRIO: %08x %08x %08x %08x %08x\n",
|
llerr(" PRIO: %08x %08x %08x %08x %08x\n",
|
||||||
getreg32(A1X_INTC_PRIO0), getreg32(A1X_INTC_PRIO1),
|
getreg32(A1X_INTC_PRIO0), getreg32(A1X_INTC_PRIO1),
|
||||||
getreg32(A1X_INTC_PRIO2), getreg32(A1X_INTC_PRIO3),
|
getreg32(A1X_INTC_PRIO2), getreg32(A1X_INTC_PRIO3),
|
||||||
getreg32(A1X_INTC_PRIO4));
|
getreg32(A1X_INTC_PRIO4));
|
||||||
|
|||||||
@@ -1192,7 +1192,7 @@ static int uart_interrupt(struct uart_dev_s *dev)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
lldbg("Unexpected IIR: %02x\n", status);
|
llerr("Unexpected IIR: %02x\n", status);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
* code. We are going to print the task name if:
|
* code. We are going to print the task name if:
|
||||||
*
|
*
|
||||||
* CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name
|
* CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name
|
||||||
* (defined(CONFIG_DEBUG_FEATURES) || <-- And the debug is enabled (lldbg used)
|
* (defined(CONFIG_DEBUG_FEATURES) || <-- And the debug is enabled (llerr used)
|
||||||
* defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used
|
* defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
|||||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||||
{
|
{
|
||||||
uint32_t *ptr = (uint32_t *)stack;
|
uint32_t *ptr = (uint32_t *)stack;
|
||||||
lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||||
}
|
}
|
||||||
@@ -154,12 +154,12 @@ static inline void up_registerdump(void)
|
|||||||
for (regs = REG_R0; regs <= REG_R15; regs += 8)
|
for (regs = REG_R0; regs <= REG_R15; regs += 8)
|
||||||
{
|
{
|
||||||
uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs];
|
uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs];
|
||||||
lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
regs, ptr[0], ptr[1], ptr[2], ptr[3],
|
regs, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
lldbg("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
llerr("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -228,12 +228,12 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
/* Show interrupt stack info */
|
/* Show interrupt stack info */
|
||||||
|
|
||||||
lldbg("sp: %08x\n", sp);
|
llerr("sp: %08x\n", sp);
|
||||||
lldbg("IRQ stack:\n");
|
llerr("IRQ stack:\n");
|
||||||
lldbg(" base: %08x\n", istackbase);
|
llerr(" base: %08x\n", istackbase);
|
||||||
lldbg(" size: %08x\n", istacksize);
|
llerr(" size: %08x\n", istacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_intstack());
|
llerr(" used: %08x\n", up_check_intstack());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Does the current stack pointer lie within the interrupt
|
/* Does the current stack pointer lie within the interrupt
|
||||||
@@ -251,24 +251,24 @@ static void up_dumpstate(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sp = g_intstackbase;
|
sp = g_intstackbase;
|
||||||
lldbg("sp: %08x\n", sp);
|
llerr("sp: %08x\n", sp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Show user stack info */
|
/* Show user stack info */
|
||||||
|
|
||||||
lldbg("User stack:\n");
|
llerr("User stack:\n");
|
||||||
lldbg(" base: %08x\n", ustackbase);
|
llerr(" base: %08x\n", ustackbase);
|
||||||
lldbg(" size: %08x\n", ustacksize);
|
llerr(" size: %08x\n", ustacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
llerr(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
lldbg("sp: %08x\n", sp);
|
llerr("sp: %08x\n", sp);
|
||||||
lldbg("stack base: %08x\n", ustackbase);
|
llerr("stack base: %08x\n", ustackbase);
|
||||||
lldbg("stack size: %08x\n", ustacksize);
|
llerr("stack size: %08x\n", ustacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
llerr("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -279,7 +279,7 @@ static void up_dumpstate(void)
|
|||||||
if (sp > ustackbase || sp <= ustackbase - ustacksize)
|
if (sp > ustackbase || sp <= ustackbase - ustacksize)
|
||||||
{
|
{
|
||||||
#if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4
|
#if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4
|
||||||
lldbg("ERROR: Stack pointer is not within allocated stack\n");
|
llerr("ERROR: Stack pointer is not within allocated stack\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -346,10 +346,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
board_autoled_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
llerr("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
filename, lineno, rtcb->name);
|
filename, lineno, rtcb->name);
|
||||||
#else
|
#else
|
||||||
lldbg("Assertion failed at file:%s line: %d\n",
|
llerr("Assertion failed at file:%s line: %d\n",
|
||||||
filename, lineno);
|
filename, lineno);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr)
|
|||||||
* fatal error.
|
* fatal error.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pglldbg("FSR: %08x FAR: %08x\n", fsr, far);
|
pgllerr("FSR: %08x FAR: %08x\n", fsr, far);
|
||||||
if ((fsr & FSR_MASK) != FSR_PAGE)
|
if ((fsr & FSR_MASK) != FSR_PAGE)
|
||||||
{
|
{
|
||||||
goto segfault;
|
goto segfault;
|
||||||
@@ -180,7 +180,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr)
|
|||||||
|
|
||||||
segfault:
|
segfault:
|
||||||
#endif
|
#endif
|
||||||
lldbg("Data abort. PC: %08x FAR: %08x FSR: %08x\n", regs[REG_PC], far, fsr);
|
llerr("Data abort. PC: %08x FAR: %08x FSR: %08x\n", regs[REG_PC], far, fsr);
|
||||||
PANIC();
|
PANIC();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ void up_dataabort(uint32_t *regs)
|
|||||||
|
|
||||||
/* Crash -- possibly showing diagnost debug information. */
|
/* Crash -- possibly showing diagnost debug information. */
|
||||||
|
|
||||||
lldbg("Data abort. PC: %08x\n", regs[REG_PC]);
|
llerr("Data abort. PC: %08x\n", regs[REG_PC]);
|
||||||
PANIC();
|
PANIC();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ void up_prefetchabort(uint32_t *regs)
|
|||||||
* virtual addresses.
|
* virtual addresses.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pglldbg("VADDR: %08x VBASE: %08x VEND: %08x\n",
|
pgllerr("VADDR: %08x VBASE: %08x VEND: %08x\n",
|
||||||
regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND);
|
regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND);
|
||||||
|
|
||||||
if (regs[REG_R15] >= PG_PAGED_VBASE && regs[REG_R15] < PG_PAGED_VEND)
|
if (regs[REG_R15] >= PG_PAGED_VBASE && regs[REG_R15] < PG_PAGED_VEND)
|
||||||
@@ -148,7 +148,7 @@ void up_prefetchabort(uint32_t *regs)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
lldbg("Prefetch abort. PC: %08x\n", regs[REG_PC]);
|
llerr("Prefetch abort. PC: %08x\n", regs[REG_PC]);
|
||||||
PANIC();
|
PANIC();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void up_release_pending(void)
|
|||||||
{
|
{
|
||||||
struct tcb_s *rtcb = this_task();
|
struct tcb_s *rtcb = this_task();
|
||||||
|
|
||||||
slldbg("From TCB=%p\n", rtcb);
|
sllerr("From TCB=%p\n", rtcb);
|
||||||
|
|
||||||
/* Merge the g_pendingtasks list into the ready-to-run task list */
|
/* Merge the g_pendingtasks list into the ready-to-run task list */
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
struct tcb_s *rtcb = this_task();
|
struct tcb_s *rtcb = this_task();
|
||||||
bool switch_needed;
|
bool switch_needed;
|
||||||
|
|
||||||
slldbg("TCB=%p PRI=%d\n", tcb, priority);
|
sllerr("TCB=%p PRI=%d\n", tcb, priority);
|
||||||
|
|
||||||
/* Remove the tcb task from the ready-to-run list.
|
/* Remove the tcb task from the ready-to-run list.
|
||||||
* sched_removereadytorun will return true if we just
|
* sched_removereadytorun will return true if we just
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
void up_syscall(uint32_t *regs)
|
void up_syscall(uint32_t *regs)
|
||||||
{
|
{
|
||||||
lldbg("Syscall from 0x%x\n", regs[REG_PC]);
|
llerr("Syscall from 0x%x\n", regs[REG_PC]);
|
||||||
CURRENT_REGS = regs;
|
CURRENT_REGS = regs;
|
||||||
PANIC();
|
PANIC();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
|
|
||||||
void up_undefinedinsn(uint32_t *regs)
|
void up_undefinedinsn(uint32_t *regs)
|
||||||
{
|
{
|
||||||
lldbg("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
llerr("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
||||||
CURRENT_REGS = regs;
|
CURRENT_REGS = regs;
|
||||||
PANIC();
|
PANIC();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
* code. We are going to print the task name if:
|
* code. We are going to print the task name if:
|
||||||
*
|
*
|
||||||
* CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name
|
* CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name
|
||||||
* (defined(CONFIG_DEBUG_FEATURES) || <-- And the debug is enabled (lldbg used)
|
* (defined(CONFIG_DEBUG_FEATURES) || <-- And the debug is enabled (llerr used)
|
||||||
* defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used
|
* defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
|||||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||||
{
|
{
|
||||||
uint32_t *ptr = (uint32_t *)stack;
|
uint32_t *ptr = (uint32_t *)stack;
|
||||||
lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||||
}
|
}
|
||||||
@@ -145,11 +145,11 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg)
|
|||||||
/* Dump interesting properties of this task */
|
/* Dump interesting properties of this task */
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("%s: PID=%d Stack Used=%lu of %lu\n",
|
llerr("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||||
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||||
(unsigned long)tcb->adj_stack_size);
|
(unsigned long)tcb->adj_stack_size);
|
||||||
#else
|
#else
|
||||||
lldbg("PID: %d Stack Used=%lu of %lu\n",
|
llerr("PID: %d Stack Used=%lu of %lu\n",
|
||||||
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||||
(unsigned long)tcb->adj_stack_size);
|
(unsigned long)tcb->adj_stack_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -184,22 +184,22 @@ static inline void up_registerdump(void)
|
|||||||
{
|
{
|
||||||
/* Yes.. dump the interrupt registers */
|
/* Yes.. dump the interrupt registers */
|
||||||
|
|
||||||
lldbg("R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1],
|
CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1],
|
||||||
CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3],
|
CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3],
|
||||||
CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5],
|
CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5],
|
||||||
CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]);
|
CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]);
|
||||||
lldbg("R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9],
|
CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9],
|
||||||
CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
|
CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
|
||||||
CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
|
CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
|
||||||
CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
|
CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
|
||||||
#ifdef CONFIG_BUILD_PROTECTED
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
lldbg("xPSR: %08x PRIMASK: %08x EXEC_RETURN: %08x\n",
|
llerr("xPSR: %08x PRIMASK: %08x EXEC_RETURN: %08x\n",
|
||||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
|
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
|
||||||
CURRENT_REGS[REG_EXC_RETURN]);
|
CURRENT_REGS[REG_EXC_RETURN]);
|
||||||
#else
|
#else
|
||||||
lldbg("xPSR: %08x PRIMASK: %08x\n",
|
llerr("xPSR: %08x PRIMASK: %08x\n",
|
||||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]);
|
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -270,12 +270,12 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
/* Show interrupt stack info */
|
/* Show interrupt stack info */
|
||||||
|
|
||||||
lldbg("sp: %08x\n", sp);
|
llerr("sp: %08x\n", sp);
|
||||||
lldbg("IRQ stack:\n");
|
llerr("IRQ stack:\n");
|
||||||
lldbg(" base: %08x\n", istackbase);
|
llerr(" base: %08x\n", istackbase);
|
||||||
lldbg(" size: %08x\n", istacksize);
|
llerr(" size: %08x\n", istacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_intstack());
|
llerr(" used: %08x\n", up_check_intstack());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Does the current stack pointer lie within the interrupt
|
/* Does the current stack pointer lie within the interrupt
|
||||||
@@ -297,14 +297,14 @@ static void up_dumpstate(void)
|
|||||||
if (CURRENT_REGS)
|
if (CURRENT_REGS)
|
||||||
{
|
{
|
||||||
sp = CURRENT_REGS[REG_R13];
|
sp = CURRENT_REGS[REG_R13];
|
||||||
lldbg("sp: %08x\n", sp);
|
llerr("sp: %08x\n", sp);
|
||||||
}
|
}
|
||||||
|
|
||||||
lldbg("User stack:\n");
|
llerr("User stack:\n");
|
||||||
lldbg(" base: %08x\n", ustackbase);
|
llerr(" base: %08x\n", ustackbase);
|
||||||
lldbg(" size: %08x\n", ustacksize);
|
llerr(" size: %08x\n", ustacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
llerr(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Dump the user stack if the stack pointer lies within the allocated user
|
/* Dump the user stack if the stack pointer lies within the allocated user
|
||||||
@@ -317,11 +317,11 @@ static void up_dumpstate(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
lldbg("sp: %08x\n", sp);
|
llerr("sp: %08x\n", sp);
|
||||||
lldbg("stack base: %08x\n", ustackbase);
|
llerr("stack base: %08x\n", ustackbase);
|
||||||
lldbg("stack size: %08x\n", ustacksize);
|
llerr("stack size: %08x\n", ustacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
llerr("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Dump the user stack if the stack pointer lies within the allocated user
|
/* Dump the user stack if the stack pointer lies within the allocated user
|
||||||
@@ -330,7 +330,7 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
if (sp > ustackbase || sp <= ustackbase - ustacksize)
|
if (sp > ustackbase || sp <= ustackbase - ustacksize)
|
||||||
{
|
{
|
||||||
lldbg("ERROR: Stack pointer is not within allocated stack\n");
|
llerr("ERROR: Stack pointer is not within allocated stack\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -401,10 +401,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
board_autoled_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
llerr("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
filename, lineno, rtcb->name);
|
filename, lineno, rtcb->name);
|
||||||
#else
|
#else
|
||||||
lldbg("Assertion failed at file:%s line: %d\n",
|
llerr("Assertion failed at file:%s line: %d\n",
|
||||||
filename, lineno);
|
filename, lineno);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -83,25 +83,25 @@ void up_dumpnvic(FAR const char *msg)
|
|||||||
|
|
||||||
flags = enter_critical_section();
|
flags = enter_critical_section();
|
||||||
|
|
||||||
lldbg("NVIC: %s\n", msg);
|
llerr("NVIC: %s\n", msg);
|
||||||
lldbg(" ISER: %08x ICER: %08x ISPR: %08x ICPR: %08x\n",
|
llerr(" ISER: %08x ICER: %08x ISPR: %08x ICPR: %08x\n",
|
||||||
getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER),
|
getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER),
|
||||||
getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR));
|
getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR));
|
||||||
|
|
||||||
for (i = 0 ; i < 8; i += 4)
|
for (i = 0 ; i < 8; i += 4)
|
||||||
{
|
{
|
||||||
lldbg(" IPR%d: %08x IPR%d: %08x IPR%d: %08x IPR%d: %08x\n",
|
llerr(" IPR%d: %08x IPR%d: %08x IPR%d: %08x IPR%d: %08x\n",
|
||||||
i, getreg32(ARMV6M_NVIC_IPR(i)),
|
i, getreg32(ARMV6M_NVIC_IPR(i)),
|
||||||
i+1, getreg32(ARMV6M_NVIC_IPR(i+1)),
|
i+1, getreg32(ARMV6M_NVIC_IPR(i+1)),
|
||||||
i+2, getreg32(ARMV6M_NVIC_IPR(i+2)),
|
i+2, getreg32(ARMV6M_NVIC_IPR(i+2)),
|
||||||
i+3, getreg32(ARMV6M_NVIC_IPR(i+3)));
|
i+3, getreg32(ARMV6M_NVIC_IPR(i+3)));
|
||||||
}
|
}
|
||||||
|
|
||||||
lldbg("SYSCON:\n");
|
llerr("SYSCON:\n");
|
||||||
lldbg(" CPUID: %08x ICSR: %08x AIRCR: %08x SCR: %08x\n",
|
llerr(" CPUID: %08x ICSR: %08x AIRCR: %08x SCR: %08x\n",
|
||||||
getreg32(ARMV6M_SYSCON_CPUID), getreg32(ARMV6M_SYSCON_ICSR),
|
getreg32(ARMV6M_SYSCON_CPUID), getreg32(ARMV6M_SYSCON_ICSR),
|
||||||
getreg32(ARMV6M_SYSCON_AIRCR), getreg32(ARMV6M_SYSCON_SCR));
|
getreg32(ARMV6M_SYSCON_AIRCR), getreg32(ARMV6M_SYSCON_SCR));
|
||||||
lldbg(" CCR: %08x SHPR2: %08x SHPR3: %08x\n",
|
llerr(" CCR: %08x SHPR2: %08x SHPR3: %08x\n",
|
||||||
getreg32(ARMV6M_SYSCON_CCR), getreg32(ARMV6M_SYSCON_SHPR2),
|
getreg32(ARMV6M_SYSCON_CCR), getreg32(ARMV6M_SYSCON_SHPR2),
|
||||||
getreg32(ARMV6M_SYSCON_SHPR3));
|
getreg32(ARMV6M_SYSCON_SHPR3));
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_HARDFAULT
|
#ifdef CONFIG_DEBUG_HARDFAULT
|
||||||
# define hfdbg(format, ...) lldbg(format, ##__VA_ARGS__)
|
# define hfdbg(format, ...) llerr(format, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
# define hfdbg(x...)
|
# define hfdbg(x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -149,7 +149,7 @@ int up_hardfault(int irq, FAR void *context)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
(void)up_irq_save();
|
(void)up_irq_save();
|
||||||
lldbg("PANIC!!! Hard fault\n");
|
llerr("PANIC!!! Hard fault\n");
|
||||||
PANIC();
|
PANIC();
|
||||||
return OK; /* Won't get here */
|
return OK; /* Won't get here */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ void up_release_pending(void)
|
|||||||
{
|
{
|
||||||
struct tcb_s *rtcb = this_task();
|
struct tcb_s *rtcb = this_task();
|
||||||
|
|
||||||
slldbg("From TCB=%p\n", rtcb);
|
sllerr("From TCB=%p\n", rtcb);
|
||||||
|
|
||||||
/* Merge the g_pendingtasks list into the ready-to-run task list */
|
/* Merge the g_pendingtasks list into the ready-to-run task list */
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
struct tcb_s *rtcb = this_task();
|
struct tcb_s *rtcb = this_task();
|
||||||
bool switch_needed;
|
bool switch_needed;
|
||||||
|
|
||||||
slldbg("TCB=%p PRI=%d\n", tcb, priority);
|
sllerr("TCB=%p PRI=%d\n", tcb, priority);
|
||||||
|
|
||||||
/* Remove the tcb task from the ready-to-run list.
|
/* Remove the tcb task from the ready-to-run list.
|
||||||
* sched_removereadytorun will return true if we just removed the head
|
* sched_removereadytorun will return true if we just removed the head
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
|
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
|
||||||
# define svcdbg(format, ...) lldbg(format, ##__VA_ARGS__)
|
# define svcdbg(format, ...) llerr(format, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
# define svcdbg(x...)
|
# define svcdbg(x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -471,7 +471,7 @@ int up_svcall(int irq, FAR void *context)
|
|||||||
|
|
||||||
regs[REG_R0] -= CONFIG_SYS_RESERVED;
|
regs[REG_R0] -= CONFIG_SYS_RESERVED;
|
||||||
#else
|
#else
|
||||||
slldbg("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
|
sllerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
* code. We are going to print the task name if:
|
* code. We are going to print the task name if:
|
||||||
*
|
*
|
||||||
* CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name
|
* CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name
|
||||||
* (defined(CONFIG_DEBUG_FEATURES) || <-- And the debug is enabled (lldbg used)
|
* (defined(CONFIG_DEBUG_FEATURES) || <-- And the debug is enabled (llerr used)
|
||||||
* defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used
|
* defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
|||||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||||
{
|
{
|
||||||
uint32_t *ptr = (uint32_t *)stack;
|
uint32_t *ptr = (uint32_t *)stack;
|
||||||
lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||||
}
|
}
|
||||||
@@ -140,11 +140,11 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg)
|
|||||||
/* Dump interesting properties of this task */
|
/* Dump interesting properties of this task */
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("%s: PID=%d Stack Used=%lu of %lu\n",
|
llerr("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||||
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||||
(unsigned long)tcb->adj_stack_size);
|
(unsigned long)tcb->adj_stack_size);
|
||||||
#else
|
#else
|
||||||
lldbg("PID: %d Stack Used=%lu of %lu\n",
|
llerr("PID: %d Stack Used=%lu of %lu\n",
|
||||||
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||||
(unsigned long)tcb->adj_stack_size);
|
(unsigned long)tcb->adj_stack_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -184,12 +184,12 @@ static inline void up_registerdump(void)
|
|||||||
for (regs = REG_R0; regs <= REG_R15; regs += 8)
|
for (regs = REG_R0; regs <= REG_R15; regs += 8)
|
||||||
{
|
{
|
||||||
uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs];
|
uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs];
|
||||||
lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
regs, ptr[0], ptr[1], ptr[2], ptr[3],
|
regs, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
lldbg("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
llerr("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -253,7 +253,7 @@ static void up_dumpstate(void)
|
|||||||
ustacksize = (uint32_t)rtcb->adj_stack_size;
|
ustacksize = (uint32_t)rtcb->adj_stack_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
lldbg("Current sp: %08x\n", sp);
|
llerr("Current sp: %08x\n", sp);
|
||||||
|
|
||||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||||
/* Get the limits on the interrupt stack memory */
|
/* Get the limits on the interrupt stack memory */
|
||||||
@@ -263,21 +263,21 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
/* Show interrupt stack info */
|
/* Show interrupt stack info */
|
||||||
|
|
||||||
lldbg("Interrupt stack:\n");
|
llerr("Interrupt stack:\n");
|
||||||
lldbg(" base: %08x\n", istackbase);
|
llerr(" base: %08x\n", istackbase);
|
||||||
lldbg(" size: %08x\n", istacksize);
|
llerr(" size: %08x\n", istacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_intstack());
|
llerr(" used: %08x\n", up_check_intstack());
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Show user stack info */
|
/* Show user stack info */
|
||||||
|
|
||||||
lldbg("User stack:\n");
|
llerr("User stack:\n");
|
||||||
lldbg(" base: %08x\n", ustackbase);
|
llerr(" base: %08x\n", ustackbase);
|
||||||
lldbg(" size: %08x\n", ustacksize);
|
llerr(" size: %08x\n", ustacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
llerr(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_KERNEL_STACK
|
#ifdef CONFIG_ARCH_KERNEL_STACK
|
||||||
@@ -287,9 +287,9 @@ static void up_dumpstate(void)
|
|||||||
{
|
{
|
||||||
kstackbase = (uint32_t)rtcb->xcp.kstack + CONFIG_ARCH_KERNEL_STACKSIZE - 4;
|
kstackbase = (uint32_t)rtcb->xcp.kstack + CONFIG_ARCH_KERNEL_STACKSIZE - 4;
|
||||||
|
|
||||||
lldbg("Kernel stack:\n");
|
llerr("Kernel stack:\n");
|
||||||
lldbg(" base: %08x\n", kstackbase);
|
llerr(" base: %08x\n", kstackbase);
|
||||||
lldbg(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE);
|
llerr(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@ static void up_dumpstate(void)
|
|||||||
{
|
{
|
||||||
/* Yes.. dump the interrupt stack */
|
/* Yes.. dump the interrupt stack */
|
||||||
|
|
||||||
lldbg("Interrupt Stack\n", sp);
|
llerr("Interrupt Stack\n", sp);
|
||||||
up_stackdump(sp, istackbase);
|
up_stackdump(sp, istackbase);
|
||||||
|
|
||||||
/* Extract the user stack pointer which should lie
|
/* Extract the user stack pointer which should lie
|
||||||
@@ -308,7 +308,7 @@ static void up_dumpstate(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sp = g_intstackbase;
|
sp = g_intstackbase;
|
||||||
lldbg("User sp: %08x\n", sp);
|
llerr("User sp: %08x\n", sp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -318,7 +318,7 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
if (sp > ustackbase - ustacksize && sp < ustackbase)
|
if (sp > ustackbase - ustacksize && sp < ustackbase)
|
||||||
{
|
{
|
||||||
lldbg("User Stack\n", sp);
|
llerr("User Stack\n", sp);
|
||||||
up_stackdump(sp, ustackbase);
|
up_stackdump(sp, ustackbase);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
if (sp >= (uint32_t)rtcb->xcp.kstack && sp < kstackbase)
|
if (sp >= (uint32_t)rtcb->xcp.kstack && sp < kstackbase)
|
||||||
{
|
{
|
||||||
lldbg("Kernel Stack\n", sp);
|
llerr("Kernel Stack\n", sp);
|
||||||
up_stackdump(sp, kstackbase);
|
up_stackdump(sp, kstackbase);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -337,7 +337,7 @@ static void up_dumpstate(void)
|
|||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
/* Show the CPU number */
|
/* Show the CPU number */
|
||||||
|
|
||||||
lldbg("CPU%d:\n", up_cpu_index());
|
llerr("CPU%d:\n", up_cpu_index());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Then dump the CPU registers (if available) */
|
/* Then dump the CPU registers (if available) */
|
||||||
@@ -402,10 +402,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
board_autoled_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
llerr("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
filename, lineno, rtcb->name);
|
filename, lineno, rtcb->name);
|
||||||
#else
|
#else
|
||||||
lldbg("Assertion failed at file:%s line: %d\n",
|
llerr("Assertion failed at file:%s line: %d\n",
|
||||||
filename, lineno);
|
filename, lineno);
|
||||||
#endif
|
#endif
|
||||||
up_dumpstate();
|
up_dumpstate();
|
||||||
|
|||||||
@@ -64,19 +64,19 @@ static inline void arm_registerdump(FAR struct tcb_s *tcb)
|
|||||||
{
|
{
|
||||||
int regndx;
|
int regndx;
|
||||||
|
|
||||||
lldbg("CPU%d:\n", up_cpu_index());
|
llerr("CPU%d:\n", up_cpu_index());
|
||||||
|
|
||||||
/* Dump the startup registers */
|
/* Dump the startup registers */
|
||||||
|
|
||||||
for (regndx = REG_R0; regndx <= REG_R15; regndx += 8)
|
for (regndx = REG_R0; regndx <= REG_R15; regndx += 8)
|
||||||
{
|
{
|
||||||
uint32_t *ptr = (uint32_t *)&tcb->xcp.regs[regndx];
|
uint32_t *ptr = (uint32_t *)&tcb->xcp.regs[regndx];
|
||||||
lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
regndx, ptr[0], ptr[1], ptr[2], ptr[3],
|
regndx, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
lldbg("CPSR: %08x\n", tcb->xcp.regs[REG_CPSR]);
|
llerr("CPSR: %08x\n", tcb->xcp.regs[REG_CPSR]);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define arm_registerdump(tcb)
|
# define arm_registerdump(tcb)
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr)
|
|||||||
* fatal error.
|
* fatal error.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pglldbg("DFSR: %08x DFAR: %08x\n", dfsr, dfar);
|
pgllerr("DFSR: %08x DFAR: %08x\n", dfsr, dfar);
|
||||||
if ((dfsr & FSR_MASK) != FSR_PAGE)
|
if ((dfsr & FSR_MASK) != FSR_PAGE)
|
||||||
{
|
{
|
||||||
goto segfault;
|
goto segfault;
|
||||||
@@ -163,7 +163,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr)
|
|||||||
return regs;
|
return regs;
|
||||||
|
|
||||||
segfault:
|
segfault:
|
||||||
lldbg("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n",
|
llerr("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n",
|
||||||
regs[REG_PC], dfar, dfsr);
|
regs[REG_PC], dfar, dfsr);
|
||||||
PANIC();
|
PANIC();
|
||||||
return regs; /* To keep the compiler happy */
|
return regs; /* To keep the compiler happy */
|
||||||
@@ -181,7 +181,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr)
|
|||||||
|
|
||||||
/* Crash -- possibly showing diagnostic debug information. */
|
/* Crash -- possibly showing diagnostic debug information. */
|
||||||
|
|
||||||
lldbg("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n",
|
llerr("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n",
|
||||||
regs[REG_PC], dfar, dfsr);
|
regs[REG_PC], dfar, dfsr);
|
||||||
PANIC();
|
PANIC();
|
||||||
return regs; /* To keep the compiler happy */
|
return regs; /* To keep the compiler happy */
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ void up_l2ccinitialize(void)
|
|||||||
putreg32(L2CC_CR_L2CEN, L2CC_CR);
|
putreg32(L2CC_CR_L2CEN, L2CC_CR);
|
||||||
}
|
}
|
||||||
|
|
||||||
lldbg("(%d ways) * (%d bytes/way) = %d bytes\n",
|
llerr("(%d ways) * (%d bytes/way) = %d bytes\n",
|
||||||
PL310_NWAYS, PL310_WAYSIZE, PL310_CACHE_SIZE);
|
PL310_NWAYS, PL310_WAYSIZE, PL310_CACHE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
|||||||
* virtual addresses.
|
* virtual addresses.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pglldbg("VADDR: %08x VBASE: %08x VEND: %08x\n",
|
pgllerr("VADDR: %08x VBASE: %08x VEND: %08x\n",
|
||||||
regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND);
|
regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND);
|
||||||
|
|
||||||
if (regs[REG_R15] >= PG_PAGED_VBASE && regs[REG_R15] < PG_PAGED_VEND)
|
if (regs[REG_R15] >= PG_PAGED_VBASE && regs[REG_R15] < PG_PAGED_VEND)
|
||||||
@@ -134,7 +134,7 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lldbg("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n",
|
llerr("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n",
|
||||||
regs[REG_PC], ifar, ifsr);
|
regs[REG_PC], ifar, ifsr);
|
||||||
PANIC();
|
PANIC();
|
||||||
}
|
}
|
||||||
@@ -154,7 +154,7 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
|||||||
|
|
||||||
/* Crash -- possibly showing diagnostic debug information. */
|
/* Crash -- possibly showing diagnostic debug information. */
|
||||||
|
|
||||||
lldbg("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n",
|
llerr("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n",
|
||||||
regs[REG_PC], ifar, ifsr);
|
regs[REG_PC], ifar, ifsr);
|
||||||
PANIC();
|
PANIC();
|
||||||
return regs; /* To keep the compiler happy */
|
return regs; /* To keep the compiler happy */
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void up_release_pending(void)
|
|||||||
{
|
{
|
||||||
struct tcb_s *rtcb = this_task();
|
struct tcb_s *rtcb = this_task();
|
||||||
|
|
||||||
slldbg("From TCB=%p\n", rtcb);
|
sllerr("From TCB=%p\n", rtcb);
|
||||||
|
|
||||||
/* Merge the g_pendingtasks list into the ready-to-run task list */
|
/* Merge the g_pendingtasks list into the ready-to-run task list */
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
struct tcb_s *rtcb = this_task();
|
struct tcb_s *rtcb = this_task();
|
||||||
bool switch_needed;
|
bool switch_needed;
|
||||||
|
|
||||||
slldbg("TCB=%p PRI=%d\n", tcb, priority);
|
sllerr("TCB=%p PRI=%d\n", tcb, priority);
|
||||||
|
|
||||||
/* Remove the tcb task from the ready-to-run list.
|
/* Remove the tcb task from the ready-to-run list.
|
||||||
* sched_removereadytorun will return true if we just
|
* sched_removereadytorun will return true if we just
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
/* Debug ********************************************************************/
|
/* Debug ********************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_SYSCALL)
|
#if defined(CONFIG_DEBUG_SYSCALL)
|
||||||
# define svcdbg(format, ...) lldbg(format, ##__VA_ARGS__)
|
# define svcdbg(format, ...) llerr(format, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
# define svcdbg(x...)
|
# define svcdbg(x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -526,7 +526,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
|||||||
|
|
||||||
uint32_t *arm_syscall(uint32_t *regs)
|
uint32_t *arm_syscall(uint32_t *regs)
|
||||||
{
|
{
|
||||||
lldbg("SYSCALL from 0x%x\n", regs[REG_PC]);
|
llerr("SYSCALL from 0x%x\n", regs[REG_PC]);
|
||||||
CURRENT_REGS = regs;
|
CURRENT_REGS = regs;
|
||||||
PANIC();
|
PANIC();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
uint32_t *arm_undefinedinsn(uint32_t *regs)
|
uint32_t *arm_undefinedinsn(uint32_t *regs)
|
||||||
{
|
{
|
||||||
lldbg("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
llerr("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
||||||
CURRENT_REGS = regs;
|
CURRENT_REGS = regs;
|
||||||
PANIC();
|
PANIC();
|
||||||
return regs; /* To keep the compiler happy */
|
return regs; /* To keep the compiler happy */
|
||||||
|
|||||||
@@ -595,12 +595,12 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_DEBUG_IRQ
|
#ifdef CONFIG_DEBUG_IRQ
|
||||||
# define gicdbg(format, ...) dbg(format, ##__VA_ARGS__)
|
# define gicdbg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||||
# define giclldbg(format, ...) lldbg(format, ##__VA_ARGS__)
|
# define gicllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||||
# define gicinfo(format, ...) info(format, ##__VA_ARGS__)
|
# define gicinfo(format, ...) info(format, ##__VA_ARGS__)
|
||||||
# define gicllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
# define gicllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
# define gicdbg(x...)
|
# define gicdbg(x...)
|
||||||
# define giclldbg(x...)
|
# define gicllerr(x...)
|
||||||
# define gicinfo(x...)
|
# define gicinfo(x...)
|
||||||
# define gicllinfo(x...)
|
# define gicllinfo(x...)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
* code. We are going to print the task name if:
|
* code. We are going to print the task name if:
|
||||||
*
|
*
|
||||||
* CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name
|
* CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name
|
||||||
* (defined(CONFIG_DEBUG_FEATURES) || <-- And the debug is enabled (lldbg used)
|
* (defined(CONFIG_DEBUG_FEATURES) || <-- And the debug is enabled (llerr used)
|
||||||
* defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used
|
* defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
|||||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||||
{
|
{
|
||||||
uint32_t *ptr = (uint32_t *)stack;
|
uint32_t *ptr = (uint32_t *)stack;
|
||||||
lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||||
}
|
}
|
||||||
@@ -144,11 +144,11 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg)
|
|||||||
/* Dump interesting properties of this task */
|
/* Dump interesting properties of this task */
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("%s: PID=%d Stack Used=%lu of %lu\n",
|
llerr("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||||
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||||
(unsigned long)tcb->adj_stack_size);
|
(unsigned long)tcb->adj_stack_size);
|
||||||
#else
|
#else
|
||||||
lldbg("PID: %d Stack Used=%lu of %lu\n",
|
llerr("PID: %d Stack Used=%lu of %lu\n",
|
||||||
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||||
(unsigned long)tcb->adj_stack_size);
|
(unsigned long)tcb->adj_stack_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -183,29 +183,29 @@ static inline void up_registerdump(void)
|
|||||||
{
|
{
|
||||||
/* Yes.. dump the interrupt registers */
|
/* Yes.. dump the interrupt registers */
|
||||||
|
|
||||||
lldbg("R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1],
|
CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1],
|
||||||
CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3],
|
CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3],
|
||||||
CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5],
|
CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5],
|
||||||
CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]);
|
CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]);
|
||||||
lldbg("R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9],
|
CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9],
|
||||||
CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
|
CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
|
||||||
CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
|
CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
|
||||||
CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
|
CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
|
||||||
|
|
||||||
#ifdef CONFIG_ARMV7M_USEBASEPRI
|
#ifdef CONFIG_ARMV7M_USEBASEPRI
|
||||||
lldbg("xPSR: %08x BASEPRI: %08x CONTROL: %08x\n",
|
llerr("xPSR: %08x BASEPRI: %08x CONTROL: %08x\n",
|
||||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI],
|
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI],
|
||||||
getcontrol());
|
getcontrol());
|
||||||
#else
|
#else
|
||||||
lldbg("xPSR: %08x PRIMASK: %08x CONTROL: %08x\n",
|
llerr("xPSR: %08x PRIMASK: %08x CONTROL: %08x\n",
|
||||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
|
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
|
||||||
getcontrol());
|
getcontrol());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef REG_EXC_RETURN
|
#ifdef REG_EXC_RETURN
|
||||||
lldbg("EXC_RETURN: %08x\n", CURRENT_REGS[REG_EXC_RETURN]);
|
llerr("EXC_RETURN: %08x\n", CURRENT_REGS[REG_EXC_RETURN]);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -275,12 +275,12 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
/* Show interrupt stack info */
|
/* Show interrupt stack info */
|
||||||
|
|
||||||
lldbg("sp: %08x\n", sp);
|
llerr("sp: %08x\n", sp);
|
||||||
lldbg("IRQ stack:\n");
|
llerr("IRQ stack:\n");
|
||||||
lldbg(" base: %08x\n", istackbase);
|
llerr(" base: %08x\n", istackbase);
|
||||||
lldbg(" size: %08x\n", istacksize);
|
llerr(" size: %08x\n", istacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_intstack());
|
llerr(" used: %08x\n", up_check_intstack());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Does the current stack pointer lie within the interrupt
|
/* Does the current stack pointer lie within the interrupt
|
||||||
@@ -302,14 +302,14 @@ static void up_dumpstate(void)
|
|||||||
if (CURRENT_REGS)
|
if (CURRENT_REGS)
|
||||||
{
|
{
|
||||||
sp = CURRENT_REGS[REG_R13];
|
sp = CURRENT_REGS[REG_R13];
|
||||||
lldbg("sp: %08x\n", sp);
|
llerr("sp: %08x\n", sp);
|
||||||
}
|
}
|
||||||
|
|
||||||
lldbg("User stack:\n");
|
llerr("User stack:\n");
|
||||||
lldbg(" base: %08x\n", ustackbase);
|
llerr(" base: %08x\n", ustackbase);
|
||||||
lldbg(" size: %08x\n", ustacksize);
|
llerr(" size: %08x\n", ustacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
llerr(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Dump the user stack if the stack pointer lies within the allocated user
|
/* Dump the user stack if the stack pointer lies within the allocated user
|
||||||
@@ -325,11 +325,11 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
/* Show user stack info */
|
/* Show user stack info */
|
||||||
|
|
||||||
lldbg("sp: %08x\n", sp);
|
llerr("sp: %08x\n", sp);
|
||||||
lldbg("stack base: %08x\n", ustackbase);
|
llerr("stack base: %08x\n", ustackbase);
|
||||||
lldbg("stack size: %08x\n", ustacksize);
|
llerr("stack size: %08x\n", ustacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg("stack used: %08x\n", up_check_tcbstack(rtcb));
|
llerr("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Dump the user stack if the stack pointer lies within the allocated user
|
/* Dump the user stack if the stack pointer lies within the allocated user
|
||||||
@@ -338,7 +338,7 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
if (sp > ustackbase || sp <= ustackbase - ustacksize)
|
if (sp > ustackbase || sp <= ustackbase - ustacksize)
|
||||||
{
|
{
|
||||||
lldbg("ERROR: Stack pointer is not within the allocated stack\n");
|
llerr("ERROR: Stack pointer is not within the allocated stack\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -410,10 +410,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
board_autoled_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
llerr("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
filename, lineno, rtcb->name);
|
filename, lineno, rtcb->name);
|
||||||
#else
|
#else
|
||||||
lldbg("Assertion failed at file:%s line: %d\n",
|
llerr("Assertion failed at file:%s line: %d\n",
|
||||||
filename, lineno);
|
filename, lineno);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_HARDFAULT
|
#ifdef CONFIG_DEBUG_HARDFAULT
|
||||||
# define hfdbg(format, ...) lldbg(format, ##__VA_ARGS__)
|
# define hfdbg(format, ...) llerr(format, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
# define hfdbg(x...)
|
# define hfdbg(x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -179,7 +179,7 @@ int up_hardfault(int irq, FAR void *context)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
(void)up_irq_save();
|
(void)up_irq_save();
|
||||||
lldbg("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS));
|
llerr("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS));
|
||||||
PANIC();
|
PANIC();
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
#undef DEBUG_MEMFAULTS /* Define to debug memory management faults */
|
#undef DEBUG_MEMFAULTS /* Define to debug memory management faults */
|
||||||
|
|
||||||
#ifdef DEBUG_MEMFAULTS
|
#ifdef DEBUG_MEMFAULTS
|
||||||
# define mfdbg(format, ...) lldbg(format, ##__VA_ARGS__)
|
# define mfdbg(format, ...) llerr(format, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
# define mfdbg(x...)
|
# define mfdbg(x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -92,9 +92,9 @@ int up_memfault(int irq, FAR void *context)
|
|||||||
/* Dump some memory management fault info */
|
/* Dump some memory management fault info */
|
||||||
|
|
||||||
(void)up_irq_save();
|
(void)up_irq_save();
|
||||||
lldbg("PANIC!!! Memory Management Fault:\n");
|
llerr("PANIC!!! Memory Management Fault:\n");
|
||||||
mfdbg(" IRQ: %d context: %p\n", irq, regs);
|
mfdbg(" IRQ: %d context: %p\n", irq, regs);
|
||||||
lldbg(" CFAULTS: %08x MMFAR: %08x\n",
|
llerr(" CFAULTS: %08x MMFAR: %08x\n",
|
||||||
getreg32(NVIC_CFAULTS), getreg32(NVIC_MEMMANAGE_ADDR));
|
getreg32(NVIC_CFAULTS), getreg32(NVIC_MEMMANAGE_ADDR));
|
||||||
mfdbg(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x CONTROL: %08x\n",
|
mfdbg(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x CONTROL: %08x\n",
|
||||||
getbasepri(), getprimask(), getipsr(), getcontrol());
|
getbasepri(), getprimask(), getipsr(), getcontrol());
|
||||||
|
|||||||
@@ -54,12 +54,12 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Debug ********************************************************************/
|
/* Debug ********************************************************************/
|
||||||
/* Non-standard debug that may be enabled just for testing the interrupt
|
/* Non-standard debug that may be enabled just for testing the interrupt
|
||||||
* config. NOTE: that only lldbg types are used so that the output is
|
* config. NOTE: that only llerr types are used so that the output is
|
||||||
* immediately available.
|
* immediately available.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_IRQ
|
#ifdef CONFIG_DEBUG_IRQ
|
||||||
# define intdbg lldbg
|
# define intdbg llerr
|
||||||
# define intinfo llinfo
|
# define intinfo llinfo
|
||||||
#else
|
#else
|
||||||
# define intdbg(x...)
|
# define intdbg(x...)
|
||||||
|
|||||||
@@ -73,12 +73,12 @@
|
|||||||
|
|
||||||
/* Debug ********************************************************************/
|
/* Debug ********************************************************************/
|
||||||
/* Non-standard debug that may be enabled just for testing the interrupt
|
/* Non-standard debug that may be enabled just for testing the interrupt
|
||||||
* config. NOTE: that only lldbg types are used so that the output is
|
* config. NOTE: that only llerr types are used so that the output is
|
||||||
* immediately available.
|
* immediately available.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_IRQ
|
#ifdef CONFIG_DEBUG_IRQ
|
||||||
# define intdbg lldbg
|
# define intdbg llerr
|
||||||
# define intinfo llinfo
|
# define intinfo llinfo
|
||||||
#else
|
#else
|
||||||
# define intdbg(x...)
|
# define intdbg(x...)
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ void up_release_pending(void)
|
|||||||
{
|
{
|
||||||
struct tcb_s *rtcb = this_task();
|
struct tcb_s *rtcb = this_task();
|
||||||
|
|
||||||
slldbg("From TCB=%p\n", rtcb);
|
sllerr("From TCB=%p\n", rtcb);
|
||||||
|
|
||||||
/* Merge the g_pendingtasks list into the ready-to-run task list */
|
/* Merge the g_pendingtasks list into the ready-to-run task list */
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
struct tcb_s *rtcb = this_task();
|
struct tcb_s *rtcb = this_task();
|
||||||
bool switch_needed;
|
bool switch_needed;
|
||||||
|
|
||||||
slldbg("TCB=%p PRI=%d\n", tcb, priority);
|
sllerr("TCB=%p PRI=%d\n", tcb, priority);
|
||||||
|
|
||||||
/* Remove the tcb task from the ready-to-run list.
|
/* Remove the tcb task from the ready-to-run list.
|
||||||
* sched_removereadytorun will return true if we just removed the head
|
* sched_removereadytorun will return true if we just removed the head
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
|
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
|
||||||
# define svcdbg(format, ...) lldbg(format, ##__VA_ARGS__)
|
# define svcdbg(format, ...) llerr(format, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
# define svcdbg(x...)
|
# define svcdbg(x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -473,7 +473,7 @@ int up_svcall(int irq, FAR void *context)
|
|||||||
|
|
||||||
regs[REG_R0] -= CONFIG_SYS_RESERVED;
|
regs[REG_R0] -= CONFIG_SYS_RESERVED;
|
||||||
#else
|
#else
|
||||||
slldbg("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
|
sllerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
* code. We are going to print the task name if:
|
* code. We are going to print the task name if:
|
||||||
*
|
*
|
||||||
* CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name
|
* CONFIG_TASK_NAME_SIZE > 0 && <-- The task has a name
|
||||||
* (defined(CONFIG_DEBUG_FEATURES) || <-- And the debug is enabled (lldbg used)
|
* (defined(CONFIG_DEBUG_FEATURES) || <-- And the debug is enabled (llerr used)
|
||||||
* defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used
|
* defined(CONFIG_ARCH_STACKDUMP) <-- Or lowsyslog() is used
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
|||||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||||
{
|
{
|
||||||
uint32_t *ptr = (uint32_t *)stack;
|
uint32_t *ptr = (uint32_t *)stack;
|
||||||
lldbg("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||||
}
|
}
|
||||||
@@ -140,11 +140,11 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg)
|
|||||||
/* Dump interesting properties of this task */
|
/* Dump interesting properties of this task */
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("%s: PID=%d Stack Used=%lu of %lu\n",
|
llerr("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||||
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||||
(unsigned long)tcb->adj_stack_size);
|
(unsigned long)tcb->adj_stack_size);
|
||||||
#else
|
#else
|
||||||
lldbg("PID: %d Stack Used=%lu of %lu\n",
|
llerr("PID: %d Stack Used=%lu of %lu\n",
|
||||||
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||||
(unsigned long)tcb->adj_stack_size);
|
(unsigned long)tcb->adj_stack_size);
|
||||||
#endif
|
#endif
|
||||||
@@ -184,12 +184,12 @@ static inline void up_registerdump(void)
|
|||||||
for (regs = REG_R0; regs <= REG_R15; regs += 8)
|
for (regs = REG_R0; regs <= REG_R15; regs += 8)
|
||||||
{
|
{
|
||||||
uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs];
|
uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs];
|
||||||
lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
llerr("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
regs, ptr[0], ptr[1], ptr[2], ptr[3],
|
regs, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
lldbg("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
llerr("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@@ -253,7 +253,7 @@ static void up_dumpstate(void)
|
|||||||
ustacksize = (uint32_t)rtcb->adj_stack_size;
|
ustacksize = (uint32_t)rtcb->adj_stack_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
lldbg("Current sp: %08x\n", sp);
|
llerr("Current sp: %08x\n", sp);
|
||||||
|
|
||||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||||
/* Get the limits on the interrupt stack memory */
|
/* Get the limits on the interrupt stack memory */
|
||||||
@@ -263,21 +263,21 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
/* Show interrupt stack info */
|
/* Show interrupt stack info */
|
||||||
|
|
||||||
lldbg("Interrupt stack:\n");
|
llerr("Interrupt stack:\n");
|
||||||
lldbg(" base: %08x\n", istackbase);
|
llerr(" base: %08x\n", istackbase);
|
||||||
lldbg(" size: %08x\n", istacksize);
|
llerr(" size: %08x\n", istacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_intstack());
|
llerr(" used: %08x\n", up_check_intstack());
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Show user stack info */
|
/* Show user stack info */
|
||||||
|
|
||||||
lldbg("User stack:\n");
|
llerr("User stack:\n");
|
||||||
lldbg(" base: %08x\n", ustackbase);
|
llerr(" base: %08x\n", ustackbase);
|
||||||
lldbg(" size: %08x\n", ustacksize);
|
llerr(" size: %08x\n", ustacksize);
|
||||||
#ifdef CONFIG_STACK_COLORATION
|
#ifdef CONFIG_STACK_COLORATION
|
||||||
lldbg(" used: %08x\n", up_check_tcbstack(rtcb));
|
llerr(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_KERNEL_STACK
|
#ifdef CONFIG_ARCH_KERNEL_STACK
|
||||||
@@ -287,9 +287,9 @@ static void up_dumpstate(void)
|
|||||||
{
|
{
|
||||||
kstackbase = (uint32_t)rtcb->xcp.kstack + CONFIG_ARCH_KERNEL_STACKSIZE - 4;
|
kstackbase = (uint32_t)rtcb->xcp.kstack + CONFIG_ARCH_KERNEL_STACKSIZE - 4;
|
||||||
|
|
||||||
lldbg("Kernel stack:\n");
|
llerr("Kernel stack:\n");
|
||||||
lldbg(" base: %08x\n", kstackbase);
|
llerr(" base: %08x\n", kstackbase);
|
||||||
lldbg(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE);
|
llerr(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@ static void up_dumpstate(void)
|
|||||||
{
|
{
|
||||||
/* Yes.. dump the interrupt stack */
|
/* Yes.. dump the interrupt stack */
|
||||||
|
|
||||||
lldbg("Interrupt Stack\n", sp);
|
llerr("Interrupt Stack\n", sp);
|
||||||
up_stackdump(sp, istackbase);
|
up_stackdump(sp, istackbase);
|
||||||
|
|
||||||
/* Extract the user stack pointer which should lie
|
/* Extract the user stack pointer which should lie
|
||||||
@@ -308,7 +308,7 @@ static void up_dumpstate(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
sp = g_intstackbase;
|
sp = g_intstackbase;
|
||||||
lldbg("User sp: %08x\n", sp);
|
llerr("User sp: %08x\n", sp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -318,7 +318,7 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
if (sp > ustackbase - ustacksize && sp < ustackbase)
|
if (sp > ustackbase - ustacksize && sp < ustackbase)
|
||||||
{
|
{
|
||||||
lldbg("User Stack\n", sp);
|
llerr("User Stack\n", sp);
|
||||||
up_stackdump(sp, ustackbase);
|
up_stackdump(sp, ustackbase);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
if (sp >= (uint32_t)rtcb->xcp.kstack && sp < kstackbase)
|
if (sp >= (uint32_t)rtcb->xcp.kstack && sp < kstackbase)
|
||||||
{
|
{
|
||||||
lldbg("Kernel Stack\n", sp);
|
llerr("Kernel Stack\n", sp);
|
||||||
up_stackdump(sp, kstackbase);
|
up_stackdump(sp, kstackbase);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -396,10 +396,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
|||||||
board_autoled_on(LED_ASSERTION);
|
board_autoled_on(LED_ASSERTION);
|
||||||
|
|
||||||
#ifdef CONFIG_PRINT_TASKNAME
|
#ifdef CONFIG_PRINT_TASKNAME
|
||||||
lldbg("Assertion failed at file:%s line: %d task: %s\n",
|
llerr("Assertion failed at file:%s line: %d task: %s\n",
|
||||||
filename, lineno, rtcb->name);
|
filename, lineno, rtcb->name);
|
||||||
#else
|
#else
|
||||||
lldbg("Assertion failed at file:%s line: %d\n",
|
llerr("Assertion failed at file:%s line: %d\n",
|
||||||
filename, lineno);
|
filename, lineno);
|
||||||
#endif
|
#endif
|
||||||
up_dumpstate();
|
up_dumpstate();
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr)
|
|||||||
|
|
||||||
/* Crash -- possibly showing diagnostic debug information. */
|
/* Crash -- possibly showing diagnostic debug information. */
|
||||||
|
|
||||||
lldbg("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n",
|
llerr("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n",
|
||||||
regs[REG_PC], dfar, dfsr);
|
regs[REG_PC], dfar, dfsr);
|
||||||
PANIC();
|
PANIC();
|
||||||
return regs; /* To keep the compiler happy */
|
return regs; /* To keep the compiler happy */
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ void up_l2ccinitialize(void)
|
|||||||
putreg32(L2CC_CR_L2CEN, L2CC_CR);
|
putreg32(L2CC_CR_L2CEN, L2CC_CR);
|
||||||
}
|
}
|
||||||
|
|
||||||
lldbg("(%d ways) * (%d bytes/way) = %d bytes\n",
|
llerr("(%d ways) * (%d bytes/way) = %d bytes\n",
|
||||||
PL310_NWAYS, PL310_WAYSIZE, PL310_CACHE_SIZE);
|
PL310_NWAYS, PL310_WAYSIZE, PL310_CACHE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
|||||||
|
|
||||||
/* Crash -- possibly showing diagnostic debug information. */
|
/* Crash -- possibly showing diagnostic debug information. */
|
||||||
|
|
||||||
lldbg("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n",
|
llerr("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n",
|
||||||
regs[REG_PC], ifar, ifsr);
|
regs[REG_PC], ifar, ifsr);
|
||||||
PANIC();
|
PANIC();
|
||||||
return regs; /* To keep the compiler happy */
|
return regs; /* To keep the compiler happy */
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void up_release_pending(void)
|
|||||||
{
|
{
|
||||||
struct tcb_s *rtcb = this_task();
|
struct tcb_s *rtcb = this_task();
|
||||||
|
|
||||||
slldbg("From TCB=%p\n", rtcb);
|
sllerr("From TCB=%p\n", rtcb);
|
||||||
|
|
||||||
/* Merge the g_pendingtasks list into the ready-to-run task list */
|
/* Merge the g_pendingtasks list into the ready-to-run task list */
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
struct tcb_s *rtcb = this_task();
|
struct tcb_s *rtcb = this_task();
|
||||||
bool switch_needed;
|
bool switch_needed;
|
||||||
|
|
||||||
slldbg("TCB=%p PRI=%d\n", tcb, priority);
|
sllerr("TCB=%p PRI=%d\n", tcb, priority);
|
||||||
|
|
||||||
/* Remove the tcb task from the ready-to-run list.
|
/* Remove the tcb task from the ready-to-run list.
|
||||||
* sched_removereadytorun will return true if we just
|
* sched_removereadytorun will return true if we just
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
/* Debug ********************************************************************/
|
/* Debug ********************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_SYSCALL)
|
#if defined(CONFIG_DEBUG_SYSCALL)
|
||||||
# define svcdbg(format, ...) lldbg(format, ##__VA_ARGS__)
|
# define svcdbg(format, ...) llerr(format, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
# define svcdbg(x...)
|
# define svcdbg(x...)
|
||||||
#endif
|
#endif
|
||||||
@@ -524,7 +524,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
|||||||
|
|
||||||
uint32_t *arm_syscall(uint32_t *regs)
|
uint32_t *arm_syscall(uint32_t *regs)
|
||||||
{
|
{
|
||||||
lldbg("SYSCALL from 0x%x\n", regs[REG_PC]);
|
llerr("SYSCALL from 0x%x\n", regs[REG_PC]);
|
||||||
CURRENT_REGS = regs;
|
CURRENT_REGS = regs;
|
||||||
PANIC();
|
PANIC();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
|
|
||||||
uint32_t *arm_undefinedinsn(uint32_t *regs)
|
uint32_t *arm_undefinedinsn(uint32_t *regs)
|
||||||
{
|
{
|
||||||
lldbg("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
llerr("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
||||||
CURRENT_REGS = regs;
|
CURRENT_REGS = regs;
|
||||||
PANIC();
|
PANIC();
|
||||||
return regs; /* To keep the compiler happy */
|
return regs; /* To keep the compiler happy */
|
||||||
|
|||||||
@@ -2241,7 +2241,7 @@ void up_netinitialize(void)
|
|||||||
{
|
{
|
||||||
/* We could not attach the ISR to the ISR */
|
/* We could not attach the ISR to the ISR */
|
||||||
|
|
||||||
nlldbg("irq_attach() failed\n");
|
nllerr("irq_attach() failed\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -138,10 +138,10 @@ void _exit(int status)
|
|||||||
|
|
||||||
(void)up_irq_save();
|
(void)up_irq_save();
|
||||||
|
|
||||||
slldbg("TCB=%p exiting\n", this_task());
|
sllerr("TCB=%p exiting\n", this_task());
|
||||||
|
|
||||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES)
|
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES)
|
||||||
slldbg("Other tasks:\n");
|
sllerr("Other tasks:\n");
|
||||||
sched_foreach(_up_dumponexit, NULL);
|
sched_foreach(_up_dumponexit, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -77,13 +77,13 @@ static void up_calibratedelay(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
lldbg("Beginning 100s delay\n");
|
llerr("Beginning 100s delay\n");
|
||||||
for (i = 0; i < 100; i++)
|
for (i = 0; i < 100; i++)
|
||||||
{
|
{
|
||||||
up_mdelay(1000);
|
up_mdelay(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
lldbg("End 100s delay\n");
|
llerr("End 100s delay\n");
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define up_calibratedelay()
|
# define up_calibratedelay()
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ static uint8_t dm320_getreg8(uint32_t addr)
|
|||||||
{
|
{
|
||||||
if (count == 4)
|
if (count == 4)
|
||||||
{
|
{
|
||||||
lldbg("...\n");
|
llerr("...\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
@@ -460,7 +460,7 @@ static uint8_t dm320_getreg8(uint32_t addr)
|
|||||||
{
|
{
|
||||||
/* Yes.. then show how many times the value repeated */
|
/* Yes.. then show how many times the value repeated */
|
||||||
|
|
||||||
lldbg("[repeats %d more times]\n", count-3);
|
llerr("[repeats %d more times]\n", count-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save the new address, value, and count */
|
/* Save the new address, value, and count */
|
||||||
@@ -472,7 +472,7 @@ static uint8_t dm320_getreg8(uint32_t addr)
|
|||||||
|
|
||||||
/* Show the register value read */
|
/* Show the register value read */
|
||||||
|
|
||||||
lldbg("%08x->%02x\n", addr, val);
|
llerr("%08x->%02x\n", addr, val);
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -506,7 +506,7 @@ static uint32_t dm320_getreg16(uint32_t addr)
|
|||||||
{
|
{
|
||||||
if (count == 4)
|
if (count == 4)
|
||||||
{
|
{
|
||||||
lldbg("...\n");
|
llerr("...\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
@@ -523,7 +523,7 @@ static uint32_t dm320_getreg16(uint32_t addr)
|
|||||||
{
|
{
|
||||||
/* Yes.. then show how many times the value repeated */
|
/* Yes.. then show how many times the value repeated */
|
||||||
|
|
||||||
lldbg("[repeats %d more times]\n", count-3);
|
llerr("[repeats %d more times]\n", count-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save the new address, value, and count */
|
/* Save the new address, value, and count */
|
||||||
@@ -535,7 +535,7 @@ static uint32_t dm320_getreg16(uint32_t addr)
|
|||||||
|
|
||||||
/* Show the register value read */
|
/* Show the register value read */
|
||||||
|
|
||||||
lldbg("%08x->%04x\n", addr, val);
|
llerr("%08x->%04x\n", addr, val);
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -569,7 +569,7 @@ static uint32_t dm320_getreg32(uint32_t addr)
|
|||||||
{
|
{
|
||||||
if (count == 4)
|
if (count == 4)
|
||||||
{
|
{
|
||||||
lldbg("...\n");
|
llerr("...\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
@@ -586,7 +586,7 @@ static uint32_t dm320_getreg32(uint32_t addr)
|
|||||||
{
|
{
|
||||||
/* Yes.. then show how many times the value repeated */
|
/* Yes.. then show how many times the value repeated */
|
||||||
|
|
||||||
lldbg("[repeats %d more times]\n", count-3);
|
llerr("[repeats %d more times]\n", count-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save the new address, value, and count */
|
/* Save the new address, value, and count */
|
||||||
@@ -598,7 +598,7 @@ static uint32_t dm320_getreg32(uint32_t addr)
|
|||||||
|
|
||||||
/* Show the register value read */
|
/* Show the register value read */
|
||||||
|
|
||||||
lldbg("%08x->%08x\n", addr, val);
|
llerr("%08x->%08x\n", addr, val);
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -616,7 +616,7 @@ static void dm320_putreg8(uint8_t val, uint32_t addr)
|
|||||||
{
|
{
|
||||||
/* Show the register value being written */
|
/* Show the register value being written */
|
||||||
|
|
||||||
lldbg("%08x<-%02x\n", addr, val);
|
llerr("%08x<-%02x\n", addr, val);
|
||||||
|
|
||||||
/* Write the value */
|
/* Write the value */
|
||||||
|
|
||||||
@@ -637,7 +637,7 @@ static void dm320_putreg16(uint16_t val, uint32_t addr)
|
|||||||
{
|
{
|
||||||
/* Show the register value being written */
|
/* Show the register value being written */
|
||||||
|
|
||||||
lldbg("%08x<-%04x\n", addr, val);
|
llerr("%08x<-%04x\n", addr, val);
|
||||||
|
|
||||||
/* Write the value */
|
/* Write the value */
|
||||||
|
|
||||||
@@ -658,7 +658,7 @@ static void dm320_putreg32(uint32_t val, uint32_t addr)
|
|||||||
{
|
{
|
||||||
/* Show the register value being written */
|
/* Show the register value being written */
|
||||||
|
|
||||||
lldbg("%08x<-%08x\n", addr, val);
|
llerr("%08x<-%08x\n", addr, val);
|
||||||
|
|
||||||
/* Write the value */
|
/* Write the value */
|
||||||
|
|
||||||
@@ -2417,7 +2417,7 @@ void up_usbinitialize(void)
|
|||||||
|
|
||||||
#ifdef CONFIG_DEBUG_USB
|
#ifdef CONFIG_DEBUG_USB
|
||||||
chiprev = dm320_getreg16(DM320_BUSC_REVR);
|
chiprev = dm320_getreg16(DM320_BUSC_REVR);
|
||||||
ulldbg("DM320 revision : %d.%d\n", chiprev >> 4, chiprev & 0x0f);
|
ullerr("DM320 revision : %d.%d\n", chiprev >> 4, chiprev & 0x0f);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Enable USB clock & GIO clock */
|
/* Enable USB clock & GIO clock */
|
||||||
|
|||||||
@@ -1191,7 +1191,7 @@ static int adc_interrupt(FAR struct adc_dev_s *dev)
|
|||||||
adcsr = adc_getreg(priv, EFM32_ADC_SR_OFFSET);
|
adcsr = adc_getreg(priv, EFM32_ADC_SR_OFFSET);
|
||||||
if ((adcsr & ADC_SR_AWD) != 0)
|
if ((adcsr & ADC_SR_AWD) != 0)
|
||||||
{
|
{
|
||||||
alldbg("WARNING: Analog Watchdog, Value converted out of range!\n");
|
allerr("WARNING: Analog Watchdog, Value converted out of range!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOC: End of conversion */
|
/* EOC: End of conversion */
|
||||||
|
|||||||
@@ -115,34 +115,34 @@ static void efm32_dumpnvic(const char *msg, int irq)
|
|||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
flags = enter_critical_section();
|
flags = enter_critical_section();
|
||||||
lldbg("NVIC (%s, irq=%d):\n", msg, irq);
|
llerr("NVIC (%s, irq=%d):\n", msg, irq);
|
||||||
lldbg(" INTCTRL: %08x VECTAB: %08x\n",
|
llerr(" INTCTRL: %08x VECTAB: %08x\n",
|
||||||
getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB));
|
getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB));
|
||||||
lldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n",
|
llerr(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n",
|
||||||
getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA),
|
getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA),
|
||||||
getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE));
|
getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE));
|
||||||
lldbg(" IRQ ENABLE: %08x %08x %08x\n",
|
llerr(" IRQ ENABLE: %08x %08x %08x\n",
|
||||||
getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE),
|
getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE),
|
||||||
getreg32(NVIC_IRQ64_95_ENABLE));
|
getreg32(NVIC_IRQ64_95_ENABLE));
|
||||||
lldbg(" SYSH_PRIO: %08x %08x %08x\n",
|
llerr(" SYSH_PRIO: %08x %08x %08x\n",
|
||||||
getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY),
|
getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY),
|
||||||
getreg32(NVIC_SYSH12_15_PRIORITY));
|
getreg32(NVIC_SYSH12_15_PRIORITY));
|
||||||
lldbg(" IRQ PRIO: %08x %08x %08x %08x\n",
|
llerr(" IRQ PRIO: %08x %08x %08x %08x\n",
|
||||||
getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY),
|
getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY),
|
||||||
getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY));
|
getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY));
|
||||||
lldbg(" %08x %08x %08x %08x\n",
|
llerr(" %08x %08x %08x %08x\n",
|
||||||
getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY),
|
getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY),
|
||||||
getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY));
|
getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY));
|
||||||
#if NR_VECTORS >= (EFM32_IRQ_INTERRUPTS + 32)
|
#if NR_VECTORS >= (EFM32_IRQ_INTERRUPTS + 32)
|
||||||
lldbg(" %08x %08x %08x %08x\n",
|
llerr(" %08x %08x %08x %08x\n",
|
||||||
getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY),
|
getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY),
|
||||||
getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY));
|
getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY));
|
||||||
#if NR_VECTORS >= (EFM32_IRQ_INTERRUPTS + 48)
|
#if NR_VECTORS >= (EFM32_IRQ_INTERRUPTS + 48)
|
||||||
lldbg(" %08x %08x %08x %08x\n",
|
llerr(" %08x %08x %08x %08x\n",
|
||||||
getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY),
|
getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY),
|
||||||
getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY));
|
getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY));
|
||||||
#if NR_VECTORS >= (EFM32_IRQ_INTERRUPTS + 64)
|
#if NR_VECTORS >= (EFM32_IRQ_INTERRUPTS + 64)
|
||||||
lldbg(" %08x\n",
|
llerr(" %08x\n",
|
||||||
getreg32(NVIC_IRQ64_67_PRIORITY));
|
getreg32(NVIC_IRQ64_67_PRIORITY));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -518,7 +518,7 @@ static int efm32_interrupt(struct uart_dev_s *dev)
|
|||||||
* FERR - Framing Error Interrupt Enable
|
* FERR - Framing Error Interrupt Enable
|
||||||
*/
|
*/
|
||||||
|
|
||||||
lldbg("RX ERROR: %08x\n", intflags);
|
llerr("RX ERROR: %08x\n", intflags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for transmit errors */
|
/* Check for transmit errors */
|
||||||
@@ -527,7 +527,7 @@ static int efm32_interrupt(struct uart_dev_s *dev)
|
|||||||
{
|
{
|
||||||
/* TXOF - TX Overflow Interrupt Enable */
|
/* TXOF - TX Overflow Interrupt Enable */
|
||||||
|
|
||||||
lldbg("RX ERROR: %08x\n", intflags);
|
llerr("RX ERROR: %08x\n", intflags);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_DEBUG_PWM
|
#ifdef CONFIG_DEBUG_PWM
|
||||||
# define pwmdbg dbg
|
# define pwmdbg dbg
|
||||||
# define pwmlldbg lldbg
|
# define pwmllerr llerr
|
||||||
# ifdef CONFIG_DEBUG_INFO
|
# ifdef CONFIG_DEBUG_INFO
|
||||||
# define pwminfo info
|
# define pwminfo info
|
||||||
# define pwmllinfo llinfo
|
# define pwmllinfo llinfo
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# define pwmdbg(x...)
|
# define pwmdbg(x...)
|
||||||
# define pwmlldbg(x...)
|
# define pwmllerr(x...)
|
||||||
# define pwminfo(x...)
|
# define pwminfo(x...)
|
||||||
# define pwmllinfo(x...)
|
# define pwmllinfo(x...)
|
||||||
# define pwm_dumpgpio(p,m)
|
# define pwm_dumpgpio(p,m)
|
||||||
|
|||||||
@@ -56,9 +56,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_EFM32_RMU_DEBUG
|
#ifdef CONFIG_EFM32_RMU_DEBUG
|
||||||
# define rmudbg lldbg
|
# define rmudbg llerr
|
||||||
# ifdef CONFIG_DEBUG_INFO
|
# ifdef CONFIG_DEBUG_INFO
|
||||||
# define rmuinfo lldbg
|
# define rmuinfo llerr
|
||||||
# else
|
# else
|
||||||
# define rmuinfo(x...)
|
# define rmuinfo(x...)
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user