~aleteoryx/muditaos

8bbb57776aa05eae541e6fdf288fdc9df11f6841 — Artur Śleszyński 5 years ago f609d67
[EGD-4115] Implement FreeRTOS configASSERT macro

The configASSERT() macro was modified to use assert instead of
an infinite loop.
1 files changed, 4 insertions(+), 1 deletions(-)

M module-os/FreeRTOS/include/FreeRTOSConfig.h
M module-os/FreeRTOS/include/FreeRTOSConfig.h => module-os/FreeRTOS/include/FreeRTOSConfig.h +4 -1
@@ 37,6 37,7 @@
 *
 * See http://www.freertos.org/a00110.html.
 *----------------------------------------------------------*/
#include <assert.h>
#include <stdint.h>
#include "log/log.hpp"



@@ 111,7 112,9 @@ extern uint32_t SystemCoreClock;
#define configTIMER_TASK_STACK_DEPTH            (1024)

/* Define to trap errors during development. */
#define configASSERT(x) if( (x) == 0 ) { taskDISABLE_INTERRUPTS(); LOG_FATAL("Assert!"); while(1){};}
#ifndef NDEBUG
#   define configASSERT(x)                      assert(x)
#endif


/* Optional functions - most linkers will remove unused functions anyway. */