arc: if printk is disabled, do not set variables
if printk is disabled, the variables will be unused and we will get compiler warning. Change-Id: I5dad791ae89d7a8c98f9e4660da472ef0caacc92 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
fd0bd160e6
commit
66b55a3f7c
1 changed files with 2 additions and 0 deletions
|
@ -73,6 +73,7 @@
|
|||
void _FaultDump(const NANO_ESF *esf, int fault)
|
||||
{
|
||||
ARG_UNUSED(esf);
|
||||
#ifdef CONFIG_PRINTK
|
||||
uint32_t exc_addr = _arc_v2_aux_reg_read(_ARC_V2_EFA);
|
||||
uint32_t ecr = _arc_v2_aux_reg_read(_ARC_V2_ECR);
|
||||
|
||||
|
@ -81,6 +82,7 @@ void _FaultDump(const NANO_ESF *esf, int fault)
|
|||
_ARC_V2_ECR_CODE(ecr),
|
||||
_ARC_V2_ECR_PARAMETER(ecr));
|
||||
PR_EXC("Address 0x%x\n", exc_addr);
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_FAULT_DUMP */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue