diff options
| author | danicampora <danicampora@gmail.com> | 2015-02-25 22:38:33 +0100 |
|---|---|---|
| committer | danicampora <danicampora@gmail.com> | 2015-02-25 23:17:17 +0100 |
| commit | 7a074a14ced0c9ea890793aa7dc43c896cfdf9b9 (patch) | |
| tree | 02fee25f9d1375cde648ff82c87d0d0eacd2610e /cc3200/misc/FreeRTOSHooks.c | |
| parent | 8a5aee103d0741efbbcf3fa7d0d0b3d2100eddb2 (diff) | |
cc3200: Implement safe boot pin and system led behaviour.
The safe boot pin, when pulled high during reset rolls back the
firmware to the "factory" image and skips execution of 'boot.py'
and 'main.py'. This is useful to recover from a crash condition.
The system led is used mostly to signal errors.
Diffstat (limited to 'cc3200/misc/FreeRTOSHooks.c')
| -rw-r--r-- | cc3200/misc/FreeRTOSHooks.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cc3200/misc/FreeRTOSHooks.c b/cc3200/misc/FreeRTOSHooks.c index 4268980d6..9383000b0 100644 --- a/cc3200/misc/FreeRTOSHooks.c +++ b/cc3200/misc/FreeRTOSHooks.c @@ -35,6 +35,7 @@ #include "pybuart.h" #include "osi.h" #include "pybwdt.h" +#include "mperror.h" //***************************************************************************** @@ -66,15 +67,13 @@ void vApplicationIdleHook (void) void vApplicationMallocFailedHook (void) { #ifdef DEBUG - // Break into the debugger + // break into the debugger __asm volatile ("bkpt #0 \n"); - - printf("\nFATAL ERROR: FreeRTOS malloc failed!\n"); #endif for ( ; ; ) { - // TODO: Blink the BLD + __fatal_error("FreeRTOS malloc failed!"); } } @@ -92,13 +91,11 @@ void vApplicationStackOverflowHook (OsiTaskHandle *pxTask, signed char *pcTaskNa #ifdef DEBUG // Break into the debugger __asm volatile ("bkpt #0 \n"); - - printf("\nFATAL ERROR: Application: %s stack overflow!\n", pcTaskName); #endif for ( ; ; ) { - // TODO: Blink the BLD + __fatal_error("Stack overflow!"); } } |
