ARMv7-M/ARMv6-M: Review last PR. Rename CONFIG_DEBUG_HARDFAULT to OHNFIG_DEBUG_HARDFAULT_ALERT for consistency.
This commit is contained in:
parent
382a829657
commit
c14d97a921
@ -744,27 +744,31 @@ config ARCH_ROMPGTABLE
|
|||||||
default n
|
default n
|
||||||
depends on ARCH_USE_MMU
|
depends on ARCH_USE_MMU
|
||||||
---help---
|
---help---
|
||||||
Support a fixed memory mapping use a (read-only) page table in ROM/FLASH.
|
Support a fixed memory mapping use a (read-only) page table in
|
||||||
|
ROM/FLASH.
|
||||||
|
|
||||||
config ARCH_HAVE_HARDFAULT_DEBUG
|
config ARCH_HAVE_HARDFAULT_DEBUG
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config DEBUG_HARDFAULT
|
config DEBUG_HARDFAULT_ALERT
|
||||||
bool "Verbose Hard-Fault Debug"
|
bool "Hard-Fault Alert Debug"
|
||||||
default n
|
default n
|
||||||
depends on ARCH_HAVE_HARDFAULT_DEBUG && DEBUG_FEATURES
|
depends on ARCH_HAVE_HARDFAULT_DEBUG && DEBUG_ALERT
|
||||||
---help---
|
---help---
|
||||||
Enables verbose debug output when a hard fault is occurs. This verbose
|
Enables debug alert output to the SYSLOG when a hard fault
|
||||||
output is sometimes helpful when debugging difficult hard fault problems,
|
occurs. This output is sometimes helpful when debugging difficult
|
||||||
but may be more than you typically want to see.
|
hard fault problems.
|
||||||
|
|
||||||
config DEBUG_HARDFAULT_INFO
|
config DEBUG_HARDFAULT_INFO
|
||||||
bool "Hard-Fault Informational Output"
|
bool "Hard-Fault Informational Output"
|
||||||
default n
|
default n
|
||||||
depends on ARCH_HAVE_HARDFAULT_DEBUG && DEBUG_FEATURES && DEBUG_INFO
|
depends on ARCH_HAVE_HARDFAULT_DEBUG && DEBUG_INFO
|
||||||
---help---
|
---help---
|
||||||
Enable hard fault informational output to SYSLOG.
|
Enables informational alert output to the SYSLOG when a hard fault
|
||||||
|
occurs. This output is sometimes helpful when debugging difficult
|
||||||
|
hard fault problems but may be more than you want to see in some
|
||||||
|
cases.
|
||||||
|
|
||||||
config ARCH_HAVE_MEMFAULT_DEBUG
|
config ARCH_HAVE_MEMFAULT_DEBUG
|
||||||
bool
|
bool
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/armv6-m/up_hardfault.c
|
* arch/arm/src/armv6-m/up_hardfault.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2013, 2018 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -54,7 +54,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_HARDFAULT
|
#ifdef CONFIG_DEBUG_HARDFAULT_ALERT
|
||||||
# define hfalert(format, ...) _alert(format, ##__VA_ARGS__)
|
# define hfalert(format, ...) _alert(format, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
# define hfalert(x...)
|
# define hfalert(x...)
|
||||||
@ -125,7 +125,7 @@ int up_hardfault(int irq, FAR void *context, FAR void *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_DEBUG_HARDFAULT)
|
#if defined(CONFIG_DEBUG_HARDFAULT_ALERT)
|
||||||
/* Dump some hard fault info */
|
/* Dump some hard fault info */
|
||||||
|
|
||||||
hfalert("\nHard Fault:\n");
|
hfalert("\nHard Fault:\n");
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/armv7-m/up_hardfault.c
|
* arch/arm/src/armv7-m/up_hardfault.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2013, 2016 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2013, 2016, 2018 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -59,7 +59,7 @@
|
|||||||
* interfere with context switching!
|
* interfere with context switching!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_HARDFAULT
|
#ifdef CONFIG_DEBUG_HARDFAULT_ALERT
|
||||||
# define hfalert(format, ...) _alert(format, ##__VA_ARGS__)
|
# define hfalert(format, ...) _alert(format, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
# define hfalert(x...)
|
# define hfalert(x...)
|
||||||
@ -71,7 +71,6 @@
|
|||||||
# define hfinfo(x...)
|
# define hfinfo(x...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define INSN_SVC0 0xdf00 /* insn: svc 0 */
|
#define INSN_SVC0 0xdf00 /* insn: svc 0 */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -89,7 +88,7 @@
|
|||||||
|
|
||||||
int up_hardfault(int irq, FAR void *context, FAR void *arg)
|
int up_hardfault(int irq, FAR void *context, FAR void *arg)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_DEBUG_HARDFAULT) || !defined(CONFIG_ARMV7M_USEBASEPRI)
|
#if defined(CONFIG_DEBUG_HARDFAULT_ALERT) || !defined(CONFIG_ARMV7M_USEBASEPRI)
|
||||||
uint32_t *regs = (uint32_t *)context;
|
uint32_t *regs = (uint32_t *)context;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user