From e428f3852acbc46e1e82dc13f85a9af3ec9c5555 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 24 Jul 2018 05:54:30 -0600 Subject: [PATCH] arm/Kconfig: Add spurious 'invisible' configuration settings to avoid prompting users for hardfault or memfault debug on systems where such debug is not available. --- arch/arm/Kconfig | 19 +++++++++++++++++-- arch/arm/src/armv7-m/up_memfault.c | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 960c05daad..872c1ac5d5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -441,6 +441,7 @@ config ARCH_CORTEXM0 default n select ARCH_HAVE_IRQPRIO select ARCH_HAVE_RESET + select ARCH_HAVE_HARDFAULT_DEBUG config ARCH_CORTEXM23 bool @@ -454,6 +455,8 @@ config ARCH_CORTEXM3 select ARCH_HAVE_LAZYFPU select ARCH_HAVE_HIPRI_INTERRUPT select ARCH_HAVE_RESET + select ARCH_HAVE_HARDFAULT_DEBUG + select ARCH_HAVE_MEMFAULT_DEBUG config ARCH_CORTEXM33 bool @@ -467,6 +470,8 @@ config ARCH_CORTEXM4 select ARCH_HAVE_LAZYFPU select ARCH_HAVE_HIPRI_INTERRUPT select ARCH_HAVE_RESET + select ARCH_HAVE_HARDFAULT_DEBUG + select ARCH_HAVE_MEMFAULT_DEBUG config ARCH_CORTEXM7 bool @@ -478,6 +483,8 @@ config ARCH_CORTEXM7 select ARCH_HAVE_HIPRI_INTERRUPT select ARCH_HAVE_RESET select ARCH_HAVE_COHERENT_DCACHE if ELF || MODULE + select ARCH_HAVE_HARDFAULT_DEBUG + select ARCH_HAVE_MEMFAULT_DEBUG config ARCH_CORTEXA5 bool @@ -726,19 +733,27 @@ config ARCH_ROMPGTABLE ---help--- Support a fixed memory mapping use a (read-only) page table in ROM/FLASH. +config ARCH_HAVE_HARDFAULT_DEBUG + bool + default n + config DEBUG_HARDFAULT bool "Verbose Hard-Fault Debug" default n - depends on DEBUG_FEATURES && (ARCH_CORTEXM0 || ARCH_CORTEXM3 || ARCH_CORTEXM4 || ARCH_CORTEXM7) + depends on ARCH_HAVE_HARDFAULT_DEBUG && DEBUG_FEATURES ---help--- Enables verbose debug output when a hard fault is occurs. This verbose output is sometimes helpful when debugging difficult hard fault problems, but may be more than you typically want to see. +config ARCH_HAVE_MEMFAULT_DEBUG + bool + default n + config DEBUG_MEMFAULT bool "Verbose Mem-Fault Debug" default n - depends on DEBUG_FEATURES && ARCH_USE_MPU + depends on ARCH_HAVE_MEMFAULT_DEBUG && DEBUG_FEATURES && ARCH_USE_MPU ---help--- Enables verbose debug output when a mem fault is occurs. This verbose output is sometimes helpful when debugging difficult mem fault problems, diff --git a/arch/arm/src/armv7-m/up_memfault.c b/arch/arm/src/armv7-m/up_memfault.c index ee90cef710..faf3028bfe 100644 --- a/arch/arm/src/armv7-m/up_memfault.c +++ b/arch/arm/src/armv7-m/up_memfault.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/armv7-m/up_memfault.c * - * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2013, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without