summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-07-23 13:05:45 -0700
committerChromeBot <chrome-bot@google.com>2013-07-23 17:37:53 -0700
commitcb1f7306b34507b3d9481cd4327271b2227747b8 (patch)
treea6862df1fbcfa4432743de4cd9ae0f1b64e3c344 /core
parenta1699727a83758defb2e80deab59d34a18bfe581 (diff)
downloadchrome-ec-cb1f7306b34507b3d9481cd4327271b2227747b8.tar.gz
Clean up debug config options
All of these were defined on all but a few platforms, and those explicitly #undef them. So define them as enabled by default in config.h so the board.h files are cleaner. No functional changes; just rearranging/renaming config constants. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms; FEATURES=test emerge-falco chromeos-ec Change-Id: I1201a1472ae29641e9e219c2a0347691ca64cd28 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/63102 Reviewed-by: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m/panic.c10
-rw-r--r--core/cortex-m/task.c4
2 files changed, 5 insertions, 9 deletions
diff --git a/core/cortex-m/panic.c b/core/cortex-m/panic.c
index 85d0701b21..9e82f241d0 100644
--- a/core/cortex-m/panic.c
+++ b/core/cortex-m/panic.c
@@ -130,7 +130,7 @@ static int32_t is_frame_in_handler_stack(const uint32_t exc_return)
return (exc_return & 0xf) == 1 || (exc_return & 0xf) == 9;
}
-#ifdef CONFIG_PANIC_HELP
+#ifdef CONFIG_DEBUG_EXCEPTIONS
/* Names for each of the bits in the mmfs register, starting at bit 0 */
static const char * const mmfs_name[32] = {
"Instruction access violation",
@@ -322,7 +322,7 @@ static void panic_show_process_stack(const struct panic_data *pdata)
panic_printf("\nBad psp");
}
}
-#endif /* CONFIG_PANIC_HELP */
+#endif /* CONFIG_DEBUG_EXCEPTIONS */
/**
* Display a message and reboot
@@ -360,7 +360,7 @@ static void panic_print(const struct panic_data *pdata)
print_reg(14, sregs, 5);
print_reg(15, sregs, 6);
-#ifdef CONFIG_PANIC_HELP
+#ifdef CONFIG_DEBUG_EXCEPTIONS
panic_show_extra(pdata);
#endif
}
@@ -400,7 +400,7 @@ void report_panic(void)
pdata->dfsr = CPU_NVIC_DFSR;
panic_print(pdata);
-#ifdef CONFIG_PANIC_HELP
+#ifdef CONFIG_DEBUG_EXCEPTIONS
panic_show_process_stack(pdata);
/* TODO: Dump main stack contents as well if the exception happened
* in a handler's context. */
@@ -442,7 +442,7 @@ void ignore_bus_fault(int ignored)
bus_fault_ignored = ignored;
}
-#ifdef CONFIG_ASSERT_HELP
+#ifdef CONFIG_DEBUG_ASSERT_REBOOTS
void panic_assert_fail(const char *msg, const char *func, const char *fname,
int linenum)
{
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c
index bd5736a3ae..75ed85204b 100644
--- a/core/cortex-m/task.c
+++ b/core/cortex-m/task.c
@@ -515,8 +515,6 @@ void task_print_list(void)
}
}
-#ifdef CONFIG_DEBUG
-
int command_task_info(int argc, char **argv)
{
#ifdef CONFIG_TASK_PROFILING
@@ -568,8 +566,6 @@ DECLARE_CONSOLE_COMMAND(taskready, command_task_ready,
"Print/set ready tasks",
NULL);
-#endif /* CONFIG_DEBUG */
-
void task_pre_init(void)
{
uint32_t *stack_next = (uint32_t *)task_stacks;