[console][panic] slight tweak to where the panic shell define is set

Tweak the default platform_halt to idle the core if fully wedged.
This commit is contained in:
Travis Geiselbrecht
2020-05-10 20:03:31 -07:00
parent 445283fd8c
commit 95cf798c83
4 changed files with 16 additions and 10 deletions

View File

@@ -47,16 +47,12 @@ typedef struct _cmd_block {
*/
#if WITH_LIB_CONSOLE
/* enable the panic shell if we're being built */
#if !defined(ENABLE_PANIC_SHELL) && PLATFORM_SUPPORTS_PANIC_SHELL
#define ENABLE_PANIC_SHELL 1
#endif
#define STATIC_COMMAND_START static const cmd _cmd_list[] = {
#define STATIC_COMMAND_END(name) }; cmd_block _cmd_block_##name __ALIGNED(sizeof(void *)) __SECTION(".commands") = \
{ NULL, sizeof(_cmd_list) / sizeof(_cmd_list[0]), _cmd_list }
/* same as above but with a suffixed name to make the list unique within the file */
#define STATIC_COMMAND_START_NAMED(name) static const cmd _cmd_list_##name[] = {
#define STATIC_COMMAND_END_NAMED(name) }; cmd_block _cmd_block_##name __ALIGNED(sizeof(void *)) __SECTION(".commands") = \