目录
1 Constants that describe the hardware and memory usage
4 Constants that build features in or out
5 Constants provided for debugging and optimisation assistance
6 Constants that define which hook (callback) functions should be used
7 Port specific configuration(该配置至对ARMv8M起作用)
1 Constants that describe the hardware and memory usage
configCPU_CLOCK_HZ | SystemCoreClock | CPU时钟频率 |
configTICK_RATE_HZ | 1000 | Sets the tick interrupt frequency. The value is specified in Hz. |
configTOTAL_HEAP_SIZE | 4096 | The kernel allocates memory from the heap each time a task, queue or semaphore is created(栈大小) |
configMINIMAL_STACK_SIZE | 256 | Sets the size of the stack allocated to the Idle task. |
configSUPPORT_DYNAMIC_ALLOCATION | 1 | RTOS objects can be created using RAM that is automatically allocated from the FreeRTOS heap(动态创建对象) |
configSUPPORT_STATIC_ALLOCATION | 0 | then RTOS objects can be created using RAM provided by the application writer(静态创建对象) |
2 Constants related to the behaviour or the scheduler
configMAX_PRIORITIES | 5 | Sets the maximum priority that can be assigned to a task |
configUSE_PREEMPTION | 1 | 1:cause the pre-emptive scheduler to be used(抢占式调度器) 0:cause the co-operative scheduler to be used(协作式调度器) |
configUSE_TIME_SLICING | 1 | switch between tasks of equal priority on every RTOS tick interrupt( 使能时间片调度) |
configIDLE_SHOULD_YIELD | 1 | 空闲任务放弃 CPU 使用权给其他同优先级的用户任务 |
configMAX_TASK_NAME_LEN | 10 | Sets the maximum number of characters that can be used for the name of a task |
configUSE_16_BIT_TICKS | 0 | 1:TickType_t is defined to be an unsigned 16-bit type 0:TickType_t is defined to be an unsigned 32-bit type |
3 Software timer definitions
configUSE_TIMERS | 1 | 使能软件定时器 |
configTIMER_TASK_PRIORITY | 2 | 设置软件定时优先级 |
configTIMER_QUEUE_LENGTH | 5 | 软件定时器队列长度 |
configTIMER_TASK_STACK_DEPTH | configMINIMAL_STACK_SIZE * 2 | 软件定时器堆栈大小 |
4 Constants that build features in or out
configUSE_MUTEXES | 1 | 使能互斥量 |
configUSE_RECURSIVE_MUTEXES | 1 | 使能递归互斥量 |
configUSE_COUNTING_SEMAPHORES | 1 | 使能信号量 |
configUSE_QUEUE_SETS | 1 | 使能队列 |
configUSE_TASK_NOTIFICATIONS | 1 | 使能任务通知 |
configUSE_TRACE_FACILITY | 1 | 启用可视化跟踪调试 |
configUSE_TICKLESS_IDLE | 1 | 使能低功耗 tickless 模式 |
configUSE_APPLICATION_TASK_TAG | 0 | 配置是否使用任务标签 |
configUSE_NEWLIB_REENTRANT | 0 | 配置使用Newlib库 |
configUSE_CO_ROUTINES | 0 | Co-routines are light weight tasks that save RAM by sharing a stack, but have limitedfunctionality |
5 Constants provided for debugging and optimisation assistance
configCHECK_FOR_STACK_OVERFLOW | 0 | 大于 0 时启用堆栈溢出检测功能,如果使用此功能用户必须提供一个栈溢出钩子函数,如果使用的话此值可以为 1 或者 2,因为有两种栈溢出检测方法 |
configQUEUE_REGISTRY_SIZE | 0 | 设置可以注册的信号量和消息队列个数 |
configASSERT( x ) | 断言 |
6 Constants that define which hook (callback) functions should be used
configUSE_IDLE_HOOK | 0 | 空闲任务钩子函数void vApplicationIdleHook(void ) |
configUSE_TICK_HOOK | 0 | 时间片钩子函数void vApplicationTickHook(void ) |
configUSE_DAEMON_TASK_STARTUP_HOOK | 0 | 任务启动钩子函数 |
configUSE_MALLOC_FAILED_HOOK | 0 | 内存分配失败钩子函数 |
7 Port specific configuration(该配置至对ARMv8M起作用)
configENABLE_MPU | 0 | 配置是否使用MPU |
configENABLE_FPU | 1 | 配置是否使用FPU |
configENABLE_TRUSTZONE | 1 | |
configMINIMAL_SECURE_STACK_SIZE | 1024 | |
configRUN_FREERTOS_SECURE_ONLY | 0 |
8 API function config
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
#define INCLUDE_xTaskGetIdleTaskHandle 1
#define INCLUDE_xTaskAbortDelay 1
#define INCLUDE_xQueueGetMutexHolder 1
#define INCLUDE_xSemaphoreGetMutexHolder 1
#define INCLUDE_xTaskGetHandle 1
#define INCLUDE_uxTaskGetStackHighWaterMark 1
#define INCLUDE_uxTaskGetStackHighWaterMark2 1
#define INCLUDE_eTaskGetState 1
#define INCLUDE_xTaskResumeFromISR 1
#define INCLUDE_xTimerPendFunctionCall 1
#define INCLUDE_xTaskGetSchedulerState 1
#define INCLUDE_xTaskGetCurrentTaskHandle 1