You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/27 11:19:26 UTC

[incubator-nuttx] 19/48: arch/arm/src/stm32/stm32_irq.c: Fix syslog formats

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 78bf42c91ff8583e0b0f37e847ccd1a70f9f3b45
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 11:20:45 2020 +0900

    arch/arm/src/stm32/stm32_irq.c: Fix syslog formats
---
 arch/arm/src/stm32/stm32_irq.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_irq.c b/arch/arm/src/stm32/stm32_irq.c
index 8ee0506..28b24b0 100644
--- a/arch/arm/src/stm32/stm32_irq.c
+++ b/arch/arm/src/stm32/stm32_irq.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <debug.h>
 
@@ -173,7 +174,8 @@ static int stm32_nmi(int irq, FAR void *context, FAR void *arg)
 static int stm32_busfault(int irq, FAR void *context, FAR void *arg)
 {
   up_irq_save();
-  _err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS));
+  _err("PANIC!!! Bus fault received: %08" PRIx32 "\n",
+       getreg32(NVIC_CFAULTS));
   PANIC();
   return 0;
 }
@@ -181,7 +183,8 @@ static int stm32_busfault(int irq, FAR void *context, FAR void *arg)
 static int stm32_usagefault(int irq, FAR void *context, FAR void *arg)
 {
   up_irq_save();
-  _err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS));
+  _err("PANIC!!! Usage fault received: %08" PRIx32 "\n",
+       getreg32(NVIC_CFAULTS));
   PANIC();
   return 0;
 }