Merge remote-tracking branch 'remotes/parent/master'
# Conflicts: # arch/arm/src/stm32f7/stm32_i2c.c # configs/stm32f746-ws/nsh/defconfig
This commit is contained in:
commit
8aff3f15ca
29
ChangeLog
29
ChangeLog
@ -12045,3 +12045,32 @@
|
||||
- escape LASTXFER: this suppresses the LASTXFER bit at the end of the
|
||||
next transfer. The "escape"-Flag is reset automatically.
|
||||
From Frank Benkert (2016-06-14)
|
||||
* Many CONFIG_DEBUG_* options did not have matching macros defined in
|
||||
include/debug.h. Rather, there were various definitions scattered
|
||||
throughout the sourse tree. These were collected together and
|
||||
centralized with single macro definitions in include/debug.h
|
||||
(2016-06-15)
|
||||
* STM32F7: Add SPI, I2C, and ADC drivers. From Lok Tep (2016-06-15).
|
||||
* err(), warn(), info(), and alert() renamed to include leading '_'.
|
||||
This was done to avoid some naming collisions (2-06-16
|
||||
* STM32: Move backup domain reset to to earlier in the initialization
|
||||
sequence (stm32_rcc.c() in order to avoid disabling LSE during RTC
|
||||
initialiation. From Alan Carvalho de Assis (2016-06-16).
|
||||
* SYSLOG: syslog() will now automatically redirect output to lowsyslog()
|
||||
if called from an interrupt handler (2016-06-16).
|
||||
* STM32: When configuring a GPIO via stm32_configgpio() the function
|
||||
will first set the mode to output and then set the initial state of
|
||||
the gpio later on. If you have an application with an externaly
|
||||
pulled-up pin, this would lead to a glitch on the line that may be
|
||||
dangerous in some applications (e.G. Reset Line for other chips,
|
||||
etc). This changes sets the output state before configuring the pin
|
||||
as an output. From Pascal Speck (2016-06-17).
|
||||
* STM32 F7: Apply Pascal Speck's GPIO STM32 change to STM32 L4
|
||||
(2016-06-17).
|
||||
* STM32 L4: Apply Pascal Speck's GPIO STM32 change to STM32 L4.
|
||||
From Sebastien Lorquet (2016-06-17).
|
||||
* Review all uses of *err(). These macro family should indicate only
|
||||
error conditions. Convert *err() to either *info() or add ERROR:,
|
||||
depending on if an error is reported (2016-06-17).
|
||||
* STM32F7: Review, correct, and update I2C, SPI, and ADC drivers. From
|
||||
David Sidrane (2016-06-17).
|
||||
|
171
Kconfig
171
Kconfig
@ -405,10 +405,6 @@ config DEBUG_FEATURES
|
||||
Note that enabling this option by itself does not produce debug output.
|
||||
Debug output must also be selected on a subsystem-by-subsystem basis.
|
||||
|
||||
config ARCH_HAVE_HEAPCHECK
|
||||
bool
|
||||
default n
|
||||
|
||||
if DEBUG_FEATURES
|
||||
|
||||
comment "Debug SYSLOG Output Controls"
|
||||
@ -417,7 +413,7 @@ config DEBUG_ERROR
|
||||
bool "Enable Error Output"
|
||||
default n
|
||||
---help---
|
||||
Enables output from err() statements. Errors are significant system
|
||||
Enables output from [a-z]err() statements. Errors are significant system
|
||||
exceptions that require immediate attention.
|
||||
|
||||
config DEBUG_WARN
|
||||
@ -425,7 +421,7 @@ config DEBUG_WARN
|
||||
default n
|
||||
depends on DEBUG_ERROR
|
||||
---help---
|
||||
Enables output from warn() statements. Warnings are considered to
|
||||
Enables output from [a-z]warn() statements. Warnings are considered to
|
||||
be various unexpected conditions, potential errors or errors that will
|
||||
not have serious consequences.
|
||||
|
||||
@ -745,12 +741,38 @@ config DEBUG_SCHED_INFO
|
||||
endif # DEBUG_SCHED
|
||||
|
||||
config DEBUG_SYSCALL
|
||||
bool "SYSCALL Debug Output"
|
||||
bool "SYSCALL Debug Features"
|
||||
default n
|
||||
depends on LIB_SYSCALL
|
||||
---help---
|
||||
Enable very low level output related to system calls. This gives
|
||||
you basically a poor man's version of strace.
|
||||
Enable very low level features related to system calls. If SYSCAL
|
||||
output is enabled, this gives you basically a poor man's version of
|
||||
strace.
|
||||
|
||||
if DEBUG_SYSCALL
|
||||
|
||||
config DEBUG_SYSCALL_ERROR
|
||||
bool "SYSCALL Error Output"
|
||||
default n
|
||||
depends on DEBUG_ERROR
|
||||
---help---
|
||||
Enable OS SYSCALL error output to SYSLOG.
|
||||
|
||||
config DEBUG_SYSCALL_WARN
|
||||
bool "SYSCALL Warnings Output"
|
||||
default n
|
||||
depends on DEBUG_WARN
|
||||
---help---
|
||||
Enable OS SYSCALL warning output to SYSLOG.
|
||||
|
||||
config DEBUG_SYSCALL_INFO
|
||||
bool "SYSCALL Informational Output"
|
||||
default n
|
||||
depends on DEBUG_INFO
|
||||
---help---
|
||||
Enable OS SYSCALL informational output to SYSLOG.
|
||||
|
||||
endif # DEBUG_SYSCALL
|
||||
|
||||
config DEBUG_WIRELESS
|
||||
bool "Wireless Device Debug Output"
|
||||
@ -1192,23 +1214,81 @@ config DEBUG_PWM_INFO
|
||||
endif # DEBUG_PWM
|
||||
|
||||
config DEBUG_RTC
|
||||
bool "RTC Debug Output"
|
||||
bool "RTC Debug Features"
|
||||
default n
|
||||
depends on RTC
|
||||
---help---
|
||||
Enable RTC driver debug SYSLOG output (disabled by default).
|
||||
Enable RTC debug features.
|
||||
|
||||
Support for this debug option is architecture-specific and may not
|
||||
be available for some MCUs.
|
||||
|
||||
config DEBUG_SDIO
|
||||
bool "SDIO Debug Output"
|
||||
if DEBUG_RTC
|
||||
|
||||
config DEBUG_RTC_ERROR
|
||||
bool "RTC Error Output"
|
||||
default n
|
||||
depends on DEBUG_ERROR
|
||||
---help---
|
||||
Enable RTC driver error output to SYSLOG.
|
||||
|
||||
Support for this debug option is architecture-specific and may not
|
||||
be available for some MCUs.
|
||||
|
||||
config DEBUG_RTC_WARN
|
||||
bool "RTC Warnings Output"
|
||||
default n
|
||||
depends on DEBUG_WARN
|
||||
---help---
|
||||
Enable RTC driver warning output to SYSLOG.
|
||||
|
||||
config DEBUG_RTC_INFO
|
||||
bool "RTC Informational Output"
|
||||
default n
|
||||
depends on DEBUG_INFO
|
||||
---help---
|
||||
Enable RTC driver informational output to SYSLOG.
|
||||
|
||||
endif # DEBUG_RTC
|
||||
|
||||
config DEBUG_MEMCARD
|
||||
bool "Memory Card Driver Debug Features"
|
||||
default n
|
||||
depends on MMCSD_SDIO
|
||||
---help---
|
||||
Enable SDIO driver debug SYSLOG output (disabled by default).
|
||||
Enable MMC/SD memory card Driver debug features.
|
||||
|
||||
Support for this debug option is architecture-specific and may not
|
||||
be available for some MCUs.
|
||||
|
||||
if DEBUG_MEMCARD
|
||||
|
||||
config DEBUG_MEMCARD_ERROR
|
||||
bool "Memory Card Driver Error Output"
|
||||
default n
|
||||
depends on DEBUG_ERROR
|
||||
---help---
|
||||
Enable MMC/SD memory card driver error output to SYSLOG.
|
||||
|
||||
Support for this debug option is architecture-specific and may not
|
||||
be available for some MCUs.
|
||||
|
||||
config DEBUG_MEMCARD_WARN
|
||||
bool "Memory Card Driver Warnings Output"
|
||||
default n
|
||||
depends on DEBUG_WARN
|
||||
---help---
|
||||
Enable MMC/SD memory card driver warning output to SYSLOG.
|
||||
|
||||
config DEBUG_MEMCARD_INFO
|
||||
bool "Memory Card Driver Informational Output"
|
||||
default n
|
||||
depends on DEBUG_INFO
|
||||
---help---
|
||||
Enable MMC/SD memory card driver informational output to SYSLOG.
|
||||
|
||||
endif # DEBUG_MEMCARD
|
||||
|
||||
config DEBUG_SENSORS
|
||||
bool "Sensor Debug Features"
|
||||
default n
|
||||
@ -1280,14 +1360,40 @@ config DEBUG_SPI_INFO
|
||||
endif # DEBUG_SPI
|
||||
|
||||
config DEBUG_TIMER
|
||||
bool "Timer Debug Output"
|
||||
bool "Timer Debug Features"
|
||||
default n
|
||||
depends on TIMER
|
||||
---help---
|
||||
Enable timer debug SYSLOG output (disabled by default).
|
||||
Enable timer debug features.
|
||||
|
||||
Support for this debug option is architecture-specific and may not
|
||||
be available for some MCUs.
|
||||
|
||||
if DEBUG_TIMER
|
||||
|
||||
config DEBUG_TIMER_ERROR
|
||||
bool "Timer Error Output"
|
||||
default n
|
||||
depends on DEBUG_ERROR
|
||||
---help---
|
||||
Enable timer error output to SYSLOG.
|
||||
|
||||
config DEBUG_TIMER_WARN
|
||||
bool "Timer Warnings Output"
|
||||
default n
|
||||
depends on DEBUG_WARN
|
||||
---help---
|
||||
Enable timer warning output to SYSLOG.
|
||||
|
||||
config DEBUG_TIMER_INFO
|
||||
bool "Timer Informational Output"
|
||||
default n
|
||||
depends on DEBUG_INFO
|
||||
---help---
|
||||
Enable timer informational output to SYSLOG.
|
||||
|
||||
endif # DEBUG_TIMER
|
||||
|
||||
config DEBUG_USB
|
||||
bool "USB Debug Features"
|
||||
default n
|
||||
@ -1321,14 +1427,39 @@ config DEBUG_USB_INFO
|
||||
endif # DEBUG_USB
|
||||
|
||||
config DEBUG_WATCHDOG
|
||||
bool "Watchdog Timer Debug Output"
|
||||
bool "Watchdog Timer Debug Features"
|
||||
default n
|
||||
depends on WATCHDOG
|
||||
---help---
|
||||
Enable watchdog timer debug SYSLOG output (disabled by default).
|
||||
Enable watchdog timer debug features.
|
||||
|
||||
Support for this debug option is architecture-specific and may not
|
||||
be available for some MCUs.
|
||||
|
||||
if DEBUG_WATCHDOG
|
||||
|
||||
config DEBUG_WATCHDOG_ERROR
|
||||
bool "Watchdog Timer Error Output"
|
||||
default n
|
||||
depends on DEBUG_ERROR
|
||||
---help---
|
||||
Enable watchdog time error output to SYSLOG.
|
||||
|
||||
config DEBUG_WATCHDOG_WARN
|
||||
bool "Watchdog Timer Warnings Output"
|
||||
default n
|
||||
depends on DEBUG_WARN
|
||||
---help---
|
||||
Enable watchdog time warning output to SYSLOG.
|
||||
|
||||
config DEBUG_WATCHDOG_INFO
|
||||
bool "Watchdog Timer Informational Output"
|
||||
default n
|
||||
depends on DEBUG_INFO
|
||||
---help---
|
||||
Enable watchdog time informational output to SYSLOG.
|
||||
|
||||
endif # DEBUG_WATCHDOG
|
||||
endif # DEBUG_FEATURES
|
||||
|
||||
config ARCH_HAVE_STACKCHECK
|
||||
@ -1346,6 +1477,10 @@ config STACK_COLORATION
|
||||
|
||||
Only supported by a few architectures.
|
||||
|
||||
config ARCH_HAVE_HEAPCHECK
|
||||
bool
|
||||
default n
|
||||
|
||||
config HEAP_COLORATION
|
||||
bool "Heap coloration"
|
||||
default n
|
||||
|
@ -2,7 +2,8 @@
|
||||
* arch/arm/include/stm32f7/chip.h
|
||||
*
|
||||
* Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
* Authors: Gregory Nutt <gnutt@nuttx.org>
|
||||
* David Sidrane <david_s5@nscdg.com>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -1156,7 +1156,7 @@ static int uart_interrupt(struct uart_dev_s *dev)
|
||||
/* Read the modem status register (MSR) to clear */
|
||||
|
||||
status = up_serialin(priv, A1X_UART_MSR_OFFSET);
|
||||
info("MSR: %02x\n", status);
|
||||
_info("MSR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1167,7 +1167,7 @@ static int uart_interrupt(struct uart_dev_s *dev)
|
||||
/* Read the line status register (LSR) to clear */
|
||||
|
||||
status = up_serialin(priv, A1X_UART_LSR_OFFSET);
|
||||
info("LSR: %02x\n", status);
|
||||
_info("LSR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1192,7 +1192,7 @@ static int uart_interrupt(struct uart_dev_s *dev)
|
||||
|
||||
default:
|
||||
{
|
||||
llerr("Unexpected IIR: %02x\n", status);
|
||||
_llerr("ERROR: Unexpected IIR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)stack;
|
||||
alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
@ -126,12 +126,12 @@ static inline void up_registerdump(void)
|
||||
for (regs = REG_R0; regs <= REG_R15; regs += 8)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs];
|
||||
alert("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_alert("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
regs, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
|
||||
alert("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
||||
_alert("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@ -200,12 +200,12 @@ static void up_dumpstate(void)
|
||||
|
||||
/* Show interrupt stack info */
|
||||
|
||||
alert("sp: %08x\n", sp);
|
||||
alert("IRQ stack:\n");
|
||||
alert(" base: %08x\n", istackbase);
|
||||
alert(" size: %08x\n", istacksize);
|
||||
_alert("sp: %08x\n", sp);
|
||||
_alert("IRQ stack:\n");
|
||||
_alert(" base: %08x\n", istackbase);
|
||||
_alert(" size: %08x\n", istacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
alert(" used: %08x\n", up_check_intstack());
|
||||
_alert(" used: %08x\n", up_check_intstack());
|
||||
#endif
|
||||
|
||||
/* Does the current stack pointer lie within the interrupt
|
||||
@ -223,24 +223,24 @@ static void up_dumpstate(void)
|
||||
*/
|
||||
|
||||
sp = g_intstackbase;
|
||||
alert("sp: %08x\n", sp);
|
||||
_alert("sp: %08x\n", sp);
|
||||
}
|
||||
|
||||
/* Show user stack info */
|
||||
|
||||
alert("User stack:\n");
|
||||
alert(" base: %08x\n", ustackbase);
|
||||
alert(" size: %08x\n", ustacksize);
|
||||
_alert("User stack:\n");
|
||||
_alert(" base: %08x\n", ustackbase);
|
||||
_alert(" size: %08x\n", ustacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
alert(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||
_alert(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||
#endif
|
||||
|
||||
#else
|
||||
alert("sp: %08x\n", sp);
|
||||
alert("stack base: %08x\n", ustackbase);
|
||||
alert("stack size: %08x\n", ustacksize);
|
||||
_alert("sp: %08x\n", sp);
|
||||
_alert("stack base: %08x\n", ustackbase);
|
||||
_alert("stack size: %08x\n", ustacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
alert("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||
_alert("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -251,7 +251,7 @@ static void up_dumpstate(void)
|
||||
if (sp > ustackbase || sp <= ustackbase - ustacksize)
|
||||
{
|
||||
#if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4
|
||||
alert("ERROR: Stack pointer is not within allocated stack\n");
|
||||
_alert("ERROR: Stack pointer is not within allocated stack\n");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@ -318,10 +318,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
||||
board_autoled_on(LED_ASSERTION);
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
alert("Assertion failed at file:%s line: %d task: %s\n",
|
||||
_alert("Assertion failed at file:%s line: %d task: %s\n",
|
||||
filename, lineno, rtcb->name);
|
||||
#else
|
||||
alert("Assertion failed at file:%s line: %d\n",
|
||||
_alert("Assertion failed at file:%s line: %d\n",
|
||||
filename, lineno);
|
||||
#endif
|
||||
|
||||
|
@ -107,7 +107,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr)
|
||||
* fatal error.
|
||||
*/
|
||||
|
||||
pgllerr("FSR: %08x FAR: %08x\n", fsr, far);
|
||||
pgllinfo("FSR: %08x FAR: %08x\n", fsr, far);
|
||||
if ((fsr & FSR_MASK) != FSR_PAGE)
|
||||
{
|
||||
goto segfault;
|
||||
@ -156,7 +156,7 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr)
|
||||
|
||||
segfault:
|
||||
#endif
|
||||
alert("Data abort. PC: %08x FAR: %08x FSR: %08x\n", regs[REG_PC], far, fsr);
|
||||
_alert("Data abort. PC: %08x FAR: %08x FSR: %08x\n", regs[REG_PC], far, fsr);
|
||||
PANIC();
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ void up_dataabort(uint32_t *regs)
|
||||
|
||||
/* Crash -- possibly showing diagnost debug information. */
|
||||
|
||||
alert("Data abort. PC: %08x\n", regs[REG_PC]);
|
||||
_alert("Data abort. PC: %08x\n", regs[REG_PC]);
|
||||
PANIC();
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if (ehdr->e_machine != EM_ARM)
|
||||
{
|
||||
berr("Not for ARM: e_machine=%04x\n", ehdr->e_machine);
|
||||
berr("ERROR: Not for ARM: e_machine=%04x\n", ehdr->e_machine);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if (ehdr->e_ident[EI_CLASS] != ELFCLASS32)
|
||||
{
|
||||
berr("Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]);
|
||||
berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB)
|
||||
#endif
|
||||
{
|
||||
berr("Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]);
|
||||
berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if ((ehdr->e_entry & 3) != 0)
|
||||
{
|
||||
berr("Entry point is not properly aligned: %08x\n", ehdr->e_entry);
|
||||
berr("ERROR: Entry point is not properly aligned: %08x\n", ehdr->e_entry);
|
||||
return -ENOEXEC
|
||||
}
|
||||
|
||||
@ -185,7 +185,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
offset += sym->st_value - addr;
|
||||
if (offset & 3 || offset <= (int32_t) 0xfe000000 || offset >= (int32_t) 0x02000000)
|
||||
{
|
||||
berr(" ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
|
||||
berr("ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
|
||||
ELF32_R_TYPE(rel->r_info), offset);
|
||||
|
||||
return -EINVAL;
|
||||
@ -256,7 +256,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
break;
|
||||
|
||||
default:
|
||||
berr("Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info));
|
||||
berr("ERROR: Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -266,6 +266,6 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
||||
uintptr_t addr)
|
||||
{
|
||||
berr("RELA relocation not supported\n");
|
||||
berr("ERROR: RELA relocation not supported\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
@ -99,8 +99,8 @@ void up_prefetchabort(uint32_t *regs)
|
||||
* virtual addresses.
|
||||
*/
|
||||
|
||||
pgllerr("VADDR: %08x VBASE: %08x VEND: %08x\n",
|
||||
regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND);
|
||||
pgllinfo("VADDR: %08x VBASE: %08x VEND: %08x\n",
|
||||
regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND);
|
||||
|
||||
if (regs[REG_R15] >= PG_PAGED_VBASE && regs[REG_R15] < PG_PAGED_VEND)
|
||||
{
|
||||
@ -137,7 +137,7 @@ void up_prefetchabort(uint32_t *regs)
|
||||
else
|
||||
#endif
|
||||
{
|
||||
alert("Prefetch abort. PC: %08x\n", regs[REG_PC]);
|
||||
_alert("Prefetch abort. PC: %08x\n", regs[REG_PC]);
|
||||
PANIC();
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ void up_release_pending(void)
|
||||
{
|
||||
struct tcb_s *rtcb = this_task();
|
||||
|
||||
sllerr("From TCB=%p\n", rtcb);
|
||||
sllinfo("From TCB=%p\n", rtcb);
|
||||
|
||||
/* 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();
|
||||
bool switch_needed;
|
||||
|
||||
sllerr("TCB=%p PRI=%d\n", tcb, priority);
|
||||
sllinfo("TCB=%p PRI=%d\n", tcb, priority);
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list.
|
||||
* sched_removereadytorun will return true if we just
|
||||
|
@ -94,7 +94,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
serr("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||
sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||
|
||||
/* Make sure that interrupts are disabled */
|
||||
|
||||
@ -108,7 +108,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
* being delivered to the currently executing task.
|
||||
*/
|
||||
|
||||
serr("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS);
|
||||
sinfo("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS);
|
||||
|
||||
if (tcb == this_task())
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ void up_sigdeliver(void)
|
||||
|
||||
board_autoled_on(LED_SIGNAL);
|
||||
|
||||
serr("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
@ -126,7 +126,7 @@ void up_sigdeliver(void)
|
||||
* errno that is needed by the user logic (it is probably EINTR).
|
||||
*/
|
||||
|
||||
serr("Resuming\n");
|
||||
sinfo("Resuming\n");
|
||||
(void)up_irq_save();
|
||||
rtcb->pterrno = saved_errno;
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
|
||||
void up_syscall(uint32_t *regs)
|
||||
{
|
||||
alert("Syscall from 0x%x\n", regs[REG_PC]);
|
||||
_alert("Syscall from 0x%x\n", regs[REG_PC]);
|
||||
CURRENT_REGS = regs;
|
||||
PANIC();
|
||||
}
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
void up_undefinedinsn(uint32_t *regs)
|
||||
{
|
||||
alert("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
||||
_alert("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
||||
CURRENT_REGS = regs;
|
||||
PANIC();
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)stack;
|
||||
alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
@ -117,11 +117,11 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
/* Dump interesting properties of this task */
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
alert("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||
_alert("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||
(unsigned long)tcb->adj_stack_size);
|
||||
#else
|
||||
alert("PID: %d Stack Used=%lu of %lu\n",
|
||||
_alert("PID: %d Stack Used=%lu of %lu\n",
|
||||
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||
(unsigned long)tcb->adj_stack_size);
|
||||
#endif
|
||||
@ -156,22 +156,22 @@ static inline void up_registerdump(void)
|
||||
{
|
||||
/* Yes.. dump the interrupt registers */
|
||||
|
||||
alert("R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_alert("R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1],
|
||||
CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3],
|
||||
CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5],
|
||||
CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]);
|
||||
alert("R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_alert("R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9],
|
||||
CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
|
||||
CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
|
||||
CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
|
||||
#ifdef CONFIG_BUILD_PROTECTED
|
||||
alert("xPSR: %08x PRIMASK: %08x EXEC_RETURN: %08x\n",
|
||||
_alert("xPSR: %08x PRIMASK: %08x EXEC_RETURN: %08x\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
|
||||
CURRENT_REGS[REG_EXC_RETURN]);
|
||||
#else
|
||||
alert("xPSR: %08x PRIMASK: %08x\n",
|
||||
_alert("xPSR: %08x PRIMASK: %08x\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]);
|
||||
#endif
|
||||
}
|
||||
@ -242,12 +242,12 @@ static void up_dumpstate(void)
|
||||
|
||||
/* Show interrupt stack info */
|
||||
|
||||
alert("sp: %08x\n", sp);
|
||||
alert("IRQ stack:\n");
|
||||
alert(" base: %08x\n", istackbase);
|
||||
alert(" size: %08x\n", istacksize);
|
||||
_alert("sp: %08x\n", sp);
|
||||
_alert("IRQ stack:\n");
|
||||
_alert(" base: %08x\n", istackbase);
|
||||
_alert(" size: %08x\n", istacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
alert(" used: %08x\n", up_check_intstack());
|
||||
_alert(" used: %08x\n", up_check_intstack());
|
||||
#endif
|
||||
|
||||
/* Does the current stack pointer lie within the interrupt
|
||||
@ -269,14 +269,14 @@ static void up_dumpstate(void)
|
||||
if (CURRENT_REGS)
|
||||
{
|
||||
sp = CURRENT_REGS[REG_R13];
|
||||
alert("sp: %08x\n", sp);
|
||||
_alert("sp: %08x\n", sp);
|
||||
}
|
||||
|
||||
alert("User stack:\n");
|
||||
alert(" base: %08x\n", ustackbase);
|
||||
alert(" size: %08x\n", ustacksize);
|
||||
_alert("User stack:\n");
|
||||
_alert(" base: %08x\n", ustackbase);
|
||||
_alert(" size: %08x\n", ustacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
alert(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||
_alert(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||
#endif
|
||||
|
||||
/* Dump the user stack if the stack pointer lies within the allocated user
|
||||
@ -289,11 +289,11 @@ static void up_dumpstate(void)
|
||||
}
|
||||
|
||||
#else
|
||||
alert("sp: %08x\n", sp);
|
||||
alert("stack base: %08x\n", ustackbase);
|
||||
alert("stack size: %08x\n", ustacksize);
|
||||
_alert("sp: %08x\n", sp);
|
||||
_alert("stack base: %08x\n", ustackbase);
|
||||
_alert("stack size: %08x\n", ustacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
alert("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||
_alert("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||
#endif
|
||||
|
||||
/* Dump the user stack if the stack pointer lies within the allocated user
|
||||
@ -302,7 +302,7 @@ static void up_dumpstate(void)
|
||||
|
||||
if (sp > ustackbase || sp <= ustackbase - ustacksize)
|
||||
{
|
||||
alert("ERROR: Stack pointer is not within allocated stack\n");
|
||||
_alert("ERROR: Stack pointer is not within allocated stack\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -373,10 +373,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
||||
board_autoled_on(LED_ASSERTION);
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
alert("Assertion failed at file:%s line: %d task: %s\n",
|
||||
_alert("Assertion failed at file:%s line: %d task: %s\n",
|
||||
filename, lineno, rtcb->name);
|
||||
#else
|
||||
alert("Assertion failed at file:%s line: %d\n",
|
||||
_alert("Assertion failed at file:%s line: %d\n",
|
||||
filename, lineno);
|
||||
#endif
|
||||
|
||||
|
@ -72,25 +72,25 @@ void up_dumpnvic(FAR const char *msg)
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
llinfo("NVIC: %s\n", msg);
|
||||
llinfo(" ISER: %08x ICER: %08x ISPR: %08x ICPR: %08x\n",
|
||||
_llinfo("NVIC: %s\n", msg);
|
||||
_llinfo(" ISER: %08x ICER: %08x ISPR: %08x ICPR: %08x\n",
|
||||
getreg32(ARMV6M_NVIC_ISER), getreg32(ARMV6M_NVIC_ICER),
|
||||
getreg32(ARMV6M_NVIC_ISPR), getreg32(ARMV6M_NVIC_ICPR));
|
||||
|
||||
for (i = 0 ; i < 8; i += 4)
|
||||
{
|
||||
llinfo(" IPR%d: %08x IPR%d: %08x IPR%d: %08x IPR%d: %08x\n",
|
||||
_llinfo(" IPR%d: %08x IPR%d: %08x IPR%d: %08x IPR%d: %08x\n",
|
||||
i, getreg32(ARMV6M_NVIC_IPR(i)),
|
||||
i+1, getreg32(ARMV6M_NVIC_IPR(i+1)),
|
||||
i+2, getreg32(ARMV6M_NVIC_IPR(i+2)),
|
||||
i+3, getreg32(ARMV6M_NVIC_IPR(i+3)));
|
||||
}
|
||||
|
||||
llinfo("SYSCON:\n");
|
||||
llinfo(" CPUID: %08x ICSR: %08x AIRCR: %08x SCR: %08x\n",
|
||||
_llinfo("SYSCON:\n");
|
||||
_llinfo(" CPUID: %08x ICSR: %08x AIRCR: %08x SCR: %08x\n",
|
||||
getreg32(ARMV6M_SYSCON_CPUID), getreg32(ARMV6M_SYSCON_ICSR),
|
||||
getreg32(ARMV6M_SYSCON_AIRCR), getreg32(ARMV6M_SYSCON_SCR));
|
||||
llinfo(" CCR: %08x SHPR2: %08x SHPR3: %08x\n",
|
||||
_llinfo(" CCR: %08x SHPR2: %08x SHPR3: %08x\n",
|
||||
getreg32(ARMV6M_SYSCON_CCR), getreg32(ARMV6M_SYSCON_SHPR2),
|
||||
getreg32(ARMV6M_SYSCON_SHPR3));
|
||||
|
||||
|
@ -86,7 +86,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if (ehdr->e_machine != EM_ARM)
|
||||
{
|
||||
berr("Not for ARM: e_machine=%04x\n", ehdr->e_machine);
|
||||
berr("ERROR: Not for ARM: e_machine=%04x\n", ehdr->e_machine);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if (ehdr->e_ident[EI_CLASS] != ELFCLASS32)
|
||||
{
|
||||
berr("Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]);
|
||||
berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB)
|
||||
#endif
|
||||
{
|
||||
berr("Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]);
|
||||
berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
offset += sym->st_value - addr;
|
||||
if (offset & 3 || offset <= (int32_t) 0xfe000000 || offset >= (int32_t) 0x02000000)
|
||||
{
|
||||
berr(" ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
|
||||
berr("ERROR: ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
|
||||
ELF32_R_TYPE(rel->r_info), offset);
|
||||
|
||||
return -EINVAL;
|
||||
@ -290,7 +290,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
|
||||
if (ELF32_ST_TYPE(sym->st_info) == STT_FUNC && (offset & 1) == 0)
|
||||
{
|
||||
berr(" ERROR: JUMP24 [%d] requires odd offset, offset=%08lx\n",
|
||||
berr("ERROR: ERROR: JUMP24 [%d] requires odd offset, offset=%08lx\n",
|
||||
ELF32_R_TYPE(rel->r_info), offset);
|
||||
|
||||
return -EINVAL;
|
||||
@ -300,7 +300,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
|
||||
if (offset <= (int32_t)0xff000000 || offset >= (int32_t)0x01000000)
|
||||
{
|
||||
berr(" ERROR: JUMP24 [%d] relocation out of range, branch taget=%08lx\n",
|
||||
berr("ERROR: ERROR: JUMP24 [%d] relocation out of range, branch taget=%08lx\n",
|
||||
ELF32_R_TYPE(rel->r_info), offset);
|
||||
|
||||
return -EINVAL;
|
||||
@ -451,7 +451,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
break;
|
||||
|
||||
default:
|
||||
berr("Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info));
|
||||
berr("ERROR: Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -461,6 +461,6 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
||||
uintptr_t addr)
|
||||
{
|
||||
berr("RELA relocation not supported\n");
|
||||
berr("ERROR: RELA relocation not supported\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
@ -55,25 +55,13 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_HARDFAULT
|
||||
# define hferr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
# define hfinfo(format, ...) _alert(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define hferr(x...)
|
||||
# define hfinfo(x...)
|
||||
#endif
|
||||
|
||||
#define INSN_SVC0 0xdf00 /* insn: svc 0 */
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -118,7 +106,7 @@ int up_hardfault(int irq, FAR void *context)
|
||||
/* Fetch the instruction that caused the Hard fault */
|
||||
|
||||
uint16_t insn = *pc;
|
||||
hferr(" PC: %p INSN: %04x\n", pc, insn);
|
||||
hfinfo(" PC: %p INSN: %04x\n", pc, insn);
|
||||
|
||||
/* If this was the instruction 'svc 0', then forward processing
|
||||
* to the SVCall handler
|
||||
@ -126,7 +114,7 @@ int up_hardfault(int irq, FAR void *context)
|
||||
|
||||
if (insn == INSN_SVC0)
|
||||
{
|
||||
hferr("Forward SVCall\n");
|
||||
hfinfo("Forward SVCall\n");
|
||||
return up_svcall(irq, context);
|
||||
}
|
||||
}
|
||||
@ -134,22 +122,22 @@ int up_hardfault(int irq, FAR void *context)
|
||||
#if defined(CONFIG_DEBUG_HARDFAULT)
|
||||
/* Dump some hard fault info */
|
||||
|
||||
hferr("\nHard Fault:\n");
|
||||
hferr(" IRQ: %d regs: %p\n", irq, regs);
|
||||
hferr(" PRIMASK: %08x IPSR: %08x\n",
|
||||
getprimask(), getipsr());
|
||||
hferr(" 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]);
|
||||
hferr(" 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]);
|
||||
hferr(" xPSR: %08x PRIMASK: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]);
|
||||
_alert("\nHard Fault:\n");
|
||||
_alert(" IRQ: %d regs: %p\n", irq, regs);
|
||||
_alert(" PRIMASK: %08x IPSR: %08x\n",
|
||||
getprimask(), getipsr());
|
||||
_alert(" 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]);
|
||||
_alert(" 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]);
|
||||
_alert(" xPSR: %08x PRIMASK: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]);
|
||||
#endif
|
||||
|
||||
(void)up_irq_save();
|
||||
llerr("PANIC!!! Hard fault\n");
|
||||
_alert("PANIC!!! Hard fault\n");
|
||||
PANIC();
|
||||
return OK; /* Won't get here */
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ void up_release_pending(void)
|
||||
{
|
||||
struct tcb_s *rtcb = this_task();
|
||||
|
||||
sllerr("From TCB=%p\n", rtcb);
|
||||
sllinfo("From TCB=%p\n", rtcb);
|
||||
|
||||
/* 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();
|
||||
bool switch_needed;
|
||||
|
||||
sllerr("TCB=%p PRI=%d\n", tcb, priority);
|
||||
sllinfo("TCB=%p PRI=%d\n", tcb, priority);
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list.
|
||||
* sched_removereadytorun will return true if we just removed the head
|
||||
|
@ -107,7 +107,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
serr("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||
sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||
|
||||
/* Make sure that interrupts are disabled */
|
||||
|
||||
@ -121,7 +121,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
* to the currently executing task.
|
||||
*/
|
||||
|
||||
serr("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS);
|
||||
sinfo("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS);
|
||||
|
||||
if (tcb == this_task())
|
||||
{
|
||||
|
@ -100,7 +100,7 @@ void up_sigdeliver(void)
|
||||
|
||||
board_autoled_on(LED_SIGNAL);
|
||||
|
||||
serr("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
@ -135,7 +135,7 @@ void up_sigdeliver(void)
|
||||
* errno that is needed by the user logic (it is probably EINTR).
|
||||
*/
|
||||
|
||||
serr("Resuming\n");
|
||||
sinfo("Resuming\n");
|
||||
(void)up_irq_save();
|
||||
rtcb->pterrno = saved_errno;
|
||||
|
||||
|
@ -55,33 +55,6 @@
|
||||
#include "exc_return.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* Debug ********************************************************************/
|
||||
/* Debug output from this file may interfere with context switching! To get
|
||||
* debug output you must enabled the following in your NuttX configuration:
|
||||
*
|
||||
* - CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_SYSCALL (shows only syscalls)
|
||||
* - CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_SVCALL (shows everything)
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
|
||||
# define svcerr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define svcerr(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
@ -169,24 +142,24 @@ int up_svcall(int irq, FAR void *context)
|
||||
* and R1..R7 = variable number of arguments depending on the system call.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
|
||||
#ifdef CONFIG_DEBUG_SYSCALL_INFO
|
||||
# ifndef CONFIG_DEBUG_SVCALL
|
||||
if (cmd > SYS_switch_context)
|
||||
# endif
|
||||
{
|
||||
svcerr("SVCALL Entry: regs: %p cmd: %d\n", regs, cmd);
|
||||
svcerr(" 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]);
|
||||
svcerr(" 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]);
|
||||
svcllinfo("SVCALL Entry: regs: %p cmd: %d\n", regs, cmd);
|
||||
svcllinfo(" 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]);
|
||||
svcllinfo(" 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]);
|
||||
# ifdef CONFIG_BUILD_PROTECTED
|
||||
svcerr(" PSR: %08x PRIMASK: %08x EXC_RETURN: %08x\n",
|
||||
regs[REG_XPSR], regs[REG_PRIMASK], regs[REG_EXC_RETURN]);
|
||||
svcllinfo(" PSR: %08x PRIMASK: %08x EXC_RETURN: %08x\n",
|
||||
regs[REG_XPSR], regs[REG_PRIMASK], regs[REG_EXC_RETURN]);
|
||||
# else
|
||||
svcerr(" PSR: %08x PRIMASK: %08x\n",
|
||||
regs[REG_XPSR], regs[REG_PRIMASK]);
|
||||
svcllinfo(" PSR: %08x PRIMASK: %08x\n",
|
||||
regs[REG_XPSR], regs[REG_PRIMASK]);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
@ -471,7 +444,7 @@ int up_svcall(int irq, FAR void *context)
|
||||
|
||||
regs[REG_R0] -= CONFIG_SYS_RESERVED;
|
||||
#else
|
||||
sllerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
|
||||
svcllerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
@ -479,37 +452,37 @@ int up_svcall(int irq, FAR void *context)
|
||||
|
||||
/* Report what happened. That might difficult in the case of a context switch */
|
||||
|
||||
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
|
||||
#ifdef CONFIG_DEBUG_SYSCALL_INFO
|
||||
# ifndef CONFIG_DEBUG_SVCALL
|
||||
if (cmd > SYS_switch_context)
|
||||
# else
|
||||
if (regs != CURRENT_REGS)
|
||||
# endif
|
||||
{
|
||||
svcerr("SVCall Return:\n");
|
||||
svcerr(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1],
|
||||
CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3],
|
||||
CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5],
|
||||
CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]);
|
||||
svcerr(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9],
|
||||
CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
|
||||
CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
|
||||
CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
|
||||
svcllinfo("SVCall Return:\n");
|
||||
svcllinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1],
|
||||
CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3],
|
||||
CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5],
|
||||
CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]);
|
||||
svcllinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9],
|
||||
CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
|
||||
CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
|
||||
CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
|
||||
#ifdef CONFIG_BUILD_PROTECTED
|
||||
svcerr(" PSR: %08x PRIMASK: %08x EXC_RETURN: %08x\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
|
||||
CURRENT_REGS[REG_EXC_RETURN]);
|
||||
svcllinfo(" PSR: %08x PRIMASK: %08x EXC_RETURN: %08x\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
|
||||
CURRENT_REGS[REG_EXC_RETURN]);
|
||||
#else
|
||||
svcerr(" PSR: %08x PRIMASK: %08x\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]);
|
||||
svcllinfo(" PSR: %08x PRIMASK: %08x\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]);
|
||||
#endif
|
||||
}
|
||||
# ifdef CONFIG_DEBUG_SVCALL
|
||||
else
|
||||
{
|
||||
svcerr("SVCall Return: %d\n", regs[REG_R0]);
|
||||
svcllinfo("SVCall Return: %d\n", regs[REG_R0]);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
@ -97,7 +97,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)stack;
|
||||
alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
@ -116,11 +116,11 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
/* Dump interesting properties of this task */
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
alert("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||
_alert("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||
(unsigned long)tcb->adj_stack_size);
|
||||
#else
|
||||
alert("PID: %d Stack Used=%lu of %lu\n",
|
||||
_alert("PID: %d Stack Used=%lu of %lu\n",
|
||||
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||
(unsigned long)tcb->adj_stack_size);
|
||||
#endif
|
||||
@ -160,12 +160,12 @@ static inline void up_registerdump(void)
|
||||
for (regs = REG_R0; regs <= REG_R15; regs += 8)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs];
|
||||
alert("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_alert("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
regs, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
|
||||
alert("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
||||
_alert("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@ -229,7 +229,7 @@ static void up_dumpstate(void)
|
||||
ustacksize = (uint32_t)rtcb->adj_stack_size;
|
||||
}
|
||||
|
||||
alert("Current sp: %08x\n", sp);
|
||||
_alert("Current sp: %08x\n", sp);
|
||||
|
||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
/* Get the limits on the interrupt stack memory */
|
||||
@ -239,21 +239,21 @@ static void up_dumpstate(void)
|
||||
|
||||
/* Show interrupt stack info */
|
||||
|
||||
alert("Interrupt stack:\n");
|
||||
alert(" base: %08x\n", istackbase);
|
||||
alert(" size: %08x\n", istacksize);
|
||||
_alert("Interrupt stack:\n");
|
||||
_alert(" base: %08x\n", istackbase);
|
||||
_alert(" size: %08x\n", istacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
alert(" used: %08x\n", up_check_intstack());
|
||||
_alert(" used: %08x\n", up_check_intstack());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Show user stack info */
|
||||
|
||||
alert("User stack:\n");
|
||||
alert(" base: %08x\n", ustackbase);
|
||||
alert(" size: %08x\n", ustacksize);
|
||||
_alert("User stack:\n");
|
||||
_alert(" base: %08x\n", ustackbase);
|
||||
_alert(" size: %08x\n", ustacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
alert(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||
_alert(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_KERNEL_STACK
|
||||
@ -263,9 +263,9 @@ static void up_dumpstate(void)
|
||||
{
|
||||
kstackbase = (uint32_t)rtcb->xcp.kstack + CONFIG_ARCH_KERNEL_STACKSIZE - 4;
|
||||
|
||||
alert("Kernel stack:\n");
|
||||
alert(" base: %08x\n", kstackbase);
|
||||
alert(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE);
|
||||
_alert("Kernel stack:\n");
|
||||
_alert(" base: %08x\n", kstackbase);
|
||||
_alert(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -276,7 +276,7 @@ static void up_dumpstate(void)
|
||||
{
|
||||
/* Yes.. dump the interrupt stack */
|
||||
|
||||
alert("Interrupt Stack\n", sp);
|
||||
_alert("Interrupt Stack\n", sp);
|
||||
up_stackdump(sp, istackbase);
|
||||
|
||||
/* Extract the user stack pointer which should lie
|
||||
@ -284,7 +284,7 @@ static void up_dumpstate(void)
|
||||
*/
|
||||
|
||||
sp = g_intstackbase;
|
||||
alert("User sp: %08x\n", sp);
|
||||
_alert("User sp: %08x\n", sp);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -294,7 +294,7 @@ static void up_dumpstate(void)
|
||||
|
||||
if (sp > ustackbase - ustacksize && sp < ustackbase)
|
||||
{
|
||||
alert("User Stack\n", sp);
|
||||
_alert("User Stack\n", sp);
|
||||
up_stackdump(sp, ustackbase);
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ static void up_dumpstate(void)
|
||||
|
||||
if (sp >= (uint32_t)rtcb->xcp.kstack && sp < kstackbase)
|
||||
{
|
||||
alert("Kernel Stack\n", sp);
|
||||
_alert("Kernel Stack\n", sp);
|
||||
up_stackdump(sp, kstackbase);
|
||||
}
|
||||
#endif
|
||||
@ -313,7 +313,7 @@ static void up_dumpstate(void)
|
||||
#ifdef CONFIG_SMP
|
||||
/* Show the CPU number */
|
||||
|
||||
alert("CPU%d:\n", up_cpu_index());
|
||||
_alert("CPU%d:\n", up_cpu_index());
|
||||
#endif
|
||||
|
||||
/* Then dump the CPU registers (if available) */
|
||||
@ -378,10 +378,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
||||
board_autoled_on(LED_ASSERTION);
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
alert("Assertion failed at file:%s line: %d task: %s\n",
|
||||
_alert("Assertion failed at file:%s line: %d task: %s\n",
|
||||
filename, lineno, rtcb->name);
|
||||
#else
|
||||
alert("Assertion failed at file:%s line: %d\n",
|
||||
_alert("Assertion failed at file:%s line: %d\n",
|
||||
filename, lineno);
|
||||
#endif
|
||||
up_dumpstate();
|
||||
|
@ -64,19 +64,19 @@ static inline void arm_registerdump(FAR struct tcb_s *tcb)
|
||||
{
|
||||
int regndx;
|
||||
|
||||
llerr("CPU%d:\n", up_cpu_index());
|
||||
_llinfo("CPU%d:\n", up_cpu_index());
|
||||
|
||||
/* Dump the startup registers */
|
||||
|
||||
for (regndx = REG_R0; regndx <= REG_R15; regndx += 8)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)&tcb->xcp.regs[regndx];
|
||||
llerr("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
regndx, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
_llinfo("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
regndx, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
|
||||
llerr("CPSR: %08x\n", tcb->xcp.regs[REG_CPSR]);
|
||||
_llinfo("CPSR: %08x\n", tcb->xcp.regs[REG_CPSR]);
|
||||
}
|
||||
#else
|
||||
# define arm_registerdump(tcb)
|
||||
|
@ -104,7 +104,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr)
|
||||
* fatal error.
|
||||
*/
|
||||
|
||||
pgllerr("DFSR: %08x DFAR: %08x\n", dfsr, dfar);
|
||||
pgllinfo("DFSR: %08x DFAR: %08x\n", dfsr, dfar);
|
||||
if ((dfsr & FSR_MASK) != FSR_PAGE)
|
||||
{
|
||||
goto segfault;
|
||||
@ -152,7 +152,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr)
|
||||
return regs;
|
||||
|
||||
segfault:
|
||||
alert("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n",
|
||||
_alert("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n",
|
||||
regs[REG_PC], dfar, dfsr);
|
||||
PANIC();
|
||||
return regs; /* To keep the compiler happy */
|
||||
@ -170,7 +170,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr)
|
||||
|
||||
/* Crash -- possibly showing diagnostic debug information. */
|
||||
|
||||
alert("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n",
|
||||
_alert("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n",
|
||||
regs[REG_PC], dfar, dfsr);
|
||||
PANIC();
|
||||
return regs; /* To keep the compiler happy */
|
||||
|
@ -74,7 +74,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if (ehdr->e_machine != EM_ARM)
|
||||
{
|
||||
berr("Not for ARM: e_machine=%04x\n", ehdr->e_machine);
|
||||
berr("ERROR: Not for ARM: e_machine=%04x\n", ehdr->e_machine);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if (ehdr->e_ident[EI_CLASS] != ELFCLASS32)
|
||||
{
|
||||
berr("Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]);
|
||||
berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB)
|
||||
#endif
|
||||
{
|
||||
berr("Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]);
|
||||
berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if ((ehdr->e_entry & 3) != 0)
|
||||
{
|
||||
berr("Entry point is not properly aligned: %08x\n", ehdr->e_entry);
|
||||
berr("ERROR: Entry point is not properly aligned: %08x\n", ehdr->e_entry);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
offset += sym->st_value - addr;
|
||||
if (offset & 3 || offset <= (int32_t) 0xfe000000 || offset >= (int32_t) 0x02000000)
|
||||
{
|
||||
berr(" ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
|
||||
berr("ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
|
||||
ELF32_R_TYPE(rel->r_info), offset);
|
||||
|
||||
return -EINVAL;
|
||||
@ -246,7 +246,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
break;
|
||||
|
||||
default:
|
||||
berr("Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info));
|
||||
berr("ERROR: Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -256,6 +256,6 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
||||
uintptr_t addr)
|
||||
{
|
||||
berr("RELA relocation not supported\n");
|
||||
berr("ERROR: RELA relocation not supported\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
@ -411,7 +411,7 @@ void up_l2ccinitialize(void)
|
||||
putreg32(L2CC_CR_L2CEN, L2CC_CR);
|
||||
}
|
||||
|
||||
llerr("(%d ways) * (%d bytes/way) = %d bytes\n",
|
||||
sinfo("(%d ways) * (%d bytes/way) = %d bytes\n",
|
||||
PL310_NWAYS, PL310_WAYSIZE, PL310_CACHE_SIZE);
|
||||
}
|
||||
|
||||
|
@ -86,8 +86,8 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
||||
* virtual addresses.
|
||||
*/
|
||||
|
||||
pgllerr("VADDR: %08x VBASE: %08x VEND: %08x\n",
|
||||
regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND);
|
||||
pgllinfo("VADDR: %08x VBASE: %08x VEND: %08x\n",
|
||||
regs[REG_PC], PG_PAGED_VBASE, PG_PAGED_VEND);
|
||||
|
||||
if (regs[REG_R15] >= PG_PAGED_VBASE && regs[REG_R15] < PG_PAGED_VEND)
|
||||
{
|
||||
@ -123,7 +123,7 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n",
|
||||
_alert("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n",
|
||||
regs[REG_PC], ifar, ifsr);
|
||||
PANIC();
|
||||
}
|
||||
@ -143,7 +143,7 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
||||
|
||||
/* Crash -- possibly showing diagnostic debug information. */
|
||||
|
||||
alert("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n",
|
||||
_alert("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n",
|
||||
regs[REG_PC], ifar, ifsr);
|
||||
PANIC();
|
||||
return regs; /* To keep the compiler happy */
|
||||
|
@ -67,7 +67,7 @@ void up_release_pending(void)
|
||||
{
|
||||
struct tcb_s *rtcb = this_task();
|
||||
|
||||
sllerr("From TCB=%p\n", rtcb);
|
||||
sllinfo("From TCB=%p\n", rtcb);
|
||||
|
||||
/* 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();
|
||||
bool switch_needed;
|
||||
|
||||
sllerr("TCB=%p PRI=%d\n", tcb, priority);
|
||||
sllinfo("TCB=%p PRI=%d\n", tcb, priority);
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list.
|
||||
* sched_removereadytorun will return true if we just
|
||||
|
@ -94,7 +94,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
serr("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||
sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||
|
||||
/* Make sure that interrupts are disabled */
|
||||
|
||||
@ -108,7 +108,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
* to the currently executing task.
|
||||
*/
|
||||
|
||||
serr("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS);
|
||||
sinfo("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS);
|
||||
|
||||
if (tcb == this_task())
|
||||
{
|
||||
|
@ -83,7 +83,7 @@ void up_sigdeliver(void)
|
||||
|
||||
board_autoled_on(LED_SIGNAL);
|
||||
|
||||
serr("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
@ -114,7 +114,7 @@ void up_sigdeliver(void)
|
||||
* errno that is needed by the user logic (it is probably EINTR).
|
||||
*/
|
||||
|
||||
serr("Resuming\n");
|
||||
sinfo("Resuming\n");
|
||||
(void)up_irq_save();
|
||||
rtcb->pterrno = saved_errno;
|
||||
|
||||
|
@ -54,21 +54,6 @@
|
||||
#include "addrenv.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
/* Debug ********************************************************************/
|
||||
|
||||
#if defined(CONFIG_DEBUG_SYSCALL)
|
||||
# define svcerr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
# define svcwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
||||
# define svcinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define svcerr(x...)
|
||||
# define svcwarn(x...)
|
||||
# define svcinfo(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
@ -171,16 +156,14 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
* and R1..R7 = variable number of arguments depending on the system call.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_DEBUG_SYSCALL)
|
||||
svcinfo("SYSCALL Entry: regs: %p cmd: %d\n", regs, cmd);
|
||||
svcinfo(" 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]);
|
||||
svcinfo(" 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]);
|
||||
svcinfo("CPSR: %08x\n", regs[REG_CPSR]);
|
||||
#endif
|
||||
svcllinfo("SYSCALL Entry: regs: %p cmd: %d\n", regs, cmd);
|
||||
svcllinfo(" 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]);
|
||||
svcllinfo(" 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]);
|
||||
svcllinfo("CPSR: %08x\n", regs[REG_CPSR]);
|
||||
|
||||
/* Handle the SVCall according to the command in R0 */
|
||||
|
||||
@ -473,7 +456,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
|
||||
regs[REG_R0] -= CONFIG_SYS_RESERVED;
|
||||
#else
|
||||
svcerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
|
||||
svcllerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_KERNEL_STACK
|
||||
@ -494,18 +477,16 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DEBUG_SYSCALL)
|
||||
/* Report what happened */
|
||||
|
||||
svcinfo("SYSCALL Exit: regs: %p\n", regs);
|
||||
svcinfo(" 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]);
|
||||
svcinfo(" 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]);
|
||||
svcinfo("CPSR: %08x\n", regs[REG_CPSR]);
|
||||
#endif
|
||||
svcllinfo("SYSCALL Exit: regs: %p\n", regs);
|
||||
svcllinfo(" 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]);
|
||||
svcllinfo(" 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]);
|
||||
svcllinfo("CPSR: %08x\n", regs[REG_CPSR]);
|
||||
|
||||
/* Return the last value of curent_regs. This supports context switches
|
||||
* on return from the exception. That capability is only used with the
|
||||
@ -519,7 +500,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
|
||||
uint32_t *arm_syscall(uint32_t *regs)
|
||||
{
|
||||
alert("SYSCALL from 0x%x\n", regs[REG_PC]);
|
||||
_alert("SYSCALL from 0x%x\n", regs[REG_PC]);
|
||||
CURRENT_REGS = regs;
|
||||
PANIC();
|
||||
}
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
uint32_t *arm_undefinedinsn(uint32_t *regs)
|
||||
{
|
||||
alert("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
||||
_alert("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
||||
CURRENT_REGS = regs;
|
||||
PANIC();
|
||||
return regs; /* To keep the compiler happy */
|
||||
|
@ -219,13 +219,13 @@ uint32_t mpu_subregion(uintptr_t base, size_t size, uint8_t l2size);
|
||||
|
||||
static inline void mpu_showtype(void)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_ERROR
|
||||
#ifdef CONFIG_DEBUG_SCHED_INFO
|
||||
uint32_t regval = getreg32(MPU_TYPE);
|
||||
|
||||
err("%s MPU Regions: data=%d instr=%d\n",
|
||||
(regval & MPU_TYPE_SEPARATE) != 0 ? "Separate" : "Unified",
|
||||
(regval & MPU_TYPE_DREGION_MASK) >> MPU_TYPE_DREGION_SHIFT,
|
||||
(regval & MPU_TYPE_IREGION_MASK) >> MPU_TYPE_IREGION_SHIFT);
|
||||
sinfo("%s MPU Regions: data=%d instr=%d\n",
|
||||
(regval & MPU_TYPE_SEPARATE) != 0 ? "Separate" : "Unified",
|
||||
(regval & MPU_TYPE_DREGION_MASK) >> MPU_TYPE_DREGION_SHIFT,
|
||||
(regval & MPU_TYPE_IREGION_MASK) >> MPU_TYPE_IREGION_SHIFT);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)stack;
|
||||
alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
@ -116,11 +116,11 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
/* Dump interesting properties of this task */
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
alert("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||
_alert("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||
(unsigned long)tcb->adj_stack_size);
|
||||
#else
|
||||
alert("PID: %d Stack Used=%lu of %lu\n",
|
||||
_alert("PID: %d Stack Used=%lu of %lu\n",
|
||||
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||
(unsigned long)tcb->adj_stack_size);
|
||||
#endif
|
||||
@ -155,29 +155,29 @@ static inline void up_registerdump(void)
|
||||
{
|
||||
/* Yes.. dump the interrupt registers */
|
||||
|
||||
alert("R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_alert("R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1],
|
||||
CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3],
|
||||
CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5],
|
||||
CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]);
|
||||
alert("R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_alert("R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9],
|
||||
CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
|
||||
CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
|
||||
CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
|
||||
|
||||
#ifdef CONFIG_ARMV7M_USEBASEPRI
|
||||
alert("xPSR: %08x BASEPRI: %08x CONTROL: %08x\n",
|
||||
_alert("xPSR: %08x BASEPRI: %08x CONTROL: %08x\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI],
|
||||
getcontrol());
|
||||
#else
|
||||
alert("xPSR: %08x PRIMASK: %08x CONTROL: %08x\n",
|
||||
_alert("xPSR: %08x PRIMASK: %08x CONTROL: %08x\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
|
||||
getcontrol());
|
||||
#endif
|
||||
|
||||
#ifdef REG_EXC_RETURN
|
||||
alert("EXC_RETURN: %08x\n", CURRENT_REGS[REG_EXC_RETURN]);
|
||||
_alert("EXC_RETURN: %08x\n", CURRENT_REGS[REG_EXC_RETURN]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -247,12 +247,12 @@ static void up_dumpstate(void)
|
||||
|
||||
/* Show interrupt stack info */
|
||||
|
||||
alert("sp: %08x\n", sp);
|
||||
alert("IRQ stack:\n");
|
||||
alert(" base: %08x\n", istackbase);
|
||||
alert(" size: %08x\n", istacksize);
|
||||
_alert("sp: %08x\n", sp);
|
||||
_alert("IRQ stack:\n");
|
||||
_alert(" base: %08x\n", istackbase);
|
||||
_alert(" size: %08x\n", istacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
alert(" used: %08x\n", up_check_intstack());
|
||||
_alert(" used: %08x\n", up_check_intstack());
|
||||
#endif
|
||||
|
||||
/* Does the current stack pointer lie within the interrupt
|
||||
@ -274,14 +274,14 @@ static void up_dumpstate(void)
|
||||
if (CURRENT_REGS)
|
||||
{
|
||||
sp = CURRENT_REGS[REG_R13];
|
||||
alert("sp: %08x\n", sp);
|
||||
_alert("sp: %08x\n", sp);
|
||||
}
|
||||
|
||||
alert("User stack:\n");
|
||||
alert(" base: %08x\n", ustackbase);
|
||||
alert(" size: %08x\n", ustacksize);
|
||||
_alert("User stack:\n");
|
||||
_alert(" base: %08x\n", ustackbase);
|
||||
_alert(" size: %08x\n", ustacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
alert(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||
_alert(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||
#endif
|
||||
|
||||
/* Dump the user stack if the stack pointer lies within the allocated user
|
||||
@ -297,11 +297,11 @@ static void up_dumpstate(void)
|
||||
|
||||
/* Show user stack info */
|
||||
|
||||
alert("sp: %08x\n", sp);
|
||||
alert("stack base: %08x\n", ustackbase);
|
||||
alert("stack size: %08x\n", ustacksize);
|
||||
_alert("sp: %08x\n", sp);
|
||||
_alert("stack base: %08x\n", ustackbase);
|
||||
_alert("stack size: %08x\n", ustacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
alert("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||
_alert("stack used: %08x\n", up_check_tcbstack(rtcb));
|
||||
#endif
|
||||
|
||||
/* Dump the user stack if the stack pointer lies within the allocated user
|
||||
@ -310,7 +310,7 @@ static void up_dumpstate(void)
|
||||
|
||||
if (sp > ustackbase || sp <= ustackbase - ustacksize)
|
||||
{
|
||||
alert("ERROR: Stack pointer is not within the allocated stack\n");
|
||||
_alert("ERROR: Stack pointer is not within the allocated stack\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -382,10 +382,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
||||
board_autoled_on(LED_ASSERTION);
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
alert("Assertion failed at file:%s line: %d task: %s\n",
|
||||
_alert("Assertion failed at file:%s line: %d task: %s\n",
|
||||
filename, lineno, rtcb->name);
|
||||
#else
|
||||
alert("Assertion failed at file:%s line: %d\n",
|
||||
_alert("Assertion failed at file:%s line: %d\n",
|
||||
filename, lineno);
|
||||
#endif
|
||||
|
||||
|
@ -82,7 +82,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if (ehdr->e_machine != EM_ARM)
|
||||
{
|
||||
berr("Not for ARM: e_machine=%04x\n", ehdr->e_machine);
|
||||
berr("ERROR: Not for ARM: e_machine=%04x\n", ehdr->e_machine);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if (ehdr->e_ident[EI_CLASS] != ELFCLASS32)
|
||||
{
|
||||
berr("Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]);
|
||||
berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB)
|
||||
#endif
|
||||
{
|
||||
berr("Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]);
|
||||
berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
offset += sym->st_value - addr;
|
||||
if (offset & 3 || offset <= (int32_t) 0xfe000000 || offset >= (int32_t) 0x02000000)
|
||||
{
|
||||
berr(" ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
|
||||
berr("ERROR: ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
|
||||
ELF32_R_TYPE(rel->r_info), offset);
|
||||
|
||||
return -EINVAL;
|
||||
@ -298,7 +298,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
|
||||
if (ELF32_ST_TYPE(sym->st_info) == STT_FUNC && (offset & 1) == 0)
|
||||
{
|
||||
berr(" ERROR: JUMP24 [%d] requires odd offset, offset=%08lx\n",
|
||||
berr("ERROR: ERROR: JUMP24 [%d] requires odd offset, offset=%08lx\n",
|
||||
ELF32_R_TYPE(rel->r_info), offset);
|
||||
|
||||
return -EINVAL;
|
||||
@ -308,7 +308,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
|
||||
if (offset <= (int32_t)0xff000000 || offset >= (int32_t)0x01000000)
|
||||
{
|
||||
berr(" ERROR: JUMP24 [%d] relocation out of range, branch taget=%08lx\n",
|
||||
berr("ERROR: ERROR: JUMP24 [%d] relocation out of range, branch taget=%08lx\n",
|
||||
ELF32_R_TYPE(rel->r_info), offset);
|
||||
|
||||
return -EINVAL;
|
||||
@ -461,7 +461,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
break;
|
||||
|
||||
default:
|
||||
berr("Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info));
|
||||
berr("ERROR: Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -471,7 +471,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
||||
uintptr_t addr)
|
||||
{
|
||||
berr("RELA relocation not supported\n");
|
||||
berr("ERROR: RELA relocation not supported\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
|
@ -60,25 +60,13 @@
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_DEBUG_HARDFAULT
|
||||
# define hferr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
# define hfalert(format, ...) _alert(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define hferr(x...)
|
||||
# define hfalert(x...)
|
||||
#endif
|
||||
|
||||
#define INSN_SVC0 0xdf00 /* insn: svc 0 */
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -127,7 +115,7 @@ int up_hardfault(int irq, FAR void *context)
|
||||
/* Fetch the instruction that caused the Hard fault */
|
||||
|
||||
uint16_t insn = *pc;
|
||||
hferr(" PC: %p INSN: %04x\n", pc, insn);
|
||||
hfalert(" PC: %p INSN: %04x\n", pc, insn);
|
||||
|
||||
/* If this was the instruction 'svc 0', then forward processing
|
||||
* to the SVCall handler
|
||||
@ -135,7 +123,7 @@ int up_hardfault(int irq, FAR void *context)
|
||||
|
||||
if (insn == INSN_SVC0)
|
||||
{
|
||||
hferr("Forward SVCall\n");
|
||||
hfalert("Forward SVCall\n");
|
||||
return up_svcall(irq, context);
|
||||
}
|
||||
}
|
||||
@ -143,43 +131,43 @@ int up_hardfault(int irq, FAR void *context)
|
||||
|
||||
/* Dump some hard fault info */
|
||||
|
||||
hferr("Hard Fault:\n");
|
||||
hferr(" IRQ: %d regs: %p\n", irq, regs);
|
||||
hferr(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x CONTROL: %08x\n",
|
||||
getbasepri(), getprimask(), getipsr(), getcontrol());
|
||||
hferr(" 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));
|
||||
hferr(" 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]);
|
||||
hferr(" 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]);
|
||||
hfalert("Hard Fault:\n");
|
||||
hfalert(" IRQ: %d regs: %p\n", irq, regs);
|
||||
hfalert(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x CONTROL: %08x\n",
|
||||
getbasepri(), getprimask(), getipsr(), getcontrol());
|
||||
hfalert(" 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));
|
||||
hfalert(" 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]);
|
||||
hfalert(" 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]);
|
||||
|
||||
#ifdef CONFIG_ARMV7M_USEBASEPRI
|
||||
# ifdef REG_EXC_RETURN
|
||||
hferr(" xPSR: %08x BASEPRI: %08x EXC_RETURN: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI],
|
||||
CURRENT_REGS[REG_EXC_RETURN]);
|
||||
hfalert(" xPSR: %08x BASEPRI: %08x EXC_RETURN: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI],
|
||||
CURRENT_REGS[REG_EXC_RETURN]);
|
||||
# else
|
||||
hferr(" xPSR: %08x BASEPRI: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI]);
|
||||
hfalert(" xPSR: %08x BASEPRI: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI]);
|
||||
# endif
|
||||
#else
|
||||
# ifdef REG_EXC_RETURN
|
||||
hferr(" xPSR: %08x PRIMASK: %08x EXC_RETURN: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
|
||||
CURRENT_REGS[REG_EXC_RETURN]);
|
||||
hfalert(" xPSR: %08x PRIMASK: %08x EXC_RETURN: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
|
||||
CURRENT_REGS[REG_EXC_RETURN]);
|
||||
# else
|
||||
hferr(" xPSR: %08x PRIMASK: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]);
|
||||
hfalert(" xPSR: %08x PRIMASK: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
(void)up_irq_save();
|
||||
llerr("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS));
|
||||
_alert("PANIC!!! Hard fault: %08x\n", getreg32(NVIC_HFAULTS));
|
||||
PANIC();
|
||||
return OK;
|
||||
}
|
||||
|
@ -55,23 +55,13 @@
|
||||
#undef DEBUG_MEMFAULTS /* Define to debug memory management faults */
|
||||
|
||||
#ifdef DEBUG_MEMFAULTS
|
||||
# define mferr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
# define mferr(format, ...) _alert(format, ##__VA_ARGS__)
|
||||
# define mfinfo(format, ...) _alert(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define mferr(x...)
|
||||
# define mfinfo(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -92,36 +82,36 @@ int up_memfault(int irq, FAR void *context)
|
||||
/* Dump some memory management fault info */
|
||||
|
||||
(void)up_irq_save();
|
||||
llerr("PANIC!!! Memory Management Fault:\n");
|
||||
mferr(" IRQ: %d context: %p\n", irq, regs);
|
||||
llerr(" CFAULTS: %08x MMFAR: %08x\n",
|
||||
_alert("PANIC!!! Memory Management Fault:\n");
|
||||
mfinfo(" IRQ: %d context: %p\n", irq, regs);
|
||||
_alert(" CFAULTS: %08x MMFAR: %08x\n",
|
||||
getreg32(NVIC_CFAULTS), getreg32(NVIC_MEMMANAGE_ADDR));
|
||||
mferr(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x CONTROL: %08x\n",
|
||||
getbasepri(), getprimask(), getipsr(), getcontrol());
|
||||
mferr(" 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]);
|
||||
mferr(" 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]);
|
||||
mfinfo(" BASEPRI: %08x PRIMASK: %08x IPSR: %08x CONTROL: %08x\n",
|
||||
getbasepri(), getprimask(), getipsr(), getcontrol());
|
||||
mfinfo(" 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]);
|
||||
mfinfo(" 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]);
|
||||
|
||||
#ifdef CONFIG_ARMV7M_USEBASEPRI
|
||||
# ifdef REG_EXC_RETURN
|
||||
mferr(" xPSR: %08x BASEPRI: %08x EXC_RETURN: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI],
|
||||
CURRENT_REGS[REG_EXC_RETURN]);
|
||||
mfinfo(" xPSR: %08x BASEPRI: %08x EXC_RETURN: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI],
|
||||
CURRENT_REGS[REG_EXC_RETURN]);
|
||||
# else
|
||||
mferr(" xPSR: %08x BASEPRI: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI]);
|
||||
mfinfo(" xPSR: %08x BASEPRI: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_BASEPRI]);
|
||||
# endif
|
||||
#else
|
||||
# ifdef REG_EXC_RETURN
|
||||
mferr(" xPSR: %08x PRIMASK: %08x EXC_RETURN: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
|
||||
CURRENT_REGS[REG_EXC_RETURN]);
|
||||
mfinfo(" xPSR: %08x PRIMASK: %08x EXC_RETURN: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK],
|
||||
CURRENT_REGS[REG_EXC_RETURN]);
|
||||
# else
|
||||
mferr(" xPSR: %08x PRIMASK: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]);
|
||||
mfinfo(" xPSR: %08x PRIMASK: %08x (saved)\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_PRIMASK]);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -66,7 +66,7 @@ void up_release_pending(void)
|
||||
{
|
||||
struct tcb_s *rtcb = this_task();
|
||||
|
||||
sllerr("From TCB=%p\n", rtcb);
|
||||
sllinfo("From TCB=%p\n", rtcb);
|
||||
|
||||
/* 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();
|
||||
bool switch_needed;
|
||||
|
||||
sllerr("TCB=%p PRI=%d\n", tcb, priority);
|
||||
sllinfo("TCB=%p PRI=%d\n", tcb, priority);
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list.
|
||||
* sched_removereadytorun will return true if we just removed the head
|
||||
|
@ -95,7 +95,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
serr("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||
sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||
DEBUGASSERT(tcb != NULL && sigdeliver != NULL);
|
||||
|
||||
/* Make sure that interrupts are disabled */
|
||||
@ -110,7 +110,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
* to the currently executing task.
|
||||
*/
|
||||
|
||||
serr("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS);
|
||||
sinfo("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS);
|
||||
|
||||
if (tcb == this_task())
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ void up_sigdeliver(void)
|
||||
|
||||
board_autoled_on(LED_SIGNAL);
|
||||
|
||||
serr("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
@ -138,7 +138,7 @@ void up_sigdeliver(void)
|
||||
* errno that is needed by the user logic (it is probably EINTR).
|
||||
*/
|
||||
|
||||
serr("Resuming\n");
|
||||
sinfo("Resuming\n");
|
||||
(void)up_irq_save();
|
||||
rtcb->pterrno = saved_errno;
|
||||
|
||||
|
@ -56,33 +56,6 @@
|
||||
#include "exc_return.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* Debug ********************************************************************/
|
||||
/* Debug output from this file may interfere with context switching! To get
|
||||
* debug output you must enabled the following in your NuttX configuration:
|
||||
*
|
||||
* - CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_SYSCALL (shows only syscalls)
|
||||
* - CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_SVCALL (shows everything)
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
|
||||
# define svcerr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define svcerr(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
@ -164,23 +137,23 @@ int up_svcall(int irq, FAR void *context)
|
||||
* and R1..R7 = variable number of arguments depending on the system call.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
|
||||
#ifdef CONFIG_DEBUG_SYSCALL_INFO
|
||||
# ifndef CONFIG_DEBUG_SVCALL
|
||||
if (cmd > SYS_switch_context)
|
||||
# endif
|
||||
{
|
||||
svcerr("SVCALL Entry: regs: %p cmd: %d\n", regs, cmd);
|
||||
svcerr(" 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]);
|
||||
svcerr(" 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]);
|
||||
svcllinfo("SVCALL Entry: regs: %p cmd: %d\n", regs, cmd);
|
||||
svcllinfo(" 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]);
|
||||
svcllinfo(" 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]);
|
||||
# ifdef REG_EXC_RETURN
|
||||
svcerr(" PSR: %08x EXC_RETURN: %08x\n",
|
||||
regs[REG_XPSR], regs[REG_EXC_RETURN]);
|
||||
svcllinfo(" PSR: %08x EXC_RETURN: %08x\n",
|
||||
regs[REG_XPSR], regs[REG_EXC_RETURN]);
|
||||
# else
|
||||
svcerr(" PSR: %08x\n", regs[REG_XPSR]);
|
||||
svcllinfo(" PSR: %08x\n", regs[REG_XPSR]);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
@ -473,7 +446,7 @@ int up_svcall(int irq, FAR void *context)
|
||||
|
||||
regs[REG_R0] -= CONFIG_SYS_RESERVED;
|
||||
#else
|
||||
sllerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
|
||||
svcllerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
@ -481,35 +454,35 @@ int up_svcall(int irq, FAR void *context)
|
||||
|
||||
/* Report what happened. That might difficult in the case of a context switch */
|
||||
|
||||
#if defined(CONFIG_DEBUG_SYSCALL) || defined(CONFIG_DEBUG_SVCALL)
|
||||
#ifdef CONFIG_DEBUG_SYSCALL_INFO
|
||||
# ifndef CONFIG_DEBUG_SVCALL
|
||||
if (cmd > SYS_switch_context)
|
||||
# else
|
||||
if (regs != CURRENT_REGS)
|
||||
# endif
|
||||
{
|
||||
svcerr("SVCall Return:\n");
|
||||
svcerr(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1],
|
||||
CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3],
|
||||
CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5],
|
||||
CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]);
|
||||
svcerr(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9],
|
||||
CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
|
||||
CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
|
||||
CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
|
||||
svcllinfo("SVCall Return:\n");
|
||||
svcllinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
CURRENT_REGS[REG_R0], CURRENT_REGS[REG_R1],
|
||||
CURRENT_REGS[REG_R2], CURRENT_REGS[REG_R3],
|
||||
CURRENT_REGS[REG_R4], CURRENT_REGS[REG_R5],
|
||||
CURRENT_REGS[REG_R6], CURRENT_REGS[REG_R7]);
|
||||
svcllinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
CURRENT_REGS[REG_R8], CURRENT_REGS[REG_R9],
|
||||
CURRENT_REGS[REG_R10], CURRENT_REGS[REG_R11],
|
||||
CURRENT_REGS[REG_R12], CURRENT_REGS[REG_R13],
|
||||
CURRENT_REGS[REG_R14], CURRENT_REGS[REG_R15]);
|
||||
# ifdef REG_EXC_RETURN
|
||||
svcerr(" PSR: %08x EXC_RETURN: %08x\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_EXC_RETURN]);
|
||||
svcllinfo(" PSR: %08x EXC_RETURN: %08x\n",
|
||||
CURRENT_REGS[REG_XPSR], CURRENT_REGS[REG_EXC_RETURN]);
|
||||
# else
|
||||
svcerr(" PSR: %08x\n", CURRENT_REGS[REG_XPSR]);
|
||||
svcllinfo(" PSR: %08x\n", CURRENT_REGS[REG_XPSR]);
|
||||
# endif
|
||||
}
|
||||
# ifdef CONFIG_DEBUG_SVCALL
|
||||
else
|
||||
{
|
||||
svcerr("SVCall Return: %d\n", regs[REG_R0]);
|
||||
svcllinfo("SVCall Return: %d\n", regs[REG_R0]);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
@ -98,7 +98,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)stack;
|
||||
llerr("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
@ -117,11 +117,11 @@ static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
/* Dump interesting properties of this task */
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
llerr("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||
_alert("%s: PID=%d Stack Used=%lu of %lu\n",
|
||||
tcb->name, tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||
(unsigned long)tcb->adj_stack_size);
|
||||
#else
|
||||
llerr("PID: %d Stack Used=%lu of %lu\n",
|
||||
_alert("PID: %d Stack Used=%lu of %lu\n",
|
||||
tcb->pid, (unsigned long)up_check_tcbstack(tcb),
|
||||
(unsigned long)tcb->adj_stack_size);
|
||||
#endif
|
||||
@ -161,12 +161,12 @@ static inline void up_registerdump(void)
|
||||
for (regs = REG_R0; regs <= REG_R15; regs += 8)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t *)&CURRENT_REGS[regs];
|
||||
llerr("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
_alert("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
regs, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
}
|
||||
|
||||
llerr("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
||||
_alert("CPSR: %08x\n", CURRENT_REGS[REG_CPSR]);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@ -230,7 +230,7 @@ static void up_dumpstate(void)
|
||||
ustacksize = (uint32_t)rtcb->adj_stack_size;
|
||||
}
|
||||
|
||||
llerr("Current sp: %08x\n", sp);
|
||||
_alert("Current sp: %08x\n", sp);
|
||||
|
||||
#if CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||
/* Get the limits on the interrupt stack memory */
|
||||
@ -240,21 +240,21 @@ static void up_dumpstate(void)
|
||||
|
||||
/* Show interrupt stack info */
|
||||
|
||||
llerr("Interrupt stack:\n");
|
||||
llerr(" base: %08x\n", istackbase);
|
||||
llerr(" size: %08x\n", istacksize);
|
||||
_alert("Interrupt stack:\n");
|
||||
_alert(" base: %08x\n", istackbase);
|
||||
_alert(" size: %08x\n", istacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
llerr(" used: %08x\n", up_check_intstack());
|
||||
_alert(" used: %08x\n", up_check_intstack());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Show user stack info */
|
||||
|
||||
llerr("User stack:\n");
|
||||
llerr(" base: %08x\n", ustackbase);
|
||||
llerr(" size: %08x\n", ustacksize);
|
||||
_alert("User stack:\n");
|
||||
_alert(" base: %08x\n", ustackbase);
|
||||
_alert(" size: %08x\n", ustacksize);
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
llerr(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||
_alert(" used: %08x\n", up_check_tcbstack(rtcb));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_KERNEL_STACK
|
||||
@ -264,9 +264,9 @@ static void up_dumpstate(void)
|
||||
{
|
||||
kstackbase = (uint32_t)rtcb->xcp.kstack + CONFIG_ARCH_KERNEL_STACKSIZE - 4;
|
||||
|
||||
llerr("Kernel stack:\n");
|
||||
llerr(" base: %08x\n", kstackbase);
|
||||
llerr(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE);
|
||||
_alert("Kernel stack:\n");
|
||||
_alert(" base: %08x\n", kstackbase);
|
||||
_alert(" size: %08x\n", CONFIG_ARCH_KERNEL_STACKSIZE);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -277,7 +277,7 @@ static void up_dumpstate(void)
|
||||
{
|
||||
/* Yes.. dump the interrupt stack */
|
||||
|
||||
llerr("Interrupt Stack\n", sp);
|
||||
_alert("Interrupt Stack\n", sp);
|
||||
up_stackdump(sp, istackbase);
|
||||
|
||||
/* Extract the user stack pointer which should lie
|
||||
@ -285,7 +285,7 @@ static void up_dumpstate(void)
|
||||
*/
|
||||
|
||||
sp = g_intstackbase;
|
||||
llerr("User sp: %08x\n", sp);
|
||||
_alert("User sp: %08x\n", sp);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -295,7 +295,7 @@ static void up_dumpstate(void)
|
||||
|
||||
if (sp > ustackbase - ustacksize && sp < ustackbase)
|
||||
{
|
||||
llerr("User Stack\n", sp);
|
||||
_alert("User Stack\n", sp);
|
||||
up_stackdump(sp, ustackbase);
|
||||
}
|
||||
|
||||
@ -306,7 +306,7 @@ static void up_dumpstate(void)
|
||||
|
||||
if (sp >= (uint32_t)rtcb->xcp.kstack && sp < kstackbase)
|
||||
{
|
||||
llerr("Kernel Stack\n", sp);
|
||||
_alert("Kernel Stack\n", sp);
|
||||
up_stackdump(sp, kstackbase);
|
||||
}
|
||||
#endif
|
||||
@ -373,10 +373,10 @@ void up_assert(const uint8_t *filename, int lineno)
|
||||
board_autoled_on(LED_ASSERTION);
|
||||
|
||||
#if CONFIG_TASK_NAME_SIZE > 0
|
||||
llerr("Assertion failed at file:%s line: %d task: %s\n",
|
||||
_alert("Assertion failed at file:%s line: %d task: %s\n",
|
||||
filename, lineno, rtcb->name);
|
||||
#else
|
||||
llerr("Assertion failed at file:%s line: %d\n",
|
||||
_alert("Assertion failed at file:%s line: %d\n",
|
||||
filename, lineno);
|
||||
#endif
|
||||
up_dumpstate();
|
||||
|
@ -75,7 +75,7 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr)
|
||||
|
||||
/* Crash -- possibly showing diagnostic debug information. */
|
||||
|
||||
alert("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n",
|
||||
_alert("Data abort. PC: %08x DFAR: %08x DFSR: %08x\n",
|
||||
regs[REG_PC], dfar, dfsr);
|
||||
PANIC();
|
||||
return regs; /* To keep the compiler happy */
|
||||
|
@ -86,7 +86,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if (ehdr->e_machine != EM_ARM)
|
||||
{
|
||||
berr("Not for ARM: e_machine=%04x\n", ehdr->e_machine);
|
||||
berr("ERROR: Not for ARM: e_machine=%04x\n", ehdr->e_machine);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if (ehdr->e_ident[EI_CLASS] != ELFCLASS32)
|
||||
{
|
||||
berr("Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]);
|
||||
berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB)
|
||||
#endif
|
||||
{
|
||||
berr("Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]);
|
||||
berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
|
||||
|
||||
if ((ehdr->e_entry & 3) != 0)
|
||||
{
|
||||
berr("Entry point is not properly aligned: %08x\n", ehdr->e_entry);
|
||||
berr("ERROR: Entry point is not properly aligned: %08x\n", ehdr->e_entry);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@ -187,8 +187,8 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
offset += sym->st_value - addr;
|
||||
if (offset & 3 || offset <= (int32_t) 0xfe000000 || offset >= (int32_t) 0x02000000)
|
||||
{
|
||||
berr(" ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
|
||||
ELF32_R_TYPE(rel->r_info), offset);
|
||||
berr("ERROR: ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
|
||||
ELF32_R_TYPE(rel->r_info), offset);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -258,7 +258,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
break;
|
||||
|
||||
default:
|
||||
berr("Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info));
|
||||
berr("ERROR: Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -268,6 +268,6 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
|
||||
int up_relocateadd(FAR const Elf32_Rela *rel, FAR const Elf32_Sym *sym,
|
||||
uintptr_t addr)
|
||||
{
|
||||
berr("RELA relocation not supported\n");
|
||||
berr("ERROR: RELA relocation not supported\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
@ -411,8 +411,8 @@ void up_l2ccinitialize(void)
|
||||
putreg32(L2CC_CR_L2CEN, L2CC_CR);
|
||||
}
|
||||
|
||||
llerr("(%d ways) * (%d bytes/way) = %d bytes\n",
|
||||
PL310_NWAYS, PL310_WAYSIZE, PL310_CACHE_SIZE);
|
||||
sllinfo("(%d ways) * (%d bytes/way) = %d bytes\n",
|
||||
PL310_NWAYS, PL310_WAYSIZE, PL310_CACHE_SIZE);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -71,7 +71,7 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
||||
|
||||
/* Crash -- possibly showing diagnostic debug information. */
|
||||
|
||||
alert("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n",
|
||||
_alert("Prefetch abort. PC: %08x IFAR: %08x IFSR: %08x\n",
|
||||
regs[REG_PC], ifar, ifsr);
|
||||
PANIC();
|
||||
return regs; /* To keep the compiler happy */
|
||||
|
@ -67,7 +67,7 @@ void up_release_pending(void)
|
||||
{
|
||||
struct tcb_s *rtcb = this_task();
|
||||
|
||||
sllerr("From TCB=%p\n", rtcb);
|
||||
sllinfo("From TCB=%p\n", rtcb);
|
||||
|
||||
/* 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();
|
||||
bool switch_needed;
|
||||
|
||||
sllerr("TCB=%p PRI=%d\n", tcb, priority);
|
||||
sllinfo("TCB=%p PRI=%d\n", tcb, priority);
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list.
|
||||
* sched_removereadytorun will return true if we just
|
||||
|
@ -94,7 +94,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
serr("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||
sinfo("tcb=0x%p sigdeliver=0x%p\n", tcb, sigdeliver);
|
||||
|
||||
/* Make sure that interrupts are disabled */
|
||||
|
||||
@ -108,7 +108,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
|
||||
* to the currently executing task.
|
||||
*/
|
||||
|
||||
serr("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS);
|
||||
sinfo("rtcb=0x%p CURRENT_REGS=0x%p\n", this_task(), CURRENT_REGS);
|
||||
|
||||
if (tcb == this_task())
|
||||
{
|
||||
|
@ -83,7 +83,7 @@ void up_sigdeliver(void)
|
||||
|
||||
board_autoled_on(LED_SIGNAL);
|
||||
|
||||
serr("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
@ -114,7 +114,7 @@ void up_sigdeliver(void)
|
||||
* errno that is needed by the user logic (it is probably EINTR).
|
||||
*/
|
||||
|
||||
serr("Resuming\n");
|
||||
sinfo("Resuming\n");
|
||||
(void)up_irq_save();
|
||||
rtcb->pterrno = saved_errno;
|
||||
|
||||
|
@ -52,22 +52,6 @@
|
||||
#include "svcall.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Debug ********************************************************************/
|
||||
|
||||
#if defined(CONFIG_DEBUG_SYSCALL)
|
||||
# define svcerr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
# define svcwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
||||
# define svcinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define svcerr(x...)
|
||||
# define svcwarn(x...)
|
||||
# define svcinfo(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
@ -170,16 +154,14 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
* and R1..R7 = variable number of arguments depending on the system call.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_DEBUG_SYSCALL)
|
||||
svcinfo("SYSCALL Entry: regs: %p cmd: %d\n", regs, cmd);
|
||||
svcinfo(" 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]);
|
||||
svcinfo(" 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]);
|
||||
svcinfo("CPSR: %08x\n", regs[REG_CPSR]);
|
||||
#endif
|
||||
svcllinfo("SYSCALL Entry: regs: %p cmd: %d\n", regs, cmd);
|
||||
svcllinfo(" 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]);
|
||||
svcllinfo(" 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]);
|
||||
svcllinfo("CPSR: %08x\n", regs[REG_CPSR]);
|
||||
|
||||
/* Handle the SVCall according to the command in R0 */
|
||||
|
||||
@ -472,7 +454,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
|
||||
regs[REG_R0] -= CONFIG_SYS_RESERVED;
|
||||
#else
|
||||
svcerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
|
||||
svcllerr("ERROR: Bad SYS call: %d\n", regs[REG_R0]);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_KERNEL_STACK
|
||||
@ -493,18 +475,16 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DEBUG_SYSCALL)
|
||||
/* Report what happened */
|
||||
|
||||
svcinfo("SYSCALL Exit: regs: %p\n", regs);
|
||||
svcinfo(" 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]);
|
||||
svcinfo(" 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]);
|
||||
svcinfo("CPSR: %08x\n", regs[REG_CPSR]);
|
||||
#endif
|
||||
svcllinfo("SYSCALL Exit: regs: %p\n", regs);
|
||||
svcllinfo(" 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]);
|
||||
svcllinfo(" 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]);
|
||||
svcllinfo("CPSR: %08x\n", regs[REG_CPSR]);
|
||||
|
||||
/* Return the last value of curent_regs. This supports context switches
|
||||
* on return from the exception. That capability is only used with the
|
||||
@ -518,7 +498,7 @@ uint32_t *arm_syscall(uint32_t *regs)
|
||||
|
||||
uint32_t *arm_syscall(uint32_t *regs)
|
||||
{
|
||||
alert("SYSCALL from 0x%x\n", regs[REG_PC]);
|
||||
_alert("SYSCALL from 0x%x\n", regs[REG_PC]);
|
||||
CURRENT_REGS = regs;
|
||||
PANIC();
|
||||
}
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
uint32_t *arm_undefinedinsn(uint32_t *regs)
|
||||
{
|
||||
alert("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
||||
_alert("Undefined instruction at 0x%x\n", regs[REG_PC]);
|
||||
CURRENT_REGS = regs;
|
||||
PANIC();
|
||||
return regs; /* To keep the compiler happy */
|
||||
|
@ -359,12 +359,12 @@ static inline void mpu_set_rgnr(unsigned int rgnr)
|
||||
|
||||
static inline void mpu_showtype(void)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
#ifdef CONFIG_DEBUG_SCHED_INFO
|
||||
uint32_t regval = mpu_get_mpuir();
|
||||
err("%s MPU Regions: data=%d instr=%d\n",
|
||||
(regval & MPUIR_SEPARATE) != 0 ? "Separate" : "Unified",
|
||||
(regval & MPUIR_DREGION_MASK) >> MPUIR_DREGION_SHIFT,
|
||||
(regval & MPUIR_IREGION_MASK) >> MPUIR_IREGION_SHIFT);
|
||||
sinfo("%s MPU Regions: data=%d instr=%d\n",
|
||||
(regval & MPUIR_SEPARATE) != 0 ? "Separate" : "Unified",
|
||||
(regval & MPUIR_DREGION_MASK) >> MPUIR_DREGION_SHIFT,
|
||||
(regval & MPUIR_IREGION_MASK) >> MPUIR_IREGION_SHIFT);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -737,22 +737,22 @@ static int c5471_phyinit (void)
|
||||
phyid = (c5471_mdread(0, MD_PHY_MSB_REG) << 16) | c5471_mdread(0, MD_PHY_LSB_REG);
|
||||
if (phyid != LU3X31_T64_PHYID)
|
||||
{
|
||||
nerr("Unrecognized PHY ID: %08x\n", phyid);
|
||||
nerr("ERROR: Unrecognized PHY ID: %08x\n", phyid);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/* Next, Set desired network rate, 10BaseT, 100BaseT, or auto. */
|
||||
|
||||
#ifdef CONFIG_C5471_AUTONEGOTIATION
|
||||
nerr("Setting PHY Transceiver for Autonegotiation\n");
|
||||
ninfo("Setting PHY Transceiver for Autonegotiation\n");
|
||||
c5471_mdwrite(0, MD_PHY_CONTROL_REG, MODE_AUTONEG);
|
||||
#endif
|
||||
#ifdef CONFIG_C5471_BASET100
|
||||
nerr("Setting PHY Transceiver for 100BaseT FullDuplex\n");
|
||||
ninfo("Setting PHY Transceiver for 100BaseT FullDuplex\n");
|
||||
c5471_mdwrite(0, MD_PHY_CONTROL_REG, MODE_100MBIT_FULLDUP);
|
||||
#endif
|
||||
#ifdef CONFIG_C5471_BASET10
|
||||
nerr("Setting PHY Transceiver for 10BaseT FullDuplex\n");
|
||||
ninfo("Setting PHY Transceiver for 10BaseT FullDuplex\n");
|
||||
c5471_mdwrite(0, MD_PHY_CONTROL_REG, MODE_10MBIT_FULLDUP);
|
||||
#endif
|
||||
|
||||
@ -1371,7 +1371,7 @@ static void c5471_receive(struct c5471_driver_s *c5471)
|
||||
{
|
||||
/* Increment the count of dropped packets */
|
||||
|
||||
nerr("Too big! packetlen: %d\n", packetlen);
|
||||
nwarn("WARNING: Too big! packetlen: %d\n", packetlen);
|
||||
c5471->c_rxdropped++;
|
||||
}
|
||||
#endif
|
||||
@ -1680,9 +1680,9 @@ static int c5471_ifup(struct net_driver_s *dev)
|
||||
struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private;
|
||||
volatile uint32_t clearbits;
|
||||
|
||||
nerr("Bringing up: %d.%d.%d.%d\n",
|
||||
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
|
||||
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
|
||||
ninfo("Bringing up: %d.%d.%d.%d\n",
|
||||
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
|
||||
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
|
||||
|
||||
/* Initilize Ethernet interface */
|
||||
|
||||
@ -1742,7 +1742,7 @@ static int c5471_ifdown(struct net_driver_s *dev)
|
||||
struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private;
|
||||
irqstate_t flags;
|
||||
|
||||
nerr("Stopping\n");
|
||||
ninfo("Stopping\n");
|
||||
|
||||
/* Disable the Ethernet interrupt */
|
||||
|
||||
@ -1798,7 +1798,7 @@ static int c5471_txavail(struct net_driver_s *dev)
|
||||
struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private;
|
||||
irqstate_t flags;
|
||||
|
||||
nerr("Polling\n");
|
||||
ninfo("Polling\n");
|
||||
flags = enter_critical_section();
|
||||
|
||||
/* Ignore the notification if the interface is not yet up */
|
||||
@ -1951,7 +1951,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471)
|
||||
|
||||
/* TX ENET 0 */
|
||||
|
||||
nerr("TX ENET0 desc: %08x pbuf: %08x\n", desc, pbuf);
|
||||
ninfo("TX ENET0 desc: %08x pbuf: %08x\n", desc, pbuf);
|
||||
putreg32((desc & 0x0000ffff), ENET0_TDBA); /* 16-bit offset address */
|
||||
for (i = NUM_DESC_TX-1; i >= 0; i--)
|
||||
{
|
||||
@ -1978,7 +1978,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471)
|
||||
|
||||
/* RX ENET 0 */
|
||||
|
||||
nerr("RX ENET0 desc: %08x pbuf: %08x\n", desc, pbuf);
|
||||
ninfo("RX ENET0 desc: %08x pbuf: %08x\n", desc, pbuf);
|
||||
putreg32((desc & 0x0000ffff), ENET0_RDBA); /* 16-bit offset address */
|
||||
for (i = NUM_DESC_RX-1; i >= 0; i--)
|
||||
{
|
||||
@ -2005,7 +2005,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471)
|
||||
|
||||
/* TX CPU */
|
||||
|
||||
nerr("TX CPU desc: %08x pbuf: %08x\n", desc, pbuf);
|
||||
ninfo("TX CPU desc: %08x pbuf: %08x\n", desc, pbuf);
|
||||
c5471->c_txcpudesc = desc;
|
||||
putreg32((desc & 0x0000ffff), EIM_CPU_TXBA); /* 16-bit offset address */
|
||||
for (i = NUM_DESC_TX-1; i >= 0; i--)
|
||||
@ -2035,7 +2035,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471)
|
||||
|
||||
/* RX CPU */
|
||||
|
||||
nerr("RX CPU desc: %08x pbuf: %08x\n", desc, pbuf);
|
||||
ninfo("RX CPU desc: %08x pbuf: %08x\n", desc, pbuf);
|
||||
c5471->c_rxcpudesc = desc;
|
||||
putreg32((desc & 0x0000ffff), EIM_CPU_RXBA); /* 16-bit offset address */
|
||||
for (i = NUM_DESC_RX-1; i >= 0; i--)
|
||||
@ -2063,7 +2063,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471)
|
||||
pbuf += sizeof(uint32_t); /* Ether Module's "Buffer Usage Word" */
|
||||
}
|
||||
|
||||
nerr("END desc: %08x pbuf: %08x\n", desc, pbuf);
|
||||
ninfo("END desc: %08x pbuf: %08x\n", desc, pbuf);
|
||||
|
||||
/* Save the descriptor packet size */
|
||||
|
||||
@ -2150,13 +2150,13 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471)
|
||||
static void c5471_reset(struct c5471_driver_s *c5471)
|
||||
{
|
||||
#if defined(CONFIG_C5471_PHY_LU3X31T_T64)
|
||||
nerr("EIM reset\n");
|
||||
ninfo("EIM reset\n");
|
||||
c5471_eimreset(c5471);
|
||||
#endif
|
||||
nerr("PHY init\n");
|
||||
ninfo("PHY init\n");
|
||||
c5471_phyinit();
|
||||
|
||||
nerr("EIM config\n");
|
||||
ninfo("EIM config\n");
|
||||
c5471_eimconfig(c5471);
|
||||
}
|
||||
|
||||
@ -2178,7 +2178,7 @@ static void c5471_macassign(struct c5471_driver_s *c5471)
|
||||
uint8_t *mptr = dev->d_mac.ether_addr_octet;
|
||||
register uint32_t tmp;
|
||||
|
||||
nerr("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n",
|
||||
ninfo("MAC: %0x:%0x:%0x:%0x:%0x:%0x\n",
|
||||
mptr[0], mptr[1], mptr[2], mptr[3], mptr[4], mptr[5]);
|
||||
|
||||
/* Set CPU port MAC address. S/W will only see incoming packets that match
|
||||
@ -2241,7 +2241,7 @@ void up_netinitialize(void)
|
||||
{
|
||||
/* We could not attach the ISR to the ISR */
|
||||
|
||||
nllerr("irq_attach() failed\n");
|
||||
nllerr("ERROR: irq_attach() failed\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ static inline unsigned int wdt_prescaletoptv(unsigned int prescale)
|
||||
}
|
||||
}
|
||||
|
||||
err("prescale=%d -> ptv=%d\n", prescale, ptv);
|
||||
wdinfo("prescale=%d -> ptv=%d\n", prescale, ptv);
|
||||
return ptv;
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ static int wdt_setusec(uint32_t usec)
|
||||
uint32_t divisor = 1;
|
||||
uint32_t mode;
|
||||
|
||||
err("usec=%d\n", usec);
|
||||
wdinfo("usec=%d\n", usec);
|
||||
|
||||
/* Calculate a value of prescaler and divisor that will be able
|
||||
* to count to the usec. It may not be exact or the best
|
||||
@ -186,7 +186,7 @@ static int wdt_setusec(uint32_t usec)
|
||||
do
|
||||
{
|
||||
divisor = (CLOCK_MHZx2 * usec) / (prescaler * 2);
|
||||
err("divisor=0x%x prescaler=0x%x\n", divisor, prescaler);
|
||||
wdinfo("divisor=0x%x prescaler=0x%x\n", divisor, prescaler);
|
||||
|
||||
if (divisor >= 0x10000)
|
||||
{
|
||||
@ -194,7 +194,7 @@ static int wdt_setusec(uint32_t usec)
|
||||
{
|
||||
/* This is the max possible ~2.5 seconds. */
|
||||
|
||||
err("prescaler=0x%x too big!\n", prescaler);
|
||||
wderr("ERROR: prescaler=0x%x too big!\n", prescaler);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
@ -207,19 +207,19 @@ static int wdt_setusec(uint32_t usec)
|
||||
}
|
||||
while (divisor >= 0x10000);
|
||||
|
||||
err("prescaler=0x%x divisor=0x%x\n", prescaler, divisor);
|
||||
wdinfo("prescaler=0x%x divisor=0x%x\n", prescaler, divisor);
|
||||
|
||||
mode = wdt_prescaletoptv(prescaler);
|
||||
mode &= ~C5471_TIMER_AUTORELOAD; /* One shot mode. */
|
||||
mode |= divisor << 5;
|
||||
err("mode=0x%x\n", mode);
|
||||
wdinfo("mode=0x%x\n", mode);
|
||||
|
||||
c5471_wdt_cntl = mode;
|
||||
|
||||
/* Now start the watchdog */
|
||||
|
||||
c5471_wdt_cntl |= C5471_TIMER_STARTBIT;
|
||||
err("cntl_timer=0x%x\n", c5471_wdt_cntl);
|
||||
wdinfo("cntl_timer=0x%x\n", c5471_wdt_cntl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -234,17 +234,17 @@ static int wdt_setusec(uint32_t usec)
|
||||
|
||||
static int wdt_interrupt(int irq, void *context)
|
||||
{
|
||||
err("expired\n");
|
||||
wdllinfo("expired\n");
|
||||
|
||||
#if defined(CONFIG_SOFTWARE_REBOOT)
|
||||
# if defined(CONFIG_SOFTWARE_TEST)
|
||||
err(" Test only\n");
|
||||
wdllinfo(" Test only\n");
|
||||
# else
|
||||
err(" Re-booting\n");
|
||||
wdllinfo(" Re-booting\n");
|
||||
# warning "Add logic to reset CPU here"
|
||||
# endif
|
||||
#else
|
||||
err(" No reboot\n");
|
||||
wdllinfo(" No reboot\n");
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
@ -259,7 +259,7 @@ static ssize_t wdt_read(struct file *filep, char *buffer, size_t buflen)
|
||||
* not work if the user provides a buffer smaller than 18 bytes.
|
||||
*/
|
||||
|
||||
err("buflen=%d\n", buflen);
|
||||
wdinfo("buflen=%d\n", buflen);
|
||||
if (buflen >= 18)
|
||||
{
|
||||
sprintf(buffer, "%08x %08x\n", c5471_wdt_cntl, c5471_wdt_count);
|
||||
@ -274,7 +274,7 @@ static ssize_t wdt_read(struct file *filep, char *buffer, size_t buflen)
|
||||
|
||||
static ssize_t wdt_write(struct file *filep, const char *buffer, size_t buflen)
|
||||
{
|
||||
err("buflen=%d\n", buflen);
|
||||
wdinfo("buflen=%d\n", buflen);
|
||||
if (buflen)
|
||||
{
|
||||
/* Reset the timer to the maximum delay */
|
||||
@ -292,7 +292,7 @@ static ssize_t wdt_write(struct file *filep, const char *buffer, size_t buflen)
|
||||
|
||||
static int wdt_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
err("ioctl Call: cmd=0x%x arg=0x%x", cmd, arg);
|
||||
wdinfo("ioctl Call: cmd=0x%x arg=0x%x", cmd, arg);
|
||||
|
||||
/* Process the IOCTL command (see arch/watchdog.h) */
|
||||
|
||||
@ -315,8 +315,6 @@ static int wdt_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
static int wdt_open(struct file *filep)
|
||||
{
|
||||
err("");
|
||||
|
||||
if (g_wdtopen)
|
||||
{
|
||||
return -EBUSY;
|
||||
@ -339,11 +337,8 @@ static int wdt_open(struct file *filep)
|
||||
|
||||
static int wdt_close(struct file *filep)
|
||||
{
|
||||
err("");
|
||||
|
||||
/* The task controlling the watchdog has terminated. Take the timer
|
||||
* the
|
||||
* watchdog in interrupt mode -- we are going to reset unless the
|
||||
* the watchdog in interrupt mode -- we are going to reset unless the
|
||||
* reopened again soon.
|
||||
*/
|
||||
|
||||
@ -367,7 +362,7 @@ int up_wdtinit(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
err("C547x Watchdog Driver\n");
|
||||
wdinfo("C547x Watchdog Driver\n");
|
||||
|
||||
/* Register as /dev/wdt */
|
||||
|
||||
@ -379,7 +374,7 @@ int up_wdtinit(void)
|
||||
|
||||
/* Register for an interrupt level callback through wdt_interrupt */
|
||||
|
||||
err("Attach to IRQ=%d\n", C5471_IRQ_WATCHDOG);
|
||||
wdinfo("Attach to IRQ=%d\n", C5471_IRQ_WATCHDOG);
|
||||
|
||||
/* Make sure that the timer is stopped */
|
||||
|
||||
|
@ -216,8 +216,8 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din)
|
||||
tmp <<= (32-bitlen); /* align to MSB */
|
||||
}
|
||||
|
||||
err("spi_xfer(dev_idx=%u, bitlen=%u, data_out=0x%08x): ",
|
||||
dev_idx, bitlen, tmp);
|
||||
spiinfo("spi_xfer(dev_idx=%u, bitlen=%u, data_out=0x%08x): ",
|
||||
dev_idx, bitlen, tmp);
|
||||
|
||||
/* fill transmit registers */
|
||||
|
||||
@ -236,14 +236,14 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din)
|
||||
}
|
||||
|
||||
putreg16(reg_ctrl, SPI_REG(REG_CTRL));
|
||||
err("reg_ctrl=0x%04x ", reg_ctrl);
|
||||
spiinfo("reg_ctrl=0x%04x ", reg_ctrl);
|
||||
|
||||
/* wait until the transfer is complete */
|
||||
|
||||
while (1)
|
||||
{
|
||||
reg_status = getreg16(SPI_REG(REG_STATUS));
|
||||
err("status=0x%04x ", reg_status);
|
||||
spiinfo("status=0x%04x ", reg_status);
|
||||
if (din && (reg_status & SPI_STATUS_RE))
|
||||
{
|
||||
break;
|
||||
@ -262,7 +262,7 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din)
|
||||
{
|
||||
tmp = getreg16(SPI_REG(REG_RX_MSB)) << 16;
|
||||
tmp |= getreg16(SPI_REG(REG_RX_LSB));
|
||||
err("data_in=0x%08x ", tmp);
|
||||
spiinfo("data_in=0x%08x ", tmp);
|
||||
|
||||
if (bitlen <= 8)
|
||||
{
|
||||
@ -278,7 +278,7 @@ int spi_xfer(uint8_t dev_idx, uint8_t bitlen, const void *dout, void *din)
|
||||
}
|
||||
}
|
||||
|
||||
err("\n");
|
||||
spiinfo("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din)
|
||||
|
||||
/* FIXME uwire_init always selects CS0 for now */
|
||||
|
||||
err("uwire_xfer(dev_idx=%u, bitlen=%u\n", cs, bitlen);
|
||||
_info("uwire_xfer(dev_idx=%u, bitlen=%u\n", cs, bitlen);
|
||||
|
||||
/* select the chip */
|
||||
|
||||
@ -128,7 +128,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din)
|
||||
|
||||
tmp <<= 16 - bitlen; /* align to MSB */
|
||||
putreg16(tmp, UWIRE_REG(REG_DATA));
|
||||
err(", data_out=0x%04hx", tmp);
|
||||
_info(", data_out=0x%04hx", tmp);
|
||||
}
|
||||
|
||||
tmp = (dout ? UWIRE_CSR_BITS_WR(bitlen) : 0) |
|
||||
@ -142,7 +142,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din)
|
||||
_uwire_wait(UWIRE_CSR_RDRB, UWIRE_CSR_RDRB);
|
||||
|
||||
tmp = getreg16(UWIRE_REG(REG_DATA));
|
||||
err(", data_in=0x%08x", tmp);
|
||||
_info(", data_in=0x%08x", tmp);
|
||||
|
||||
if (bitlen <= 8)
|
||||
*(uint8_t *)din = tmp & 0xff;
|
||||
@ -155,7 +155,7 @@ int uwire_xfer(int cs, int bitlen, const void *dout, void *din)
|
||||
putreg16(UWIRE_CSR_IDX(0) | 0, UWIRE_REG(REG_CSR));
|
||||
_uwire_wait(UWIRE_CSR_CSRB, 0);
|
||||
|
||||
err(")\n");
|
||||
_info(")\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -52,6 +52,14 @@
|
||||
#include "group/group.h"
|
||||
#include "up_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_DEBUG_SCHED_INFO
|
||||
# undef CONFIG_DUMP_ON_EXIT
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
@ -66,7 +74,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DUMP_ON_EXIT
|
||||
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
{
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0
|
||||
@ -77,8 +85,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
int i;
|
||||
#endif
|
||||
|
||||
serr(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid);
|
||||
serr(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
|
||||
sinfo(" TCB=%p name=%s pid=%d\n", tcb, tcb->argv[0], tcb->pid);
|
||||
sinfo(" priority=%d state=%d\n", tcb->sched_priority, tcb->task_state);
|
||||
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0
|
||||
filelist = tcb->group->tg_filelist;
|
||||
@ -87,8 +95,8 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
struct inode *inode = filelist->fl_files[i].f_inode;
|
||||
if (inode)
|
||||
{
|
||||
serr(" fd=%d refcount=%d\n",
|
||||
i, inode->i_crefs);
|
||||
sinfo(" fd=%d refcount=%d\n",
|
||||
i, inode->i_crefssinfo);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -101,11 +109,11 @@ static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
if (filep->fs_fd >= 0)
|
||||
{
|
||||
#if CONFIG_STDIO_BUFFER_SIZE > 0
|
||||
serr(" fd=%d nbytes=%d\n",
|
||||
filep->fs_fd,
|
||||
filep->fs_bufpos - filep->fs_bufstart);
|
||||
sinfo(" fd=%d nbytes=%d\n",
|
||||
filep->fs_fd,
|
||||
filep->fs_bufpos - filep->fs_bufstart);
|
||||
#else
|
||||
serr(" fd=%d\n", filep->fs_fd);
|
||||
sinfo(" fd=%d\n", filep->fs_fd);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@ -138,10 +146,10 @@ void _exit(int status)
|
||||
|
||||
(void)up_irq_save();
|
||||
|
||||
sllerr("TCB=%p exiting\n", this_task());
|
||||
sllinfo("TCB=%p exiting\n", this_task());
|
||||
|
||||
#if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG_FEATURES)
|
||||
sllerr("Other tasks:\n");
|
||||
#ifdef CONFIG_DUMP_ON_EXIT
|
||||
sllinfo("Other tasks:\n");
|
||||
sched_foreach(_up_dumponexit, NULL);
|
||||
#endif
|
||||
|
||||
|
@ -77,13 +77,13 @@ static void up_calibratedelay(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
llerr("Beginning 100s delay\n");
|
||||
_llwarn("Beginning 100s delay\n");
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
up_mdelay(1000);
|
||||
}
|
||||
|
||||
llerr("End 100s delay\n");
|
||||
_llwarn("End 100s delay\n");
|
||||
}
|
||||
#else
|
||||
# define up_calibratedelay()
|
||||
|
@ -63,6 +63,10 @@
|
||||
#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
|
||||
#undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */
|
||||
|
||||
#ifndef CONFIG_DEBUG_SCHED_INFO
|
||||
# undef CONFIG_DUMP_ON_EXIT /* Needs CONFIG_DEBUG_SCHED_INFO */
|
||||
#endif
|
||||
|
||||
/* Determine which (if any) console driver to use. If a console is enabled
|
||||
* and no other console device is specified, then a serial console is
|
||||
* assumed.
|
||||
|
@ -928,7 +928,7 @@ static void dm320_hwinitialize(void)
|
||||
/* Set up the rectangular cursor with defaults */
|
||||
|
||||
#ifdef CONFIG_FB_HWCURSOR
|
||||
gerr("Initialize rectangular cursor\n");
|
||||
lcdinfo("Initialize rectangular cursor\n");
|
||||
|
||||
putreg16(0, DM320_OSD_CURXP);
|
||||
putreg16(0, DM320_OSD_CURYP);
|
||||
@ -1385,7 +1385,7 @@ int up_fbinitialize(int display)
|
||||
ret = dm320_allocvideomemory();
|
||||
if (ret != 0)
|
||||
{
|
||||
gerr("Failed to allocate video buffers\n");
|
||||
lcderr("ERROR: Failed to allocate video buffers\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ struct dm320_epinfo_s
|
||||
|
||||
/* Register operations */
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static uint32_t dm320_getreg8(uint32_t addr);
|
||||
static uint32_t dm320_getreg16(uint32_t addr);
|
||||
static uint32_t dm320_getreg32(uint32_t addr);
|
||||
@ -422,7 +422,7 @@ static const struct dm320_epinfo_s g_epinfo[DM320_NENDPOINTS] =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static uint8_t dm320_getreg8(uint32_t addr)
|
||||
{
|
||||
static uint32_t prevaddr = 0;
|
||||
@ -443,7 +443,7 @@ static uint8_t dm320_getreg8(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
ullinfo("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@ -460,7 +460,7 @@ static uint8_t dm320_getreg8(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
llerr("[repeats %d more times]\n", count-3);
|
||||
ullinfo("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@ -472,7 +472,7 @@ static uint8_t dm320_getreg8(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
llerr("%08x->%02x\n", addr, val);
|
||||
ullinfo("%08x->%02x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@ -485,7 +485,7 @@ static uint8_t dm320_getreg8(uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static uint32_t dm320_getreg16(uint32_t addr)
|
||||
{
|
||||
static uint32_t prevaddr = 0;
|
||||
@ -506,7 +506,7 @@ static uint32_t dm320_getreg16(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
ullinfo("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@ -523,7 +523,7 @@ static uint32_t dm320_getreg16(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
llerr("[repeats %d more times]\n", count-3);
|
||||
ullinfo("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@ -535,7 +535,7 @@ static uint32_t dm320_getreg16(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
llerr("%08x->%04x\n", addr, val);
|
||||
ullinfo("%08x->%04x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@ -548,7 +548,7 @@ static uint32_t dm320_getreg16(uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static uint32_t dm320_getreg32(uint32_t addr)
|
||||
{
|
||||
static uint32_t prevaddr = 0;
|
||||
@ -569,7 +569,7 @@ static uint32_t dm320_getreg32(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
ullinfo("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@ -586,7 +586,7 @@ static uint32_t dm320_getreg32(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
llerr("[repeats %d more times]\n", count-3);
|
||||
ullinfo("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@ -598,7 +598,7 @@ static uint32_t dm320_getreg32(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
llerr("%08x->%08x\n", addr, val);
|
||||
ullinfo("%08x->%08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@ -611,12 +611,12 @@ static uint32_t dm320_getreg32(uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static void dm320_putreg8(uint8_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%02x\n", addr, val);
|
||||
ullinfo("%08x<-%02x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@ -632,12 +632,12 @@ static void dm320_putreg8(uint8_t val, uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static void dm320_putreg16(uint16_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%04x\n", addr, val);
|
||||
ullinfo("%08x<-%04x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@ -653,12 +653,12 @@ static void dm320_putreg16(uint16_t val, uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_DM320_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_DM320_USBDEV_REGDEBUG
|
||||
static void dm320_putreg32(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%08x\n", addr, val);
|
||||
ullinfo("%08x<-%08x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@ -2415,9 +2415,9 @@ void up_usbinitialize(void)
|
||||
memset(priv, 0, sizeof(struct dm320_usbdev_s));
|
||||
priv->usbdev.ops = &g_devops;
|
||||
|
||||
#ifdef CONFIG_DEBUG_USB
|
||||
#ifdef CONFIG_DEBUG_USB_INFO
|
||||
chiprev = dm320_getreg16(DM320_BUSC_REVR);
|
||||
ullerr("DM320 revision : %d.%d\n", chiprev >> 4, chiprev & 0x0f);
|
||||
ullinfo("DM320 revision : %d.%d\n", chiprev >> 4, chiprev & 0x0f);
|
||||
#endif
|
||||
|
||||
/* 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);
|
||||
if ((adcsr & ADC_SR_AWD) != 0)
|
||||
{
|
||||
allerr("WARNING: Analog Watchdog, Value converted out of range!\n");
|
||||
allwarn("WARNING: Analog Watchdog, Value converted out of range!\n");
|
||||
}
|
||||
|
||||
/* EOC: End of conversion */
|
||||
@ -1298,7 +1298,7 @@ struct adc_dev_s *efm32_adcinitialize(int intf, const uint8_t *chanlist, int nch
|
||||
else
|
||||
#endif
|
||||
{
|
||||
aerr("No ADC interface defined\n");
|
||||
aerr("ERROR: No ADC interface defined\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -745,7 +745,7 @@ void efm32_dmastop(DMA_HANDLE handle)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_DMA
|
||||
#ifdef CONFIG_DEBUG_DMA_INFO
|
||||
void efm32_dmasample(DMA_HANDLE handle, struct efm32_dmaregs_s *regs)
|
||||
{
|
||||
struct dma_channel_s *dmach = (struct dma_channel_s *)handle;
|
||||
@ -798,35 +798,35 @@ void efm32_dmasample(DMA_HANDLE handle, struct efm32_dmaregs_s *regs)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_DMA
|
||||
#ifdef CONFIG_DEBUG_DMA_INFO
|
||||
void efm32_dmadump(DMA_HANDLE handle, const struct efm32_dmaregs_s *regs,
|
||||
const char *msg)
|
||||
{
|
||||
struct dma_channel_s *dmach = (struct dma_channel_s *)handle;
|
||||
|
||||
dmaerr("%s\n", msg);
|
||||
dmaerr(" DMA Registers:\n");
|
||||
dmaerr(" STATUS: %08x\n", regs->status);
|
||||
dmaerr(" CTRLBASE: %08x\n", regs->ctrlbase);
|
||||
dmaerr(" ALTCTRLBASE: %08x\n", regs->altctrlbase);
|
||||
dmaerr(" CHWAITSTATUS: %08x\n", regs->chwaitstatus);
|
||||
dmaerr(" CHUSEBURSTS: %08x\n", regs->chusebursts);
|
||||
dmaerr(" CHREQMASKS: %08x\n", regs->chreqmasks);
|
||||
dmaerr(" CHENS: %08x\n", regs->chens);
|
||||
dmaerr(" CHALTS: %08x\n", regs->chalts);
|
||||
dmaerr(" CHPRIS: %08x\n", regs->chpris);
|
||||
dmaerr(" ERRORC: %08x\n", regs->errorc);
|
||||
dmaerr(" CHREQSTATUS: %08x\n", regs->chreqstatus);
|
||||
dmaerr(" CHSREQSTATUS: %08x\n", regs->chsreqstatus);
|
||||
dmaerr(" IEN: %08x\n", regs->ien);
|
||||
dmainfo("%s\n", msg);
|
||||
dmainfo(" DMA Registers:\n");
|
||||
dmainfo(" STATUS: %08x\n", regs->status);
|
||||
dmainfo(" CTRLBASE: %08x\n", regs->ctrlbase);
|
||||
dmainfo(" ALTCTRLBASE: %08x\n", regs->altctrlbase);
|
||||
dmainfo(" CHWAITSTATUS: %08x\n", regs->chwaitstatus);
|
||||
dmainfo(" CHUSEBURSTS: %08x\n", regs->chusebursts);
|
||||
dmainfo(" CHREQMASKS: %08x\n", regs->chreqmasks);
|
||||
dmainfo(" CHENS: %08x\n", regs->chens);
|
||||
dmainfo(" CHALTS: %08x\n", regs->chalts);
|
||||
dmainfo(" CHPRIS: %08x\n", regs->chpris);
|
||||
dmainfo(" ERRORC: %08x\n", regs->errorc);
|
||||
dmainfo(" CHREQSTATUS: %08x\n", regs->chreqstatus);
|
||||
dmainfo(" CHSREQSTATUS: %08x\n", regs->chsreqstatus);
|
||||
dmainfo(" IEN: %08x\n", regs->ien);
|
||||
#if defined(CONFIG_EFM32_EFM32GG)
|
||||
dmaerr(" CTRL: %08x\n", regs->ctrl);
|
||||
dmaerr(" RDS: %08x\n", regs->rds);
|
||||
dmaerr(" LOOP0: %08x\n", regs->loop0);
|
||||
dmaerr(" LOOP1: %08x\n", regs->loop1);
|
||||
dmaerr(" RECT0: %08x\n", regs->rect0);
|
||||
dmainfo(" CTRL: %08x\n", regs->ctrl);
|
||||
dmainfo(" RDS: %08x\n", regs->rds);
|
||||
dmainfo(" LOOP0: %08x\n", regs->loop0);
|
||||
dmainfo(" LOOP1: %08x\n", regs->loop1);
|
||||
dmainfo(" RECT0: %08x\n", regs->rect0);
|
||||
#endif
|
||||
dmaerr(" DMA Channel %d Registers:\n", dmach->chan);
|
||||
dmaerr(" CHCTRL: %08x\n", regs->chnctrl);
|
||||
dmainfo(" DMA Channel %d Registers:\n", dmach->chan);
|
||||
dmainfo(" CHCTRL: %08x\n", regs->chnctrl);
|
||||
}
|
||||
#endif
|
||||
|
@ -109,7 +109,7 @@ typedef FAR void *DMA_HANDLE;
|
||||
|
||||
typedef void (*dma_callback_t)(DMA_HANDLE handle, uint8_t status, void *arg);
|
||||
|
||||
#ifdef CONFIG_DEBUG_DMA
|
||||
#ifdef CONFIG_DEBUG_DMA_INFO
|
||||
struct efm32_dmaregs_s
|
||||
{
|
||||
uint32_t status; /* DMA Status Register */
|
||||
@ -282,7 +282,7 @@ void efm32_dmastop(DMA_HANDLE handle);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_DMA
|
||||
#ifdef CONFIG_DEBUG_DMA_INFO
|
||||
void efm32_dmasample(DMA_HANDLE handle, struct efm32_dmaregs_s *regs);
|
||||
#else
|
||||
# define efm32_dmasample(handle,regs)
|
||||
@ -299,7 +299,7 @@ void efm32_dmasample(DMA_HANDLE handle, struct efm32_dmaregs_s *regs);
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_DMA
|
||||
#ifdef CONFIG_DEBUG_DMA_INFO
|
||||
void efm32_dmadump(DMA_HANDLE handle, const struct efm32_dmaregs_s *regs,
|
||||
const char *msg);
|
||||
#else
|
||||
|
@ -751,7 +751,7 @@ static void efm32_i2c_tracenew(FAR struct efm32_i2c_priv_s *priv)
|
||||
|
||||
if (priv->tndx >= (CONFIG_I2C_NTRACE - 1))
|
||||
{
|
||||
i2cerr("Trace table overflow\n");
|
||||
i2cerr("ERROR: Trace table overflow\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1526,9 +1526,9 @@ static int efm32_i2c_transfer(FAR struct i2c_master_s *dev,
|
||||
{
|
||||
ret = -ETIMEDOUT;
|
||||
|
||||
i2cerr("Timed out: I2Cx_STATE: 0x%04x I2Cx_STATUS: 0x%08x\n",
|
||||
efm32_i2c_getreg(priv, EFM32_I2C_STATE_OFFSET),
|
||||
efm32_i2c_getreg(priv, EFM32_I2C_STATUS_OFFSET));
|
||||
i2cerr("ERROR: Timed out: I2Cx_STATE: 0x%04x I2Cx_STATUS: 0x%08x\n",
|
||||
efm32_i2c_getreg(priv, EFM32_I2C_STATE_OFFSET),
|
||||
efm32_i2c_getreg(priv, EFM32_I2C_STATUS_OFFSET));
|
||||
|
||||
/* Abort */
|
||||
|
||||
|
@ -110,7 +110,7 @@ static void up_idlepm(void)
|
||||
|
||||
/* Perform board-specific, state-dependent logic here */
|
||||
|
||||
llinfo("newstate= %d oldstate=%d\n", newstate, oldstate);
|
||||
_llinfo("newstate= %d oldstate=%d\n", newstate, oldstate);
|
||||
|
||||
/* Then force the global state change */
|
||||
|
||||
|
@ -157,7 +157,7 @@ static void efm32_dumpnvic(const char *msg, int irq)
|
||||
|
||||
/****************************************************************************
|
||||
* Name: efm32_nmi, efm32_busfault, efm32_usagefault, efm32_pendsv,
|
||||
* efm32_errmonitor, efm32_pendsv, efm32_reserved
|
||||
* efm32_dbgmonitor, efm32_pendsv, efm32_reserved
|
||||
*
|
||||
* Description:
|
||||
* Handlers for various exceptions. None are handled and all are fatal
|
||||
@ -170,7 +170,7 @@ static void efm32_dumpnvic(const char *msg, int irq)
|
||||
static int efm32_nmi(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! NMI received\n");
|
||||
_err("PANIC!!! NMI received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -178,7 +178,7 @@ static int efm32_nmi(int irq, FAR void *context)
|
||||
static int efm32_busfault(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||
_err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -186,7 +186,7 @@ static int efm32_busfault(int irq, FAR void *context)
|
||||
static int efm32_usagefault(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||
_err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -194,15 +194,15 @@ static int efm32_usagefault(int irq, FAR void *context)
|
||||
static int efm32_pendsv(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! PendSV received\n");
|
||||
_err("PANIC!!! PendSV received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int efm32_errmonitor(int irq, FAR void *context)
|
||||
static int efm32_dbgmonitor(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Debug Monitor received\n");
|
||||
_err("PANIC!!! Debug Monitor received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -210,7 +210,7 @@ static int efm32_errmonitor(int irq, FAR void *context)
|
||||
static int efm32_reserved(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Reserved interrupt\n");
|
||||
_err("PANIC!!! Reserved interrupt\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -458,7 +458,7 @@ void up_irqinitialize(void)
|
||||
irq_attach(EFM32_IRQ_BUSFAULT, efm32_busfault);
|
||||
irq_attach(EFM32_IRQ_USAGEFAULT, efm32_usagefault);
|
||||
irq_attach(EFM32_IRQ_PENDSV, efm32_pendsv);
|
||||
irq_attach(EFM32_IRQ_DBGMONITOR, efm32_errmonitor);
|
||||
irq_attach(EFM32_IRQ_DBGMONITOR, efm32_dbgmonitor);
|
||||
irq_attach(EFM32_IRQ_RESERVED, efm32_reserved);
|
||||
#endif
|
||||
|
||||
|
@ -518,7 +518,7 @@ static int efm32_interrupt(struct uart_dev_s *dev)
|
||||
* FERR - Framing Error Interrupt Enable
|
||||
*/
|
||||
|
||||
llerr("RX ERROR: %08x\n", intflags);
|
||||
_llerr("RX ERROR: %08x\n", intflags);
|
||||
}
|
||||
|
||||
/* Check for transmit errors */
|
||||
@ -527,7 +527,7 @@ static int efm32_interrupt(struct uart_dev_s *dev)
|
||||
{
|
||||
/* TXOF - TX Overflow Interrupt Enable */
|
||||
|
||||
llerr("RX ERROR: %08x\n", intflags);
|
||||
_llerr("RX ERROR: %08x\n", intflags);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -395,7 +395,7 @@ static int pwm_timer(FAR struct efm32_pwmtimer_s *priv,
|
||||
|
||||
if (efm32_timer_set_freq(priv->base, priv->pclk, info->frequency) < 0)
|
||||
{
|
||||
pwmerr("Cannot set TIMER frequency %dHz from clock %dHz\n",
|
||||
pwmerr("ERROR: Cannot set TIMER frequency %dHz from clock %dHz\n",
|
||||
info->frequency, priv->pclk);
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -914,7 +914,7 @@ FAR struct pwm_lowerhalf_s *efm32_pwminitialize(int timer)
|
||||
#endif
|
||||
|
||||
default:
|
||||
pwmerr("No such timer configured\n");
|
||||
pwmerr("ERROR: No such timer configured\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
||||
* Private Types
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EFM32_RMU_DEBUG
|
||||
#if defined(CONFIG_EFM32_RMU_DEBUG) && defined(CONFIG_DEBUG_WARN)
|
||||
typedef struct
|
||||
{
|
||||
const uint32_t val;
|
||||
@ -76,7 +76,7 @@ typedef struct
|
||||
* Private Data
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EFM32_RMU_DEBUG
|
||||
#if defined(CONFIG_EFM32_RMU_DEBUG) && defined(CONFIG_DEBUG_WARN)
|
||||
static efm32_reset_cause_list_t efm32_reset_cause_list[] =
|
||||
{
|
||||
{
|
||||
@ -191,7 +191,7 @@ uint32_t g_efm32_rstcause;
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_EFM32_RMU_DEBUG
|
||||
#if defined(CONFIG_EFM32_RMU_DEBUG) && defined(CONFIG_DEBUG_WARN)
|
||||
const char *efm32_reset_cause_list_str(uint32_t reg, unsigned int *idx)
|
||||
{
|
||||
int len = sizeof(efm32_reset_cause_list)/sizeof(efm32_reset_cause_list[0]);
|
||||
@ -261,8 +261,8 @@ void efm32_rmu_initialize(void)
|
||||
putreg32(EMU_LOCK_LOCKKEY_LOCK, EMU_LOCK_LOCKKEY_LOCK);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_EFM32_RMU_DEBUG
|
||||
rmuerr("RMU => reg = 0x%08X\n", g_efm32_rstcause);
|
||||
#if defined(CONFIG_EFM32_RMU_DEBUG) && defined(CONFIG_DEBUG_WARN)
|
||||
rmuwarn("RMU => reg = 0x%08X\n", g_efm32_rstcause);
|
||||
for (; ; )
|
||||
{
|
||||
const char *str;
|
||||
@ -273,7 +273,7 @@ void efm32_rmu_initialize(void)
|
||||
break;
|
||||
}
|
||||
|
||||
rmuerr("RMU => %s\n", str);
|
||||
rmuwarn("RMU => %s\n", str);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -50,20 +50,17 @@
|
||||
****************************************************************************/
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
#ifndef CONFIG_DEBUG_FEATURES
|
||||
# undef CONFIG_DEBUG_INFO
|
||||
#ifndef CONFIG_DEBUG_ERROR
|
||||
# undef CONFIG_EFM32_RMU_DEBUG
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_EFM32_RMU_DEBUG
|
||||
# define rmuerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define rmuinfo llerr
|
||||
# else
|
||||
# define rmuinfo(x...)
|
||||
# endif
|
||||
# define rmuerr _llerr
|
||||
# define rmuwarn _llwarn
|
||||
# define rmuinfo _llinfo
|
||||
#else
|
||||
# define rmuerr(x...)
|
||||
# define rmuwarn(x...)
|
||||
# define rmuinfo(x...)
|
||||
#endif
|
||||
|
||||
|
@ -130,16 +130,6 @@
|
||||
#define __CNT_CARRY_REG EFM32_BURTC_RET_REG(0)
|
||||
#define __CNT_ZERO_REG EFM32_BURTC_RET_REG(1)
|
||||
|
||||
#if defined CONFIG_DEBUG_FEATURES && defined CONFIG_RTC_DEBUG
|
||||
# define burtcerr llerr
|
||||
#else
|
||||
# define burtcerr(x...)
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Private Types
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Private Data
|
||||
************************************************************************************/
|
||||
@ -191,7 +181,7 @@ static int efm32_rtc_burtc_interrupt(int irq, void *context)
|
||||
|
||||
if (source & BURTC_IF_LFXOFAIL)
|
||||
{
|
||||
burtcerr("BURTC_IF_LFXOFAIL");
|
||||
rtcerr("ERROR: BURTC_IF_LFXOFAIL");
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RTC_HIRES
|
||||
@ -245,7 +235,7 @@ static void efm32_rtc_burtc_init(void)
|
||||
regval = g_efm32_rstcause;
|
||||
regval2 = getreg32(EFM32_BURTC_CTRL);
|
||||
|
||||
burtcerr("BURTC RESETCAUSE=0x%08X BURTC_CTRL=0x%08X\n", regval, regval2);
|
||||
rtcinfo("BURTC RESETCAUSE=0x%08X BURTC_CTRL=0x%08X\n", regval, regval2);
|
||||
|
||||
if (!(regval2 & BURTC_CTRL_RSTEN) &&
|
||||
!(regval & RMU_RSTCAUSE_BUBODREG) &&
|
||||
@ -262,11 +252,11 @@ static void efm32_rtc_burtc_init(void)
|
||||
|
||||
/* restore saved base time */
|
||||
|
||||
burtcerr("BURTC OK\n");
|
||||
rtcinfo("BURTC OK\n");
|
||||
return;
|
||||
}
|
||||
|
||||
burtcerr("BURTC RESETED\n");
|
||||
rtcinfo("BURTC RESET\n");
|
||||
|
||||
/* Disable reset of BackupDomain */
|
||||
|
||||
@ -358,7 +348,7 @@ static uint64_t efm32_get_burtc_tick(void)
|
||||
|
||||
val = (uint64_t)cnt_carry*__CNT_TOP + cnt + cnt_zero;
|
||||
|
||||
burtcerr("Get Tick carry %u zero %u reg %u\n", cnt_carry, cnt_carry,cnt);
|
||||
rtcinfo("Get Tick carry %u zero %u reg %u\n", cnt_carry, cnt_carry,cnt);
|
||||
|
||||
return val;
|
||||
}
|
||||
@ -449,7 +439,7 @@ int up_rtc_gettime(FAR struct timespec *tp)
|
||||
tp->tv_sec = val / CONFIG_RTC_FREQUENCY;
|
||||
tp->tv_nsec = (val % CONFIG_RTC_FREQUENCY)*(NSEC_PER_SEC/CONFIG_RTC_FREQUENCY);
|
||||
|
||||
burtcerr("Get RTC %u.%09u\n", tp->tv_sec, tp->tv_nsec);
|
||||
rtcinfo("Get RTC %u.%09u\n", tp->tv_sec, tp->tv_nsec);
|
||||
|
||||
return OK;
|
||||
}
|
||||
@ -499,7 +489,7 @@ int up_rtc_settime(FAR const struct timespec *tp)
|
||||
cnt_carry = val / __CNT_TOP;
|
||||
cnt = val % __CNT_TOP;
|
||||
|
||||
burtcerr("Set RTC %u.%09u carry %u zero %u reg %u\n",
|
||||
rtcinfo("Set RTC %u.%09u carry %u zero %u reg %u\n",
|
||||
tp->tv_sec, tp->tv_nsec, cnt_carry, cnt, cnt_reg);
|
||||
|
||||
putreg32(cnt_carry, __CNT_CARRY_REG);
|
||||
|
@ -780,7 +780,7 @@ static int efm32_rxinterrupt(struct uart_dev_s *dev)
|
||||
* FERR - Framing Error Interrupt Enable
|
||||
*/
|
||||
|
||||
llerr("RX ERROR: %08x\n", intflags);
|
||||
_llerr("RX ERROR: %08x\n", intflags);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -863,7 +863,7 @@ static int efm32_txinterrupt(struct uart_dev_s *dev)
|
||||
{
|
||||
/* TXOF - TX Overflow Interrupt Enable */
|
||||
|
||||
llerr("RX ERROR: %08x\n", intflags);
|
||||
_llerr("RX ERROR: %08x\n", intflags);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -55,50 +55,18 @@
|
||||
#include "efm32_config.h"
|
||||
#include "efm32_gpio.h"
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Debug ********************************************************************/
|
||||
/* Non-standard debug that may be enabled just for testing TIMER */
|
||||
|
||||
#ifndef CONFIG_DEBUG_FEATURES
|
||||
# undef CONFIG_DEBUG_TIMER
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_TIMER
|
||||
# define efm32_timererr err
|
||||
# define efm32_timerllerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define efm32_timerinfo info
|
||||
# define efm32_timerllinfo llinfo
|
||||
# define efm32_timer_dumpgpio(p,m) efm32_dumpgpio(p,m)
|
||||
# else
|
||||
# define efm32_timerllerr(x...)
|
||||
# define efm32_timerllinfo(x...)
|
||||
# define efm32_timer_dumpgpio(p,m)
|
||||
# endif
|
||||
#ifdef CONFIG_DEBUG_TIMER_INFO
|
||||
# define efm32_timer_dumpgpio(p,m) efm32_dumpgpio(p,m)
|
||||
#else
|
||||
# define efm32_timererr(x...)
|
||||
# define efm32_timerllerr(x...)
|
||||
# define efm32_timerinfo(x...)
|
||||
# define efm32_timerllinfo(x...)
|
||||
# define efm32_timer_dumpgpio(p,m)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Static Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
@ -119,48 +87,43 @@
|
||||
|
||||
void efm32_timer_dumpregs(uintptr_t base, FAR const char *msg)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_TIMER_INFO
|
||||
int i;
|
||||
|
||||
efm32_timerinfo("%s:\n", msg);
|
||||
efm32_timerinfo(" CTRL: %04x STATUS: %04x IEN: %04x IF: %04x\n",
|
||||
getreg32(base + EFM32_TIMER_CTRL_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_STATUS_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_IEN_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_IF_OFFSET )
|
||||
);
|
||||
efm32_timerinfo(" TOP: %04x TOPB: %04x CNT: %04x ROUTE: %04x\n",
|
||||
getreg32(base + EFM32_TIMER_TOP_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_TOPB_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_CNT_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_ROUTE_OFFSET )
|
||||
);
|
||||
tmrinfo("%s:\n", msg);
|
||||
tmrinfo(" CTRL: %04x STATUS: %04x IEN: %04x IF: %04x\n",
|
||||
getreg32(base + EFM32_TIMER_CTRL_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_STATUS_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_IEN_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_IF_OFFSET ));
|
||||
tmrinfo(" TOP: %04x TOPB: %04x CNT: %04x ROUTE: %04x\n",
|
||||
getreg32(base + EFM32_TIMER_TOP_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_TOPB_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_CNT_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_ROUTE_OFFSET ));
|
||||
|
||||
for (i = 0; i < EFM32_TIMER_NCC; i++)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG_TIMER) && defined(CONFIG_DEBUG_INFO)
|
||||
uintptr_t base_cc = base + EFM32_TIMER_CC_OFFSET(i);
|
||||
#endif
|
||||
efm32_timerinfo("CC%d => CTRL: %04x CCV: %04x CCVP: %04x CCVB: %04x\n",
|
||||
i
|
||||
getreg32(base_cc + EFM32_TIMER_CC_CTRL_OFFSET ),
|
||||
getreg32(base_cc + EFM32_TIMER_CC_CCV_OFFSET ),
|
||||
getreg32(base_cc + EFM32_TIMER_CC_CCVP_OFFSET ),
|
||||
getreg32(base_cc + EFM32_TIMER_CC_CCVB_OFFSET )
|
||||
);
|
||||
|
||||
tmrinfo("CC%d => CTRL: %04x CCV: %04x CCVP: %04x CCVB: %04x\n",
|
||||
i
|
||||
getreg32(base_cc + EFM32_TIMER_CC_CTRL_OFFSET ),
|
||||
getreg32(base_cc + EFM32_TIMER_CC_CCV_OFFSET ),
|
||||
getreg32(base_cc + EFM32_TIMER_CC_CCVP_OFFSET ),
|
||||
getreg32(base_cc + EFM32_TIMER_CC_CCVB_OFFSET ));
|
||||
}
|
||||
|
||||
efm32_timerinfo("DTCTRL: %04x DTTIME: %04x DTFC: %04x DTOGEN: %04x\n",
|
||||
getreg32(base + EFM32_TIMER_CTRL_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_STATUS_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_IEN_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_IF_OFFSET )
|
||||
);
|
||||
efm32_timerinfo("DTFAULT: %04x DTFAULTC: %04x DTLOCK: %04x \n",
|
||||
getreg32(base + EFM32_TIMER_CTRL_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_STATUS_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_IEN_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_IF_OFFSET )
|
||||
);
|
||||
tmrinfo("DTCTRL: %04x DTTIME: %04x DTFC: %04x DTOGEN: %04x\n",
|
||||
getreg32(base + EFM32_TIMER_CTRL_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_STATUS_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_IEN_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_IF_OFFSET ));
|
||||
tmrinfo("DTFAULT: %04x DTFAULTC: %04x DTLOCK: %04x \n",
|
||||
getreg32(base + EFM32_TIMER_CTRL_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_STATUS_OFFSET ),
|
||||
getreg32(base + EFM32_TIMER_IEN_OFFSET ),
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -238,6 +201,7 @@ void efm32_timer_reset(uintptr_t base)
|
||||
* prescaler setted, -1 in case of error.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int efm32_timer_set_freq(uintptr_t base, uint32_t clk_freq, uint32_t freq)
|
||||
{
|
||||
int prescaler = 0;
|
||||
@ -262,8 +226,7 @@ int efm32_timer_set_freq(uintptr_t base, uint32_t clk_freq, uint32_t freq)
|
||||
|
||||
reload = (clk_freq / prescaler / freq);
|
||||
|
||||
efm32_timererr("Source: %4xHz Div: %4x Reload: %4x \n",
|
||||
clk_freq, prescaler, reload);
|
||||
tmrinfo("Source: %4xHz Div: %4x Reload: %4x \n", clk_freq, prescaler, reload);
|
||||
|
||||
putreg32(reload, base + EFM32_TIMER_TOP_OFFSET);
|
||||
|
||||
|
@ -114,6 +114,10 @@
|
||||
# error "FIFO allocations exceed FIFO memory size"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DEBUG_USB_INFO
|
||||
# undef CONFIG_EFM32_USBDEV_REGDEBUG
|
||||
#endif
|
||||
|
||||
/* The actual FIFO addresses that we use must be aligned to 4-byte boundaries;
|
||||
* FIFO sizes must be provided in units of 32-bit words.
|
||||
*/
|
||||
@ -474,7 +478,7 @@ struct efm32_usbdev_s
|
||||
|
||||
/* Register operations ********************************************************/
|
||||
|
||||
#if defined(CONFIG_EFM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_EFM32_USBDEV_REGDEBUG
|
||||
static uint32_t efm32_getreg(uint32_t addr);
|
||||
static void efm32_putreg(uint32_t val, uint32_t addr);
|
||||
#else
|
||||
@ -794,7 +798,7 @@ const struct trace_msg_t g_usb_trace_strings_intdecode[] =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_EFM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_EFM32_USBDEV_REGDEBUG
|
||||
static uint32_t efm32_getreg(uint32_t addr)
|
||||
{
|
||||
static uint32_t prevaddr = 0;
|
||||
@ -815,7 +819,7 @@ static uint32_t efm32_getreg(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
ullinfo("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@ -832,7 +836,7 @@ static uint32_t efm32_getreg(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
llerr("[repeats %d more times]\n", count-3);
|
||||
ullinfo("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@ -844,7 +848,7 @@ static uint32_t efm32_getreg(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
llerr("%08x->%08x\n", addr, val);
|
||||
ullinfo("%08x->%08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@ -857,12 +861,12 @@ static uint32_t efm32_getreg(uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_EFM32_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_EFM32_USBDEV_REGDEBUG
|
||||
static void efm32_putreg(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%08x\n", addr, val);
|
||||
ullinfo("%08x<-%08x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@ -2629,7 +2633,7 @@ static inline void efm32_epout_interrupt(FAR struct efm32_usbdev_s *priv)
|
||||
if ((daint & 1) != 0)
|
||||
{
|
||||
regval = efm32_getreg(EFM32_USB_DOEPINT(epno));
|
||||
ullerr("DOEPINT(%d) = %08x\n", epno, regval);
|
||||
ullinfo("DOEPINT(%d) = %08x\n", epno, regval);
|
||||
efm32_putreg(0xFF, EFM32_USB_DOEPINT(epno));
|
||||
}
|
||||
|
||||
@ -2859,8 +2863,8 @@ static inline void efm32_epin_interrupt(FAR struct efm32_usbdev_s *priv)
|
||||
{
|
||||
if ((daint & 1) != 0)
|
||||
{
|
||||
ullerr("DIEPINT(%d) = %08x\n",
|
||||
epno, efm32_getreg(EFM32_USB_DIEPINT(epno)));
|
||||
ullinfo("DIEPINT(%d) = %08x\n",
|
||||
epno, efm32_getreg(EFM32_USB_DIEPINT(epno)));
|
||||
efm32_putreg(0xFF, EFM32_USB_DIEPINT(epno));
|
||||
}
|
||||
|
||||
@ -3799,7 +3803,7 @@ static int efm32_epout_configure(FAR struct efm32_ep_s *privep, uint8_t eptype,
|
||||
break;
|
||||
|
||||
default:
|
||||
uerr("Unsupported maxpacket: %d\n", maxpacket);
|
||||
uerr("ERROR: Unsupported maxpacket: %d\n", maxpacket);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
@ -3894,7 +3898,7 @@ static int efm32_epin_configure(FAR struct efm32_ep_s *privep, uint8_t eptype,
|
||||
break;
|
||||
|
||||
default:
|
||||
uerr("Unsupported maxpacket: %d\n", maxpacket);
|
||||
uerr("ERROR: Unsupported maxpacket: %d\n", maxpacket);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
@ -5482,7 +5486,7 @@ void up_usbinitialize(void)
|
||||
ret = irq_attach(EFM32_IRQ_USB, efm32_usbinterrupt);
|
||||
if (ret < 0)
|
||||
{
|
||||
uerr("irq_attach failed\n", ret);
|
||||
uerr("ERROR: irq_attach failed\n", ret);
|
||||
goto errout;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@
|
||||
|
||||
/* Register/packet debug depends on CONFIG_DEBUG_FEATURES */
|
||||
|
||||
#ifndef CONFIG_DEBUG_FEATURES
|
||||
#ifndef CONFIG_DEBUG_USB_INFO
|
||||
# undef CONFIG_EFM32_USBHOST_REGDEBUG
|
||||
# undef CONFIG_EFM32_USBHOST_PKTDUMP
|
||||
#endif
|
||||
@ -582,7 +582,7 @@ static const struct efm32_usbhost_trace_s g_trace2[TRACE2_NSTRINGS] =
|
||||
#ifdef CONFIG_EFM32_USBHOST_REGDEBUG
|
||||
static void efm32_printreg(uint32_t addr, uint32_t val, bool iswrite)
|
||||
{
|
||||
llerr("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val);
|
||||
ullinfo("%08x%s%08x\n", addr, iswrite ? "<-" : "->", val);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -632,7 +632,7 @@ static void efm32_checkreg(uint32_t addr, uint32_t val, bool iswrite)
|
||||
{
|
||||
/* No.. More than one. */
|
||||
|
||||
llerr("[repeats %d more times]\n", count);
|
||||
ullinfo("[repeats %d more times]\n", count);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -918,9 +918,9 @@ static int kinetis_ifup(struct net_driver_s *dev)
|
||||
uint8_t *mac = dev->d_mac.ether_addr_octet;
|
||||
uint32_t regval;
|
||||
|
||||
nerr("Bringing up: %d.%d.%d.%d\n",
|
||||
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
|
||||
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
|
||||
ninfo("Bringing up: %d.%d.%d.%d\n",
|
||||
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
|
||||
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
|
||||
|
||||
/* Initialize ENET buffers */
|
||||
|
||||
@ -1695,7 +1695,7 @@ int kinetis_netinitialize(int intf)
|
||||
{
|
||||
/* We could not attach the ISR to the interrupt */
|
||||
|
||||
nerr("Failed to attach EMACTMR IRQ\n");
|
||||
nerr("ERROR: Failed to attach EMACTMR IRQ\n");
|
||||
return -EAGAIN;
|
||||
}
|
||||
#endif
|
||||
@ -1706,7 +1706,7 @@ int kinetis_netinitialize(int intf)
|
||||
{
|
||||
/* We could not attach the ISR to the interrupt */
|
||||
|
||||
nerr("Failed to attach EMACTX IRQ\n");
|
||||
nerr("ERROR: Failed to attach EMACTX IRQ\n");
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
@ -1716,7 +1716,7 @@ int kinetis_netinitialize(int intf)
|
||||
{
|
||||
/* We could not attach the ISR to the interrupt */
|
||||
|
||||
nerr("Failed to attach EMACRX IRQ\n");
|
||||
nerr("ERROR: Failed to attach EMACRX IRQ\n");
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
@ -1726,7 +1726,7 @@ int kinetis_netinitialize(int intf)
|
||||
{
|
||||
/* We could not attach the ISR to the interrupt */
|
||||
|
||||
nerr("Failed to attach EMACMISC IRQ\n");
|
||||
nerr("ERROR: Failed to attach EMACMISC IRQ\n");
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ static void kinetis_dumpnvic(const char *msg, int irq)
|
||||
|
||||
/****************************************************************************
|
||||
* Name: kinetis_nmi, kinetis_busfault, kinetis_usagefault, kinetis_pendsv,
|
||||
* kinetis_errmonitor, kinetis_pendsv, kinetis_reserved
|
||||
* kinetis_dbgmonitor, kinetis_pendsv, kinetis_reserved
|
||||
*
|
||||
* Description:
|
||||
* Handlers for various execptions. None are handled and all are fatal
|
||||
@ -173,7 +173,7 @@ static void kinetis_dumpnvic(const char *msg, int irq)
|
||||
static int kinetis_nmi(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! NMI received\n");
|
||||
_err("PANIC!!! NMI received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -181,7 +181,7 @@ static int kinetis_nmi(int irq, FAR void *context)
|
||||
static int kinetis_busfault(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Bus fault recived\n");
|
||||
_err("PANIC!!! Bus fault recived\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -189,7 +189,7 @@ static int kinetis_busfault(int irq, FAR void *context)
|
||||
static int kinetis_usagefault(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Usage fault received\n");
|
||||
_err("PANIC!!! Usage fault received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -197,15 +197,15 @@ static int kinetis_usagefault(int irq, FAR void *context)
|
||||
static int kinetis_pendsv(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! PendSV received\n");
|
||||
_err("PANIC!!! PendSV received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int kinetis_errmonitor(int irq, FAR void *context)
|
||||
static int kinetis_dbgmonitor(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Debug Monitor received\n");
|
||||
_err("PANIC!!! Debug Monitor received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -213,7 +213,7 @@ static int kinetis_errmonitor(int irq, FAR void *context)
|
||||
static int kinetis_reserved(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Reserved interrupt\n");
|
||||
_err("PANIC!!! Reserved interrupt\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -429,7 +429,7 @@ void up_irqinitialize(void)
|
||||
irq_attach(KINETIS_IRQ_BUSFAULT, kinetis_busfault);
|
||||
irq_attach(KINETIS_IRQ_USAGEFAULT, kinetis_usagefault);
|
||||
irq_attach(KINETIS_IRQ_PENDSV, kinetis_pendsv);
|
||||
irq_attach(KINETIS_IRQ_DBGMONITOR, kinetis_errmonitor);
|
||||
irq_attach(KINETIS_IRQ_DBGMONITOR, kinetis_dbgmonitor);
|
||||
irq_attach(KINETIS_IRQ_RESERVED, kinetis_reserved);
|
||||
#endif
|
||||
|
||||
|
@ -500,7 +500,7 @@ static int pwm_timer(FAR struct kinetis_pwmtimer_s *priv,
|
||||
break;
|
||||
|
||||
default:
|
||||
pwmerr("No such channel: %d\n", priv->channel);
|
||||
pwmerr("ERROR: No such channel: %d\n", priv->channel);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -692,7 +692,7 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev)
|
||||
break;
|
||||
|
||||
default:
|
||||
pwmerr("No such channel: %d\n", priv->channel);
|
||||
pwmerr("ERROR: No such channel: %d\n", priv->channel);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -779,7 +779,7 @@ FAR struct pwm_lowerhalf_s *kinetis_pwminitialize(int timer)
|
||||
#endif
|
||||
|
||||
default:
|
||||
pwmerr("No such timer configured\n");
|
||||
pwmerr("ERROR: No such timer configured\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@
|
||||
# define CONFIG_KINETIS_SDHC_DMAPRIO DMA_CCR_PRIMED
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_DEBUG_FS) || !defined(CONFIG_DEBUG_INFO)
|
||||
#ifndef CONFIG_DEBUG_MEMCARD_INFO
|
||||
# undef CONFIG_SDIO_XFRDEBUG
|
||||
#endif
|
||||
|
||||
@ -574,29 +574,29 @@ static void kinetis_sample(struct kinetis_dev_s *priv, int index)
|
||||
static void kinetis_dumpsample(struct kinetis_dev_s *priv,
|
||||
struct kinetis_sdhcregs_s *regs, const char *msg)
|
||||
{
|
||||
ferr("SDHC Registers: %s\n", msg);
|
||||
ferr(" DSADDR[%08x]: %08x\n", KINETIS_SDHC_DSADDR, regs->dsaddr);
|
||||
ferr(" BLKATTR[%08x]: %08x\n", KINETIS_SDHC_BLKATTR, regs->blkattr);
|
||||
ferr(" CMDARG[%08x]: %08x\n", KINETIS_SDHC_CMDARG, regs->cmdarg);
|
||||
ferr(" XFERTY[%08x]: %08x\n", KINETIS_SDHC_XFERTYP, regs->xferty);
|
||||
ferr(" CMDRSP0[%08x]: %08x\n", KINETIS_SDHC_CMDRSP0, regs->cmdrsp0);
|
||||
ferr(" CMDRSP1[%08x]: %08x\n", KINETIS_SDHC_CMDRSP1, regs->cmdrsp1);
|
||||
ferr(" CMDRSP2[%08x]: %08x\n", KINETIS_SDHC_CMDRSP2, regs->cmdrsp2);
|
||||
ferr(" CMDRSP3[%08x]: %08x\n", KINETIS_SDHC_CMDRSP3, regs->cmdrsp3);
|
||||
ferr(" PRSSTAT[%08x]: %08x\n", KINETIS_SDHC_PRSSTAT, regs->prsstat);
|
||||
ferr(" PROCTL[%08x]: %08x\n", KINETIS_SDHC_PROCTL, regs->proctl);
|
||||
ferr(" SYSCTL[%08x]: %08x\n", KINETIS_SDHC_SYSCTL, regs->sysctl);
|
||||
ferr(" IRQSTAT[%08x]: %08x\n", KINETIS_SDHC_IRQSTAT, regs->irqstat);
|
||||
ferr("IRQSTATEN[%08x]: %08x\n", KINETIS_SDHC_IRQSTATEN, regs->irqstaten);
|
||||
ferr(" IRQSIGEN[%08x]: %08x\n", KINETIS_SDHC_IRQSIGEN, regs->irqsigen);
|
||||
ferr(" AC12ERR[%08x]: %08x\n", KINETIS_SDHC_AC12ERR, regs->ac12err);
|
||||
ferr(" HTCAPBLT[%08x]: %08x\n", KINETIS_SDHC_HTCAPBLT, regs->htcapblt);
|
||||
ferr(" WML[%08x]: %08x\n", KINETIS_SDHC_WML, regs->wml);
|
||||
ferr(" ADMAES[%08x]: %08x\n", KINETIS_SDHC_ADMAES, regs->admaes);
|
||||
ferr(" ADSADDR[%08x]: %08x\n", KINETIS_SDHC_ADSADDR, regs->adsaddr);
|
||||
ferr(" VENDOR[%08x]: %08x\n", KINETIS_SDHC_VENDOR, regs->vendor);
|
||||
ferr(" MMCBOOT[%08x]: %08x\n", KINETIS_SDHC_MMCBOOT, regs->mmcboot);
|
||||
ferr(" HOSTVER[%08x]: %08x\n", KINETIS_SDHC_HOSTVER, regs->hostver);
|
||||
mcinfo("SDHC Registers: %s\n", msg);
|
||||
mcinfo(" DSADDR[%08x]: %08x\n", KINETIS_SDHC_DSADDR, regs->dsaddr);
|
||||
mcinfo(" BLKATTR[%08x]: %08x\n", KINETIS_SDHC_BLKATTR, regs->blkattr);
|
||||
mcinfo(" CMDARG[%08x]: %08x\n", KINETIS_SDHC_CMDARG, regs->cmdarg);
|
||||
mcinfo(" XFERTY[%08x]: %08x\n", KINETIS_SDHC_XFERTYP, regs->xferty);
|
||||
mcinfo(" CMDRSP0[%08x]: %08x\n", KINETIS_SDHC_CMDRSP0, regs->cmdrsp0);
|
||||
mcinfo(" CMDRSP1[%08x]: %08x\n", KINETIS_SDHC_CMDRSP1, regs->cmdrsp1);
|
||||
mcinfo(" CMDRSP2[%08x]: %08x\n", KINETIS_SDHC_CMDRSP2, regs->cmdrsp2);
|
||||
mcinfo(" CMDRSP3[%08x]: %08x\n", KINETIS_SDHC_CMDRSP3, regs->cmdrsp3);
|
||||
mcinfo(" PRSSTAT[%08x]: %08x\n", KINETIS_SDHC_PRSSTAT, regs->prsstat);
|
||||
mcinfo(" PROCTL[%08x]: %08x\n", KINETIS_SDHC_PROCTL, regs->proctl);
|
||||
mcinfo(" SYSCTL[%08x]: %08x\n", KINETIS_SDHC_SYSCTL, regs->sysctl);
|
||||
mcinfo(" IRQSTAT[%08x]: %08x\n", KINETIS_SDHC_IRQSTAT, regs->irqstat);
|
||||
mcinfo("IRQSTATEN[%08x]: %08x\n", KINETIS_SDHC_IRQSTATEN, regs->irqstaten);
|
||||
mcinfo(" IRQSIGEN[%08x]: %08x\n", KINETIS_SDHC_IRQSIGEN, regs->irqsigen);
|
||||
mcinfo(" AC12ERR[%08x]: %08x\n", KINETIS_SDHC_AC12ERR, regs->ac12err);
|
||||
mcinfo(" HTCAPBLT[%08x]: %08x\n", KINETIS_SDHC_HTCAPBLT, regs->htcapblt);
|
||||
mcinfo(" WML[%08x]: %08x\n", KINETIS_SDHC_WML, regs->wml);
|
||||
mcinfo(" ADMAES[%08x]: %08x\n", KINETIS_SDHC_ADMAES, regs->admaes);
|
||||
mcinfo(" ADSADDR[%08x]: %08x\n", KINETIS_SDHC_ADSADDR, regs->adsaddr);
|
||||
mcinfo(" VENDOR[%08x]: %08x\n", KINETIS_SDHC_VENDOR, regs->vendor);
|
||||
mcinfo(" MMCBOOT[%08x]: %08x\n", KINETIS_SDHC_MMCBOOT, regs->mmcboot);
|
||||
mcinfo(" HOSTVER[%08x]: %08x\n", KINETIS_SDHC_HOSTVER, regs->hostver);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -791,8 +791,8 @@ static void kinetis_transmit(struct kinetis_dev_s *priv)
|
||||
* ready (BWR)
|
||||
*/
|
||||
|
||||
fllinfo("Entry: remaining: %d IRQSTAT: %08x\n",
|
||||
priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT));
|
||||
mcllinfo("Entry: remaining: %d IRQSTAT: %08x\n",
|
||||
priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT));
|
||||
|
||||
while (priv->remaining > 0 &&
|
||||
(getreg32(KINETIS_SDHC_IRQSTAT) & SDHC_INT_BWR) != 0)
|
||||
@ -837,9 +837,8 @@ static void kinetis_transmit(struct kinetis_dev_s *priv)
|
||||
putreg32(data.w, KINETIS_SDHC_DATPORT);
|
||||
}
|
||||
|
||||
fllinfo("Exit: remaining: %d IRQSTAT: %08x\n",
|
||||
priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT));
|
||||
|
||||
mcllinfo("Exit: remaining: %d IRQSTAT: %08x\n",
|
||||
priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -877,8 +876,8 @@ static void kinetis_receive(struct kinetis_dev_s *priv)
|
||||
* ready (BRR)
|
||||
*/
|
||||
|
||||
fllinfo("Entry: remaining: %d IRQSTAT: %08x\n",
|
||||
priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT));
|
||||
mcllinfo("Entry: remaining: %d IRQSTAT: %08x\n",
|
||||
priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT));
|
||||
|
||||
while (priv->remaining > 0 &&
|
||||
(getreg32(KINETIS_SDHC_IRQSTAT) & SDHC_INT_BRR) != 0)
|
||||
@ -929,10 +928,9 @@ static void kinetis_receive(struct kinetis_dev_s *priv)
|
||||
|
||||
putreg32(watermark << SDHC_WML_RD_SHIFT, KINETIS_SDHC_WML);
|
||||
|
||||
fllinfo("Exit: remaining: %d IRQSTAT: %08x WML: %08x\n",
|
||||
priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT),
|
||||
getreg32(KINETIS_SDHC_WML));
|
||||
|
||||
mcllinfo("Exit: remaining: %d IRQSTAT: %08x WML: %08x\n",
|
||||
priv->remaining, getreg32(KINETIS_SDHC_IRQSTAT),
|
||||
getreg32(KINETIS_SDHC_WML));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -973,7 +971,7 @@ static void kinetis_eventtimeout(int argc, uint32_t arg)
|
||||
/* Wake up any waiting threads */
|
||||
|
||||
kinetis_endwait(priv, SDIOWAIT_TIMEOUT);
|
||||
fllerr("Timeout: remaining: %d\n", priv->remaining);
|
||||
mcllerr("ERROR: Timeout: remaining: %d\n", priv->remaining);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1105,8 +1103,8 @@ static int kinetis_interrupt(int irq, void *context)
|
||||
|
||||
regval = getreg32(KINETIS_SDHC_IRQSIGEN);
|
||||
enabled = getreg32(KINETIS_SDHC_IRQSTAT) & regval;
|
||||
fllinfo("IRQSTAT: %08x IRQSIGEN %08x enabled: %08x\n",
|
||||
getreg32(KINETIS_SDHC_IRQSTAT), regval, enabled);
|
||||
mcllinfo("IRQSTAT: %08x IRQSIGEN %08x enabled: %08x\n",
|
||||
getreg32(KINETIS_SDHC_IRQSTAT), regval, enabled);
|
||||
|
||||
/* Disable card interrupts to clear the card interrupt to the host system. */
|
||||
|
||||
@ -1162,7 +1160,7 @@ static int kinetis_interrupt(int irq, void *context)
|
||||
{
|
||||
/* Terminate the transfer with an error */
|
||||
|
||||
fllerr("ERROR: Data block CRC failure, remaining: %d\n", priv->remaining);
|
||||
mcllerr("ERROR: Data block CRC failure, remaining: %d\n", priv->remaining);
|
||||
kinetis_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_ERROR);
|
||||
}
|
||||
|
||||
@ -1172,7 +1170,7 @@ static int kinetis_interrupt(int irq, void *context)
|
||||
{
|
||||
/* Terminate the transfer with an error */
|
||||
|
||||
fllerr("ERROR: Data timeout, remaining: %d\n", priv->remaining);
|
||||
mcllerr("ERROR: Data timeout, remaining: %d\n", priv->remaining);
|
||||
kinetis_endtransfer(priv, SDIOWAIT_TRANSFERDONE | SDIOWAIT_TIMEOUT);
|
||||
}
|
||||
}
|
||||
@ -1289,9 +1287,9 @@ static void kinetis_reset(FAR struct sdio_dev_s *dev)
|
||||
|
||||
putreg32(SDHC_INT_ALL, KINETIS_SDHC_IRQSTATEN);
|
||||
|
||||
finfo("SYSCTL: %08x PRSSTAT: %08x IRQSTATEN: %08x\n",
|
||||
getreg32(KINETIS_SDHC_SYSCTL), getreg32(KINETIS_SDHC_PRSSTAT),
|
||||
getreg32(KINETIS_SDHC_IRQSTATEN));
|
||||
mcinfo("SYSCTL: %08x PRSSTAT: %08x IRQSTATEN: %08x\n",
|
||||
getreg32(KINETIS_SDHC_SYSCTL), getreg32(KINETIS_SDHC_PRSSTAT),
|
||||
getreg32(KINETIS_SDHC_IRQSTATEN));
|
||||
|
||||
/* The next phase of the hardware reset would be to set the SYSCTRL INITA
|
||||
* bit to send 80 clock ticks for card to power up and then reset the card
|
||||
@ -1504,7 +1502,7 @@ static void kinetis_frequency(FAR struct sdio_dev_s *dev, uint32_t frequency)
|
||||
regval |= (SDHC_SYSCTL_SDCLKEN | SDHC_SYSCTL_PEREN | SDHC_SYSCTL_HCKEN |
|
||||
SDHC_SYSCTL_IPGEN);
|
||||
putreg32(regval, KINETIS_SDHC_SYSCTL);
|
||||
finfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL));
|
||||
mcinfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1538,7 +1536,7 @@ static void kinetis_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate)
|
||||
regval = getreg32(KINETIS_SDHC_SYSCTL);
|
||||
regval &= ~SDHC_SYSCTL_SDCLKEN;
|
||||
putreg32(regval, KINETIS_SDHC_SYSCTL);
|
||||
finfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL));
|
||||
mcinfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL));
|
||||
|
||||
switch (rate)
|
||||
{
|
||||
@ -1552,7 +1550,7 @@ static void kinetis_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate)
|
||||
regval &= ~(SDHC_SYSCTL_IPGEN | SDHC_SYSCTL_HCKEN | SDHC_SYSCTL_PEREN |
|
||||
SDHC_SYSCTL_SDCLKFS_MASK | SDHC_SYSCTL_DVS_MASK);
|
||||
putreg32(regval, KINETIS_SDHC_SYSCTL);
|
||||
finfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL));
|
||||
mcinfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1593,7 +1591,7 @@ static void kinetis_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate)
|
||||
regval = getreg32(KINETIS_SDHC_SYSCTL);
|
||||
regval &= ~SDHC_SYSCTL_SDCLKEN;
|
||||
putreg32(regval, KINETIS_SDHC_SYSCTL);
|
||||
finfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL));
|
||||
mcinfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL));
|
||||
|
||||
/* Clear the old prescaler and divisor values so that new ones can be ORed
|
||||
* in.
|
||||
@ -1619,7 +1617,7 @@ static void kinetis_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate)
|
||||
|
||||
regval &= ~(SDHC_SYSCTL_IPGEN | SDHC_SYSCTL_HCKEN | SDHC_SYSCTL_PEREN);
|
||||
putreg32(regval, KINETIS_SDHC_SYSCTL);
|
||||
finfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL));
|
||||
mcinfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1653,7 +1651,7 @@ static void kinetis_clock(FAR struct sdio_dev_s *dev, enum sdio_clock_e rate)
|
||||
}
|
||||
|
||||
putreg32(regval, KINETIS_SDHC_SYSCTL);
|
||||
finfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL));
|
||||
mcinfo("SYSCTRL: %08x\n", getreg32(KINETIS_SDHC_SYSCTL));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1824,7 +1822,7 @@ static int kinetis_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t ar
|
||||
|
||||
/* Other bits? What about CMDTYP? */
|
||||
|
||||
finfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval);
|
||||
mcinfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval);
|
||||
|
||||
/* The Command Inhibit (CIHB) bit is set in the PRSSTAT bit immediately
|
||||
* after the transfer type register is written. This bit is cleared when
|
||||
@ -1840,8 +1838,8 @@ static int kinetis_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t ar
|
||||
{
|
||||
if (--timeout <= 0)
|
||||
{
|
||||
ferr("ERROR: Timeout cmd: %08x PRSSTAT: %08x\n",
|
||||
cmd, getreg32(KINETIS_SDHC_PRSSTAT));
|
||||
mcerr("ERROR: Timeout cmd: %08x PRSSTAT: %08x\n",
|
||||
cmd, getreg32(KINETIS_SDHC_PRSSTAT));
|
||||
|
||||
return -EBUSY;
|
||||
}
|
||||
@ -2079,8 +2077,8 @@ static int kinetis_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd)
|
||||
{
|
||||
if (--timeout <= 0)
|
||||
{
|
||||
ferr("ERROR: Timeout cmd: %08x IRQSTAT: %08x\n",
|
||||
cmd, getreg32(KINETIS_SDHC_IRQSTAT));
|
||||
mcerr("ERROR: Timeout cmd: %08x IRQSTAT: %08x\n",
|
||||
cmd, getreg32(KINETIS_SDHC_IRQSTAT));
|
||||
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
@ -2090,8 +2088,8 @@ static int kinetis_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd)
|
||||
|
||||
if ((getreg32(KINETIS_SDHC_IRQSTAT) & errors) != 0)
|
||||
{
|
||||
ferr("ERROR: cmd: %08x errors: %08x IRQSTAT: %08x\n",
|
||||
cmd, errors, getreg32(KINETIS_SDHC_IRQSTAT));
|
||||
mcerr("ERROR: cmd: %08x errors: %08x IRQSTAT: %08x\n",
|
||||
cmd, errors, getreg32(KINETIS_SDHC_IRQSTAT));
|
||||
ret = -EIO;
|
||||
}
|
||||
|
||||
@ -2155,7 +2153,7 @@ static int kinetis_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd,
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
if (!rshort)
|
||||
{
|
||||
ferr("ERROR: rshort=NULL\n");
|
||||
mcerr("ERROR: rshort=NULL\n");
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
@ -2165,7 +2163,7 @@ static int kinetis_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd,
|
||||
(cmd & MMCSD_RESPONSE_MASK) != MMCSD_R1B_RESPONSE &&
|
||||
(cmd & MMCSD_RESPONSE_MASK) != MMCSD_R6_RESPONSE)
|
||||
{
|
||||
ferr("ERROR: Wrong response CMD=%08x\n", cmd);
|
||||
mcerr("ERROR: Wrong response CMD=%08x\n", cmd);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
else
|
||||
@ -2176,12 +2174,12 @@ static int kinetis_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd,
|
||||
regval = getreg32(KINETIS_SDHC_IRQSTAT);
|
||||
if ((regval & SDHC_INT_CTOE) != 0)
|
||||
{
|
||||
ferr("ERROR: Command timeout: %08x\n", regval);
|
||||
mcerr("ERROR: Command timeout: %08x\n", regval);
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
else if ((regval & SDHC_INT_CCE) != 0)
|
||||
{
|
||||
ferr("ERROR: CRC failure: %08x\n", regval);
|
||||
mcerr("ERROR: CRC failure: %08x\n", regval);
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
@ -2214,7 +2212,7 @@ static int kinetis_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t r
|
||||
|
||||
if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R2_RESPONSE)
|
||||
{
|
||||
ferr("ERROR: Wrong response CMD=%08x\n", cmd);
|
||||
mcerr("ERROR: Wrong response CMD=%08x\n", cmd);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
else
|
||||
@ -2225,12 +2223,12 @@ static int kinetis_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t r
|
||||
regval = getreg32(KINETIS_SDHC_IRQSTAT);
|
||||
if (regval & SDHC_INT_CTOE)
|
||||
{
|
||||
ferr("ERROR: Timeout IRQSTAT: %08x\n", regval);
|
||||
mcerr("ERROR: Timeout IRQSTAT: %08x\n", regval);
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
else if (regval & SDHC_INT_CCE)
|
||||
{
|
||||
ferr("ERROR: CRC fail IRQSTAT: %08x\n", regval);
|
||||
mcerr("ERROR: CRC fail IRQSTAT: %08x\n", regval);
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
@ -2267,7 +2265,7 @@ static int kinetis_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t
|
||||
if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R3_RESPONSE &&
|
||||
(cmd & MMCSD_RESPONSE_MASK) != MMCSD_R7_RESPONSE)
|
||||
{
|
||||
ferr("ERROR: Wrong response CMD=%08x\n", cmd);
|
||||
mcerr("ERROR: Wrong response CMD=%08x\n", cmd);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
else
|
||||
@ -2280,7 +2278,7 @@ static int kinetis_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t
|
||||
regval = getreg32(KINETIS_SDHC_IRQSTAT);
|
||||
if (regval & SDHC_INT_CTOE)
|
||||
{
|
||||
ferr("ERROR: Timeout IRQSTAT: %08x\n", regval);
|
||||
mcerr("ERROR: Timeout IRQSTAT: %08x\n", regval);
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
}
|
||||
@ -2416,7 +2414,7 @@ static sdio_eventset_t kinetis_eventwait(FAR struct sdio_dev_s *dev,
|
||||
1, (uint32_t)priv);
|
||||
if (ret != OK)
|
||||
{
|
||||
ferr("ERROR: wd_start failed: %d\n", ret);
|
||||
mcerr("ERROR: wd_start failed: %d\n", ret);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2486,7 +2484,7 @@ static void kinetis_callbackenable(FAR struct sdio_dev_s *dev,
|
||||
{
|
||||
struct kinetis_dev_s *priv = (struct kinetis_dev_s *)dev;
|
||||
|
||||
finfo("eventset: %02x\n", eventset);
|
||||
mcinfo("eventset: %02x\n", eventset);
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
priv->cbevents = eventset;
|
||||
@ -2522,7 +2520,7 @@ static int kinetis_registercallback(FAR struct sdio_dev_s *dev,
|
||||
|
||||
/* Disable callbacks and register this callback and is argument */
|
||||
|
||||
finfo("Register %p(%p)\n", callback, arg);
|
||||
mcinfo("Register %p(%p)\n", callback, arg);
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
priv->cbevents = 0;
|
||||
@ -2694,8 +2692,8 @@ static void kinetis_callback(void *arg)
|
||||
/* Is a callback registered? */
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
finfo("Callback %p(%p) cbevents: %02x cdstatus: %02x\n",
|
||||
priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus);
|
||||
mcinfo("Callback %p(%p) cbevents: %02x cdstatus: %02x\n",
|
||||
priv->callback, priv->cbarg, priv->cbevents, priv->cdstatus);
|
||||
|
||||
if (priv->callback)
|
||||
{
|
||||
@ -2739,14 +2737,14 @@ static void kinetis_callback(void *arg)
|
||||
{
|
||||
/* Yes.. queue it */
|
||||
|
||||
finfo("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg);
|
||||
mcinfo("Queuing callback to %p(%p)\n", priv->callback, priv->cbarg);
|
||||
(void)work_queue(HPWORK, &priv->cbwork, (worker_t)priv->callback, priv->cbarg, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No.. then just call the callback here */
|
||||
|
||||
finfo("Callback to %p(%p)\n", priv->callback, priv->cbarg);
|
||||
mcinfo("Callback to %p(%p)\n", priv->callback, priv->cbarg);
|
||||
priv->callback(priv->cbarg);
|
||||
}
|
||||
}
|
||||
@ -2792,7 +2790,7 @@ FAR struct sdio_dev_s *sdhc_initialize(int slotno)
|
||||
regval = getreg32(KINETIS_SIM_SCGC3);
|
||||
regval |= SIM_SCGC3_SDHC;
|
||||
putreg32(regval, KINETIS_SIM_SCGC3);
|
||||
finfo("SIM_SCGC3: %08x\n", regval);
|
||||
mcinfo("SIM_SCGC3: %08x\n", regval);
|
||||
|
||||
/* In addition to the system clock, the SDHC module needs a clock for the
|
||||
* base for the external card clock. There are four possible sources for
|
||||
@ -2808,7 +2806,7 @@ FAR struct sdio_dev_s *sdhc_initialize(int slotno)
|
||||
regval &= ~SIM_SOPT2_SDHCSRC_MASK;
|
||||
regval |= SIM_SOPT2_SDHCSRC_CORE;
|
||||
putreg32(regval, KINETIS_SIM_SOPT2);
|
||||
finfo("SIM_SOPT2: %08x\n", regval);
|
||||
mcinfo("SIM_SOPT2: %08x\n", regval);
|
||||
|
||||
/* Configure pins for 1 or 4-bit, wide-bus operation (the chip is capable
|
||||
* of 8-bit wide bus operation but D4-D7 are not configured).
|
||||
@ -2892,7 +2890,7 @@ void sdhc_mediachange(FAR struct sdio_dev_s *dev, bool cardinslot)
|
||||
priv->cdstatus &= ~SDIO_STATUS_PRESENT;
|
||||
}
|
||||
|
||||
finfo("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus);
|
||||
mcinfo("cdstatus OLD: %02x NEW: %02x\n", cdstatus, priv->cdstatus);
|
||||
|
||||
/* Perform any requested callback if the status has changed */
|
||||
|
||||
@ -2937,7 +2935,7 @@ void sdhc_wrprotect(FAR struct sdio_dev_s *dev, bool wrprotect)
|
||||
priv->cdstatus &= ~SDIO_STATUS_WRPROTECTED;
|
||||
}
|
||||
|
||||
finfo("cdstatus: %02x\n", priv->cdstatus);
|
||||
mcinfo("cdstatus: %02x\n", priv->cdstatus);
|
||||
leave_critical_section(flags);
|
||||
}
|
||||
#endif /* CONFIG_KINETIS_SDHC */
|
||||
|
@ -805,7 +805,7 @@ static int up_interrupt(int irq, void *context)
|
||||
*/
|
||||
|
||||
regval = up_serialin(priv, KINETIS_UART_S1_OFFSET);
|
||||
llerr("S1: %02x\n", regval);
|
||||
_llinfo("S1: %02x\n", regval);
|
||||
UNUSED(regval);
|
||||
|
||||
regval = up_serialin(priv, KINETIS_UART_D_OFFSET);
|
||||
|
@ -156,8 +156,8 @@ void __start(void)
|
||||
|
||||
/* Show reset status */
|
||||
|
||||
err("Reset status: %02x:%02x\n",
|
||||
getreg8(KINETIS_SMC_SRSH), getreg8(KINETIS_SMC_SRSL));
|
||||
_llwarn("Reset status: %02x:%02x\n",
|
||||
getreg8(KINETIS_SMC_SRSH), getreg8(KINETIS_SMC_SRSL));
|
||||
|
||||
/* Then start NuttX */
|
||||
|
||||
|
@ -86,7 +86,7 @@
|
||||
* enabled.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DEBUG_FEATURES
|
||||
#ifndef CONFIG_DEBUG_USB_INFO
|
||||
# undef CONFIG_KHCI_USBDEV_REGDEBUG
|
||||
# undef CONFIG_KHCI_USBDEV_BDTDEBUG
|
||||
#endif
|
||||
@ -365,42 +365,21 @@ const struct trace_msg_t g_usb_trace_strings_deverror[] =
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_KHCI_USBDEV_REGDEBUG
|
||||
|
||||
# undef CONFIG_KHCI_USBDEV_BDTDEBUG
|
||||
# define CONFIG_KHCI_USBDEV_BDTDEBUG 1
|
||||
|
||||
# define regerr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define reginfo llerr
|
||||
# else
|
||||
# define reginfo(x...)
|
||||
# endif
|
||||
|
||||
#else
|
||||
|
||||
# define khci_getreg(addr) getreg8(addr)
|
||||
# define khci_putreg(val,addr) putreg8(val,addr)
|
||||
# define regerr(x...)
|
||||
# define reginfo(x...)
|
||||
|
||||
#endif
|
||||
|
||||
/* CONFIG_KHCI_USBDEV_BDTDEBUG dumps most BDT settings */
|
||||
|
||||
#ifdef CONFIG_KHCI_USBDEV_BDTDEBUG
|
||||
|
||||
# define bdterr llerr
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define bdtinfo llerr
|
||||
# else
|
||||
# define bdtinfo(x...)
|
||||
# endif
|
||||
|
||||
# define bdterr ullerr
|
||||
# define bdtinfo ullinfo
|
||||
#else
|
||||
|
||||
# define bdterr(x...)
|
||||
# define bdtinfo(x...)
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -714,7 +693,7 @@ static uint16_t khci_getreg(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
llerr("...\n");
|
||||
ullinfo("...\n");
|
||||
}
|
||||
return val;
|
||||
}
|
||||
@ -730,7 +709,7 @@ static uint16_t khci_getreg(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
llerr("[repeats %d more times]\n", count-3);
|
||||
ullinfo("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@ -742,7 +721,7 @@ static uint16_t khci_getreg(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
llerr("%08x->%04x\n", addr, val);
|
||||
ullinfo("%08x->%04x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@ -756,7 +735,7 @@ static void khci_putreg(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
llerr("%08x<-%04x\n", addr, val);
|
||||
ullinfo("%08x<-%04x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
@ -953,8 +932,8 @@ static void khci_epwrite(struct khci_ep_s *privep,
|
||||
|
||||
/* And, finally, give the BDT to the USB */
|
||||
|
||||
bdterr("EP%d BDT IN [%p] {%08x, %08x}\n",
|
||||
USB_EPNO(privep->ep.eplog), bdt, status, bdt->addr);
|
||||
bdtinfo("EP%d BDT IN [%p] {%08x, %08x}\n",
|
||||
USB_EPNO(privep->ep.eplog), bdt, status, bdt->addr);
|
||||
|
||||
bdt->status = status;
|
||||
}
|
||||
@ -994,8 +973,8 @@ static void khci_wrcomplete(struct khci_usbdev_s *priv,
|
||||
epno, privreq->req.len, privreq->req.xfrd,
|
||||
privreq->inflight[0], privreq->inflight[1]);
|
||||
#endif
|
||||
bdterr("EP%d BDT IN [%p] {%08x, %08x}\n",
|
||||
epno, bdtin, bdtin->status, bdtin->addr);
|
||||
bdtinfo("EP%d BDT IN [%p] {%08x, %08x}\n",
|
||||
epno, bdtin, bdtin->status, bdtin->addr);
|
||||
|
||||
/* We should own the BDT that just completed. But NULLify the entire BDT IN.
|
||||
* Why? So that we can tell later that the BDT available. No, it is not
|
||||
@ -1419,8 +1398,8 @@ static int khci_rdcomplete(struct khci_usbdev_s *priv,
|
||||
|
||||
ullinfo("EP%d: len=%d xfrd=%d\n",
|
||||
epno, privreq->req.len, privreq->req.xfrd);
|
||||
bdterr("EP%d BDT OUT [%p] {%08x, %08x}\n",
|
||||
epno, bdtout, bdtout->status, bdtout->addr);
|
||||
bdtinfo("EP%d BDT OUT [%p] {%08x, %08x}\n",
|
||||
epno, bdtout, bdtout->status, bdtout->addr);
|
||||
|
||||
/* We should own the BDT that just completed */
|
||||
|
||||
@ -1563,7 +1542,7 @@ static int khci_ep0rdsetup(struct khci_usbdev_s *priv, uint8_t *dest,
|
||||
|
||||
/* Then give the BDT to the USB */
|
||||
|
||||
bdterr("EP0 BDT OUT [%p] {%08x, %08x}\n", bdtout, status, bdtout->addr);
|
||||
bdtinfo("EP0 BDT OUT [%p] {%08x, %08x}\n", bdtout, status, bdtout->addr);
|
||||
bdtout->status = status;
|
||||
|
||||
priv->ctrlstate = CTRLSTATE_RDREQUEST;
|
||||
@ -1664,7 +1643,8 @@ static int khci_rdsetup(struct khci_ep_s *privep, uint8_t *dest, int readlen)
|
||||
|
||||
/* Then give the BDT to the USB */
|
||||
|
||||
bdterr("EP%d BDT OUT [%p] {%08x, %08x}\n", epno, bdtout, status, bdtout->addr);
|
||||
bdtinfo("EP%d BDT OUT [%p] {%08x, %08x}\n",
|
||||
epno, bdtout, status, bdtout->addr);
|
||||
|
||||
bdtout->status = status;
|
||||
return OK;
|
||||
@ -2676,7 +2656,7 @@ static void khci_ep0transfer(struct khci_usbdev_s *priv, uint16_t ustat)
|
||||
bdt = &g_bdt[index];
|
||||
priv->eplist[0].bdtout = bdt;
|
||||
|
||||
bdterr("EP0 BDT OUT [%p] {%08x, %08x}\n", bdt, bdt->status, bdt->addr);
|
||||
bdtinfo("EP0 BDT OUT [%p] {%08x, %08x}\n", bdt, bdt->status, bdt->addr);
|
||||
|
||||
/* Check the current EP0 OUT buffer contains a SETUP packet */
|
||||
|
||||
@ -2913,7 +2893,7 @@ x
|
||||
if ((usbir & USB_INT_ERROR) != 0)
|
||||
{
|
||||
usbtrace(TRACE_INTDECODE(KHCI_TRACEINTID_UERR), usbir);
|
||||
ullerr("Error: EIR=%04x\n", khci_getreg(KINETIS_USB0_ERRSTAT));
|
||||
ullerr("ERROR: EIR=%04x\n", khci_getreg(KINETIS_USB0_ERRSTAT));
|
||||
|
||||
/* Clear all pending USB error interrupts */
|
||||
|
||||
@ -3299,7 +3279,8 @@ static int khci_epconfigure(struct usbdev_ep_s *ep,
|
||||
bdt->status = 0;
|
||||
bdt->addr = 0;
|
||||
|
||||
bdterr("EP%d BDT IN [%p] {%08x, %08x}\n", epno, bdt, bdt->status, bdt->addr);
|
||||
bdtinfo("EP%d BDT IN [%p] {%08x, %08x}\n",
|
||||
epno, bdt, bdt->status, bdt->addr);
|
||||
|
||||
/* Now do the same for the other buffer. */
|
||||
|
||||
@ -3307,7 +3288,8 @@ static int khci_epconfigure(struct usbdev_ep_s *ep,
|
||||
bdt->status = 0;
|
||||
bdt->addr = 0;
|
||||
|
||||
bdterr("EP%d BDT IN [%p] {%08x, %08x}\n", epno, bdt, bdt->status, bdt->addr);
|
||||
bdtinfo("EP%d BDT IN [%p] {%08x, %08x}\n",
|
||||
epno, bdt, bdt->status, bdt->addr);
|
||||
}
|
||||
|
||||
if (!epin || bidi)
|
||||
@ -3321,7 +3303,8 @@ static int khci_epconfigure(struct usbdev_ep_s *ep,
|
||||
bdt->status = 0;
|
||||
bdt->addr = 0;
|
||||
|
||||
bdterr("EP%d BDT OUT [%p] {%08x, %08x}\n", epno, bdt, bdt->status, bdt->addr);
|
||||
bdtinfo("EP%d BDT OUT [%p] {%08x, %08x}\n",
|
||||
epno, bdt, bdt->status, bdt->addr);
|
||||
|
||||
/* Now do the same for the other buffer. */
|
||||
|
||||
@ -3329,7 +3312,8 @@ static int khci_epconfigure(struct usbdev_ep_s *ep,
|
||||
bdt->status = 0;
|
||||
bdt->addr = 0;
|
||||
|
||||
bdterr("EP%d BDT OUT [%p] {%08x, %08x}\n", epno, bdt, bdt->status, bdt->addr);
|
||||
bdtinfo("EP%d BDT OUT [%p] {%08x, %08x}\n",
|
||||
epno, bdt, bdt->status, bdt->addr);
|
||||
}
|
||||
|
||||
/* Get the maxpacket size of the endpoint. */
|
||||
@ -3467,7 +3451,8 @@ static int khci_epsubmit(struct usbdev_ep_s *ep, struct usbdev_req_s *req)
|
||||
if (!req || !req->callback || !req->buf || !ep)
|
||||
{
|
||||
usbtrace(TRACE_DEVERROR(KHCI_TRACEERR_INVALIDPARMS), 0);
|
||||
ullerr("ERROR: req=%p callback=%p buf=%p ep=%p\n", req, req->callback, req->buf, ep);
|
||||
ullerr("ERROR: req=%p callback=%p buf=%p ep=%p\n",
|
||||
req, req->callback, req->buf, ep);
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
@ -3666,10 +3651,10 @@ static int khci_epbdtstall(struct usbdev_ep_s *ep, bool resume, bool epin)
|
||||
bdt->addr = (uint8_t *)physaddr;
|
||||
bdt->status = (USB_BDT_UOWN | bytecount);
|
||||
|
||||
bdterr("EP0 BDT IN [%p] {%08x, %08x}\n",
|
||||
bdt, bdt->status, bdt->addr);
|
||||
bdterr("EP0 BDT IN [%p] {%08x, %08x}\n",
|
||||
otherbdt, otherbdt->status, otherbdt->addr);
|
||||
bdtinfo("EP0 BDT IN [%p] {%08x, %08x}\n",
|
||||
bdt, bdt->status, bdt->addr);
|
||||
bdtinfo("EP0 BDT IN [%p] {%08x, %08x}\n",
|
||||
otherbdt, otherbdt->status, otherbdt->addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3683,10 +3668,10 @@ static int khci_epbdtstall(struct usbdev_ep_s *ep, bool resume, bool epin)
|
||||
bdt->addr = 0;
|
||||
bdt->status = 0;
|
||||
|
||||
bdterr("EP%d BDT %s [%p] {%08x, %08x}\n",
|
||||
epno, epin ? "IN" : "OUT", bdt, bdt->status, bdt->addr);
|
||||
bdterr("EP%d BDT %s [%p] {%08x, %08x}\n",
|
||||
epno, epin ? "IN" : "OUT", otherbdt, otherbdt->status, otherbdt->addr);
|
||||
bdtinfo("EP%d BDT %s [%p] {%08x, %08x}\n",
|
||||
epno, epin ? "IN" : "OUT", bdt, bdt->status, bdt->addr);
|
||||
bdtinfo("EP%d BDT %s [%p] {%08x, %08x}\n",
|
||||
epno, epin ? "IN" : "OUT", otherbdt, otherbdt->status, otherbdt->addr);
|
||||
|
||||
/* Restart any queued requests (after a delay so that we can be assured
|
||||
* that the hardware has recovered from the stall -- I don't know of any
|
||||
@ -3718,10 +3703,10 @@ static int khci_epbdtstall(struct usbdev_ep_s *ep, bool resume, bool epin)
|
||||
|
||||
khci_rqstop(privep);
|
||||
|
||||
bdterr("EP%d BDT %s [%p] {%08x, %08x}\n",
|
||||
epno, epin ? "IN" : "OUT", bdt, bdt->status, bdt->addr);
|
||||
bdterr("EP%d BDT %s [%p] {%08x, %08x}\n",
|
||||
epno, epin ? "IN" : "OUT", otherbdt, otherbdt->status, otherbdt->addr);
|
||||
bdtinfo("EP%d BDT %s [%p] {%08x, %08x}\n",
|
||||
epno, epin ? "IN" : "OUT", bdt, bdt->status, bdt->addr);
|
||||
bdtinfo("EP%d BDT %s [%p] {%08x, %08x}\n",
|
||||
epno, epin ? "IN" : "OUT", otherbdt, otherbdt->status, otherbdt->addr);
|
||||
}
|
||||
|
||||
return OK;
|
||||
@ -4248,10 +4233,10 @@ static void khci_hwreset(struct khci_usbdev_s *priv)
|
||||
khci_putreg((uint8_t)((uint32_t)g_bdt >> 16), KINETIS_USB0_BDTPAGE2);
|
||||
khci_putreg((uint8_t)(((uint32_t)g_bdt >> 8) & USB_BDTPAGE1_MASK), KINETIS_USB0_BDTPAGE1);
|
||||
|
||||
ullerr("BDT Address %hhx \n" ,&g_bdt);
|
||||
ullerr("BDTPAGE3 %hhx\n",khci_getreg(KINETIS_USB0_BDTPAGE3));
|
||||
ullerr("BDTPAGE2 %hhx\n",khci_getreg(KINETIS_USB0_BDTPAGE2));
|
||||
ullerr("BDTPAGE1 %hhx\n",khci_getreg(KINETIS_USB0_BDTPAGE1));
|
||||
ullinfo("BDT Address %hhx \n" ,&g_bdt);
|
||||
ullinfo("BDTPAGE3 %hhx\n",khci_getreg(KINETIS_USB0_BDTPAGE3));
|
||||
ullinfo("BDTPAGE2 %hhx\n",khci_getreg(KINETIS_USB0_BDTPAGE2));
|
||||
ullinfo("BDTPAGE1 %hhx\n",khci_getreg(KINETIS_USB0_BDTPAGE1));
|
||||
|
||||
/* Clear any pending interrupts */
|
||||
|
||||
|
@ -118,9 +118,9 @@ void kl_dumpgpio(gpio_cfgset_t pinset, const char *msg)
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
llinfo("GPIO%c pinset: %08x base: %08x -- %s\n",
|
||||
_llinfo("GPIO%c pinset: %08x base: %08x -- %s\n",
|
||||
g_portchar[port], pinset, base, msg);
|
||||
llinfo(" PDOR: %08x PDIR: %08x PDDR: %08x\n",
|
||||
_llinfo(" PDOR: %08x PDIR: %08x PDDR: %08x\n",
|
||||
getreg32(base + KL_GPIO_PDOR_OFFSET),
|
||||
getreg32(base + KL_GPIO_PDIR_OFFSET),
|
||||
getreg32(base + KL_GPIO_PDDR_OFFSET));
|
||||
|
@ -103,7 +103,7 @@ static void up_idlepm(void)
|
||||
|
||||
/* Perform board-specific, state-dependent logic here */
|
||||
|
||||
llinfo("newstate= %d oldstate=%d\n", newstate, oldstate);
|
||||
_llinfo("newstate= %d oldstate=%d\n", newstate, oldstate);
|
||||
|
||||
/* Then force the global state change */
|
||||
|
||||
|
@ -128,7 +128,7 @@ static void kl_dumpnvic(const char *msg, int irq)
|
||||
|
||||
/****************************************************************************
|
||||
* Name: kl_nmi, kl_busfault, kl_usagefault, kl_pendsv,
|
||||
* kl_errmonitor, kl_pendsv, kl_reserved
|
||||
* kl_dbgmonitor, kl_pendsv, kl_reserved
|
||||
*
|
||||
* Description:
|
||||
* Handlers for various execptions. None are handled and all are fatal
|
||||
@ -141,7 +141,7 @@ static void kl_dumpnvic(const char *msg, int irq)
|
||||
static int kl_nmi(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! NMI received\n");
|
||||
_err("PANIC!!! NMI received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -149,7 +149,7 @@ static int kl_nmi(int irq, FAR void *context)
|
||||
static int kl_pendsv(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! PendSV received\n");
|
||||
_err("PANIC!!! PendSV received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -157,7 +157,7 @@ static int kl_pendsv(int irq, FAR void *context)
|
||||
static int kl_reserved(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Reserved interrupt\n");
|
||||
_err("PANIC!!! Reserved interrupt\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
|
@ -464,7 +464,7 @@ static int pwm_timer(FAR struct kl_pwmtimer_s *priv,
|
||||
break;
|
||||
|
||||
default:
|
||||
pwmerr("No such channel: %d\n", priv->channel);
|
||||
pwmerr("ERROR: No such channel: %d\n", priv->channel);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -644,7 +644,7 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev)
|
||||
break;
|
||||
|
||||
default:
|
||||
pwmerr("No such channel: %d\n", priv->channel);
|
||||
pwmerr("ERROR: No such channel: %d\n", priv->channel);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -731,7 +731,7 @@ FAR struct pwm_lowerhalf_s *kl_pwminitialize(int timer)
|
||||
#endif
|
||||
|
||||
default:
|
||||
pwmerr("No such timer configured\n");
|
||||
pwmerr("ERROR: No such timer configured\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -341,7 +341,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
|
||||
priv->frequency = frequency;
|
||||
priv->actual = actual;
|
||||
|
||||
spierr("Frequency %d->%d\n", frequency, actual);
|
||||
spiinfo("Frequency %d->%d\n", frequency, actual);
|
||||
return actual;
|
||||
}
|
||||
|
||||
|
@ -485,7 +485,7 @@ struct i2c_master_s *lpc11_i2cbus_initialize(int port)
|
||||
|
||||
if (port > 1)
|
||||
{
|
||||
err("lpc I2C Only support 0,1\n");
|
||||
i2cerr("ERROR: LPC I2C only supports ports 0 and 1\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ static void lpc11_dumpnvic(const char *msg, int irq)
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lpc11_nmi, lpc11_busfault, lpc11_usagefault, lpc11_pendsv,
|
||||
* lpc11_errmonitor, lpc11_pendsv, lpc11_reserved
|
||||
* lpc11_dbgmonitor, lpc11_pendsv, lpc11_reserved
|
||||
*
|
||||
* Description:
|
||||
* Handlers for various execptions. None are handled and all are fatal
|
||||
@ -137,7 +137,7 @@ static void lpc11_dumpnvic(const char *msg, int irq)
|
||||
static int lpc11_nmi(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! NMI received\n");
|
||||
_err("PANIC!!! NMI received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -145,7 +145,7 @@ static int lpc11_nmi(int irq, FAR void *context)
|
||||
static int lpc11_pendsv(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! PendSV received\n");
|
||||
_err("PANIC!!! PendSV received\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
@ -153,7 +153,7 @@ static int lpc11_pendsv(int irq, FAR void *context)
|
||||
static int lpc11_reserved(int irq, FAR void *context)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
err("PANIC!!! Reserved interrupt\n");
|
||||
_err("PANIC!!! Reserved interrupt\n");
|
||||
PANIC();
|
||||
return 0;
|
||||
}
|
||||
|
@ -630,7 +630,7 @@ static int up_interrupt(int irq, void *context)
|
||||
/* Read the line status register (LSR) to clear */
|
||||
|
||||
status = up_serialin(priv, LPC11_UART_LSR_OFFSET);
|
||||
info("LSR: %02x\n", status);
|
||||
_info("LSR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -638,7 +638,7 @@ static int up_interrupt(int irq, void *context)
|
||||
|
||||
default:
|
||||
{
|
||||
err("Unexpected IIR: %02x\n", status);
|
||||
_err("ERROR: Unexpected IIR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev,
|
||||
priv->frequency = frequency;
|
||||
priv->actual = actual;
|
||||
|
||||
spierr("Frequency %d->%d\n", frequency, actual);
|
||||
spiinfo("Frequency %d->%d\n", frequency, actual);
|
||||
return actual;
|
||||
}
|
||||
|
||||
@ -436,7 +436,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer,
|
||||
FAR uint8_t *ptr = (FAR uint8_t *)buffer;
|
||||
uint8_t data;
|
||||
|
||||
spierr("nwords: %d\n", nwords);
|
||||
spiinfo("nwords: %d\n", nwords);
|
||||
while (nwords)
|
||||
{
|
||||
/* Write the data to transmitted to the SPI Data Register */
|
||||
@ -483,7 +483,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer,
|
||||
{
|
||||
FAR uint8_t *ptr = (FAR uint8_t *)buffer;
|
||||
|
||||
spierr("nwords: %d\n", nwords);
|
||||
spiinfo("nwords: %d\n", nwords);
|
||||
while (nwords)
|
||||
{
|
||||
/* Write some dummy data to the SPI Data Register in order to clock the
|
||||
|
@ -449,7 +449,7 @@ static int timer_shutdown(FAR struct pwm_lowerhalf_s *dev)
|
||||
FAR struct lpc11_timer_s *priv = (FAR struct lpc11_timer_s *)dev;
|
||||
uint32_t pincfg;
|
||||
|
||||
pwmerr("TIM%d pincfg: %08x\n", priv->timid, priv->pincfg);
|
||||
pwminfo("TIM%d pincfg: %08x\n", priv->timid, priv->pincfg);
|
||||
|
||||
/* Make sure that the output has been stopped */
|
||||
|
||||
@ -505,7 +505,7 @@ static int timer_stop(FAR struct pwm_lowerhalf_s *dev)
|
||||
uint32_t regval;
|
||||
irqstate_t flags;
|
||||
|
||||
pwmerr("TIM%d\n", priv->timid);
|
||||
pwminfo("TIM%d\n", priv->timid);
|
||||
|
||||
/* Disable interrupts momentary to stop any ongoing timer processing and
|
||||
* to prevent any concurrent access to the reset register.
|
||||
@ -531,7 +531,7 @@ static int timer_stop(FAR struct pwm_lowerhalf_s *dev)
|
||||
|
||||
leave_critical_section(flags);
|
||||
|
||||
pwmerr("regaddr: %08x resetbit: %08x\n", regaddr, resetbit);
|
||||
pwminfo("regaddr: %08x resetbit: %08x\n", regaddr, resetbit);
|
||||
timer_dumpregs(priv, "After stop");
|
||||
return OK;
|
||||
}
|
||||
@ -555,12 +555,12 @@ static int timer_stop(FAR struct pwm_lowerhalf_s *dev)
|
||||
static int timer_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_TIMER
|
||||
#ifdef CONFIG_DEBUG_PWM_INFO
|
||||
FAR struct lpc11_timer_s *priv = (FAR struct lpc11_timer_s *)dev;
|
||||
|
||||
/* There are no platform-specific ioctl commands */
|
||||
|
||||
pwmerr("TIM%d\n", priv->timid);
|
||||
pwminfo("TIM%d\n", priv->timid);
|
||||
#endif
|
||||
return -ENOTTY;
|
||||
}
|
||||
@ -590,7 +590,7 @@ FAR struct pwm_lowerhalf_s *lpc11_timerinitialize(int timer)
|
||||
{
|
||||
FAR struct lpc11_timer_s *lower;
|
||||
|
||||
pwmerr("TIM%d\n", timer);
|
||||
pwminfo("TIM%d\n", timer);
|
||||
|
||||
switch (timer)
|
||||
{
|
||||
@ -604,7 +604,7 @@ FAR struct pwm_lowerhalf_s *lpc11_timerinitialize(int timer)
|
||||
#endif
|
||||
|
||||
default:
|
||||
pwmerr("No such timer configured\n");
|
||||
pwmerr("ERROR: No such timer configured\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -704,12 +704,12 @@ config NET_WOL
|
||||
---help---
|
||||
Enable Wake-up on Lan (not fully implemented).
|
||||
|
||||
config NET_REGDEBUG
|
||||
config LPC17_NET_REGDEBUG
|
||||
bool "Ethernet register-level debug"
|
||||
depends on DEBUG_FEATURES
|
||||
depends on DEBUG_NET_INFO
|
||||
default n
|
||||
---help---
|
||||
Enable low level register debug. Also needs CONFIG_DEBUG_FEATURES.
|
||||
Enable low level register debug. Also needs CONFIG_DEBUG_NET_INFO.
|
||||
|
||||
config NET_HASH
|
||||
bool "Hashing"
|
||||
@ -901,11 +901,11 @@ config LPC17_USBDEV_NOLED
|
||||
|
||||
config LPC17_USBDEV_REGDEBUG
|
||||
bool "Register level debug"
|
||||
depends on DEBUG_FEATURES
|
||||
depends on DEBUG_USB_INFO
|
||||
default n
|
||||
---help---
|
||||
Output detailed register-level USB device debug information. Requires
|
||||
also CONFIG_DEBUG_FEATURES.
|
||||
also CONFIG_DEBUG_USB_INFO.
|
||||
|
||||
endmenu
|
||||
|
||||
@ -978,10 +978,10 @@ config USBHOST_ISOC_DISABLE
|
||||
|
||||
config LPC17_USBHOST_REGDEBUG
|
||||
bool "Register level debug"
|
||||
depends on DEBUG_FEATURES
|
||||
depends on DEBUG_USB_INFO
|
||||
default n
|
||||
---help---
|
||||
Output detailed register-level USB host debug information. Requires
|
||||
also CONFIG_DEBUG_FEATURES.
|
||||
also CONFIG_DEBUG_USB_INFO.
|
||||
|
||||
endmenu
|
||||
|
@ -72,30 +72,6 @@
|
||||
# error "CONFIG_RTC_HIRES must NOT be set with this driver"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DEBUG_FEATURES
|
||||
# undef CONFIG_DEBUG_RTC
|
||||
#endif
|
||||
|
||||
/* Constants ************************************************************************/
|
||||
|
||||
/* Debug ****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_RTC
|
||||
# define rtcerr err
|
||||
# define rtcinfo info
|
||||
# define rtcllerr llerr
|
||||
# define rtcllinfo llinfo
|
||||
#else
|
||||
# define rtcerr(x...)
|
||||
# define rtcinfo(x...)
|
||||
# define rtcllerr(x...)
|
||||
# define rtcllinfo(x...)
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Private Types
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Private Data
|
||||
************************************************************************************/
|
||||
@ -131,12 +107,12 @@ volatile bool g_rtc_enabled = false;
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_RTC
|
||||
#ifdef CONFIG_DEBUG_RTC_INFO
|
||||
static void rtc_dumpregs(FAR const char *msg)
|
||||
{
|
||||
rtcllerr("%s:\n", msg);
|
||||
rtcllerr(" DOM : %08x\n", (getreg32(LPC17_RTC_DOM) & RTC_DOM_MASK));
|
||||
rtcllerr(" DOW : %08x\n", (getreg32(LPC17_RTC_DOW) & RTC_DOW_MASK));
|
||||
rtcinfo("%s:\n", msg);
|
||||
rtcinfo(" DOM : %08x\n", (getreg32(LPC17_RTC_DOM) & RTC_DOM_MASK));
|
||||
rtcinfo(" DOW : %08x\n", (getreg32(LPC17_RTC_DOW) & RTC_DOW_MASK));
|
||||
}
|
||||
#else
|
||||
# define rtc_dumpregs(msg)
|
||||
@ -156,16 +132,16 @@ static void rtc_dumpregs(FAR const char *msg)
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_RTC
|
||||
#ifdef CONFIG_DEBUG_RTC_INFO
|
||||
static void rtc_dumptime(FAR struct tm *tp, FAR const char *msg)
|
||||
{
|
||||
rtcllerr("%s:\n", msg);
|
||||
rtcllerr(" tm_sec: %08x\n", tp->tm_sec);
|
||||
rtcllerr(" tm_min: %08x\n", tp->tm_min);
|
||||
rtcllerr(" tm_hour: %08x\n", tp->tm_hour);
|
||||
rtcllerr(" tm_mday: %08x\n", tp->tm_mday);
|
||||
rtcllerr(" tm_mon: %08x\n", tp->tm_mon);
|
||||
rtcllerr(" tm_year: %08x\n", tp->tm_year);
|
||||
rtcinfo("%s:\n", msg);
|
||||
rtcinfo(" tm_sec: %08x\n", tp->tm_sec);
|
||||
rtcinfo(" tm_min: %08x\n", tp->tm_min);
|
||||
rtcinfo(" tm_hour: %08x\n", tp->tm_hour);
|
||||
rtcinfo(" tm_mday: %08x\n", tp->tm_mday);
|
||||
rtcinfo(" tm_mon: %08x\n", tp->tm_mon);
|
||||
rtcinfo(" tm_year: %08x\n", tp->tm_year);
|
||||
}
|
||||
#else
|
||||
# define rtc_dumptime(tp, msg)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user