summaryrefslogtreecommitdiff
path: root/cc3200/misc/FreeRTOSHooks.c
diff options
context:
space:
mode:
authordanicampora <danicampora@gmail.com>2015-02-25 22:38:33 +0100
committerdanicampora <danicampora@gmail.com>2015-02-25 23:17:17 +0100
commit7a074a14ced0c9ea890793aa7dc43c896cfdf9b9 (patch)
tree02fee25f9d1375cde648ff82c87d0d0eacd2610e /cc3200/misc/FreeRTOSHooks.c
parent8a5aee103d0741efbbcf3fa7d0d0b3d2100eddb2 (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.c11
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!");
}
}