handling failed freeRTOS assertion as panic

This commit is contained in:
2024-06-25 13:19:31 +02:00
parent c9a81c025f
commit a7336c7f75
2 changed files with 31 additions and 1 deletions

View File

@ -241,6 +241,7 @@ void vApplicationMallocFailedHook(void) {
timers, and semaphores. The size of the FreeRTOS heap is set by the
configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */
taskDISABLE_INTERRUPTS();
//TODO panic
for (;;)
;
}
@ -254,6 +255,7 @@ void vApplicationStackOverflowHook(TaskHandle_t pxTask, char *pcTaskName) {
configCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
function is called if a stack overflow is detected. */
taskDISABLE_INTERRUPTS();
//TODO panic
for (;;)
;
}
@ -277,7 +279,14 @@ void vApplicationIdleHook(void) {
}
/*-----------------------------------------------------------*/
void rust_assert_called(const char *pcFile, unsigned long ulLine);
void vAssertCalled(const char *pcFile, unsigned long ulLine) {
rust_assert_called(pcFile, ulLine);
volatile unsigned long ul = 0;
(void)pcFile;