OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 #include <FreeRTOS.h> | 5 #include <FreeRTOS.h> |
6 #include <task.h> | 6 #include <task.h> |
7 | 7 |
8 #include "src/shared/assert.h" | 8 #include "src/shared/assert.h" |
9 | 9 |
10 // Hook called by FreeRTOS when a stack overflow is detected. | 10 // Hook called by FreeRTOS when a stack overflow is detected. |
11 extern "C" void vApplicationStackOverflowHook( | 11 extern "C" void vApplicationStackOverflowHook( |
12 xTaskHandle xTask, signed char *pcTaskName) { | 12 xTaskHandle xTask, signed char *pcTaskName) { |
13 FATAL("Stack overflow.\n"); | 13 FATAL("Stack overflow.\n"); |
14 } | 14 } |
15 | 15 |
16 // Hook called by FreeRTOS when allocation failed. | 16 // Hook called by FreeRTOS when allocation failed. |
17 extern "C" void vApplicationMallocFailedHook() { | 17 extern "C" void vApplicationMallocFailedHook() { |
18 FATAL("Out of memory.\n"); | 18 FATAL("Out of memory.\n"); |
19 } | 19 } |
OLD | NEW |