|
2 | 2 | // SPDX-License-Identifier: MIT |
3 | 3 |
|
4 | 4 | #pragma once |
| 5 | + |
| 6 | +#ifndef FREERTOS_CONFIG_H |
| 7 | +/** |
| 8 | + * This macro would usually be defined in FreeRTOSConfig.h, which we do not |
| 9 | + * implement here because we do not use the FreeRTOS core. We define it here |
| 10 | + * because FreeRTOS+TCP refuses to compile without. |
| 11 | + */ |
| 12 | +#define FREERTOS_CONFIG_H |
| 13 | +#endif |
| 14 | + |
| 15 | +/** |
| 16 | + * FreeRTOS+TCP errno codes. See the header documentation. |
| 17 | + */ |
| 18 | +#include <FreeRTOS_errno.h> |
| 19 | + |
| 20 | +/** |
| 21 | + * `INCLUDE_*` macros have no effect here since we do not use the FreeRTOS |
| 22 | + * core, however FreeRTOS+TCP refuses to compile without defining these. |
| 23 | + */ |
| 24 | +#define INCLUDE_vTaskDelay 1 |
| 25 | +#define INCLUDE_xTaskGetCurrentTaskHandle 1 |
| 26 | + |
| 27 | +/** |
| 28 | + * Scheduling-related settings have no impact since we do not use the FreeRTOS |
| 29 | + * core, however FreeRTOS+TCP refuses to compile without defining these. |
| 30 | + */ |
| 31 | +#define ipconfigIP_TASK_PRIORITY 0 |
| 32 | +#define configMAX_PRIORITIES 1 |
| 33 | +#define configMINIMAL_STACK_SIZE 128 |
| 34 | + |
| 35 | +/** |
| 36 | + * Enable counting semaphore functionality in the build, as this is necessary |
| 37 | + * to build FreeRTOS+TCP. |
| 38 | + */ |
| 39 | +#define configUSE_COUNTING_SEMAPHORES 1 |
| 40 | + |
5 | 41 | /** |
6 | 42 | * Macro defined to flag that this file has been included. |
7 | 43 | */ |
|
49 | 85 | #define xPortGetMinimumEverFreeHeapSize() 0 |
50 | 86 | #define xPortGetFreeHeapSize() 0 |
51 | 87 |
|
| 88 | +// Use dynamic allocation |
| 89 | +#define configSUPPORT_DYNAMIC_ALLOCATION 1 |
| 90 | + |
52 | 91 | // We don't support static allocation |
53 | 92 | #define configSUPPORT_STATIC_ALLOCATION 0 |
54 | 93 |
|
|
0 commit comments