arm: exc_manage: fix printk format code usage
Change-Id: I1e3f313f9c653dc2eec2ea02f16437f6c60ef304 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
ba61200a8f
commit
1cda7554ca
1 changed files with 16 additions and 12 deletions
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <nanokernel.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <inttypes.h>
|
||||
#include <misc/__assert.h>
|
||||
#include <toolchain.h>
|
||||
#include <sections.h>
|
||||
|
@ -70,21 +71,24 @@ FUNC_ALIAS(sys_exc_connect, nanoCpuExcConnect, void);
|
|||
#include <misc/printk.h>
|
||||
void sys_exc_esf_dump(NANO_ESF *esf)
|
||||
{
|
||||
printk("r0/a1: %x ", esf->a1);
|
||||
printk("r1/a2: %x ", esf->a2);
|
||||
printk("r2/a3: %x\n", esf->a3);
|
||||
printk("r3/a4: %x ", esf->a4);
|
||||
printk("r12/ip: %x ", esf->ip);
|
||||
printk("r14/lr: %x\n", esf->lr);
|
||||
printk("r15/pc: %x ", esf->pc);
|
||||
printk("xpsr: %x\n", esf->xpsr);
|
||||
printk("r0/a1: %" PRIx32 " ", esf->a1);
|
||||
printk("r1/a2: %" PRIx32 " ", esf->a2);
|
||||
printk("r2/a3: %" PRIx32 "\n", esf->a3);
|
||||
printk("r3/a4: %" PRIx32 " ", esf->a4);
|
||||
printk("r12/ip: %" PRIx32 " ", esf->ip);
|
||||
printk("r14/lr: %" PRIx32 "\n", esf->lr);
|
||||
printk("r15/pc: %" PRIx32 " ", esf->pc);
|
||||
printk("xpsr: %" PRIx32 "\n", esf->xpsr);
|
||||
#ifdef CONFIG_FLOAT
|
||||
for (int i = 0; i < 16; i += 4) {
|
||||
printk("s[%d]: %x s[%d]: %x s[%d]: %x s[%d]: %x\n",
|
||||
i, esf->s[i], i + 1, esf->s[i + 1],
|
||||
i + 2, esf->s[i + 2], i + 3, esf->s[i + 3]);
|
||||
printk("s[%d]: %" PRIx32 " s[%d]: %" PRIx32 " s[%d]: %"
|
||||
PRIx32 " s[%d]: %" PRIx32 "\n",
|
||||
i, (uint32_t)esf->s[i],
|
||||
i + 1, (uint32_t)esf->s[i + 1],
|
||||
i + 2, (uint32_t)esf->s[i + 2],
|
||||
i + 3, (uint32_t)esf->s[i + 3]);
|
||||
}
|
||||
printk("fpscr: %x\n", esf->fpscr);
|
||||
printk("fpscr: %" PRIx32 "\n", esf->fpscr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue