Files
luban-lite-t3e-pro/kernel/freertos/Kconfig.kernel
刘可亮 9f7ba67007 v1.0.3
2024-01-27 08:47:24 +08:00

299 lines
11 KiB
Plaintext

menu "FreeRTOS Kernel"
menu "Tasks"
config FREERTOS_PREEMPTIVE_EN
bool "Enable Preemptive"
default y
config FREERTOS_TICK_RATE_HZ
int "Frequency of the RTOS tick interrupt (Hz)"
default 500
---help---
The tick interrupt is used to measure time. Therefore a higher tick frequency means time can
be measured to a higher resolution. However, a high tick frequency also means that the RTOS
kernel will use more CPU time so be less efficient. The RTOS demo applications all use a tick
rate of 1000Hz. This is used to test the RTOS kernel and is higher than would normally be
required.
More than one task can share the same priority. The RTOS scheduler will share processor time
between tasks of the same priority by switching between the tasks during each RTOS tick. A high
tick rate frequency will therefore also have the effect of reducing the 'time slice' given to
each task.
config FREERTOS_MAX_PRIORITIES
int "Number of available priorities"
default 200
---help---
Any number of tasks can share the same priority. Co-routines are prioritised separately -
see configMAX_CO_ROUTINE_PRIORITIES.
Each available priority consumes RAM within the RTOS kernel so this value should not
be set any higher than actually required by your application.
config FREERTOS_MINIMAL_STACK_SIZE
int "IDLE task stack size (words)"
default 1024
---help---
The size of the stack used by the idle task. Generally this should not be reduced from
the value set in the FreeRTOSConfig.h file provided with the demo application for the port
you are using.
Like the stack size parameter to the xTaskCreate() function, the stack size is specified
in words, not bytes. If each item placed on the stack is 32-bits, then a stack size of 100
means 400 bytes (each 32-bit stack item consuming 4 bytes).
config FREERTOS_MAX_TASK_NAME_LEN
int "Maximum task name length"
default 12
---help---
The maximum permissible length of the descriptive name given to a task when the task is
created. The length is specified in the number of characters including the NULL termination
byte.
config FREERTOS_IDLE_SHOULD_YIELD
bool "Idle task should yield"
depends on FREERTOS_PREEMPTIVE_EN
default y
---help---
Tasks that share the same priority will time slice. Assuming none of the tasks get preempted,
it might be assumed that each task of at a given priority will be allocated an equal amount
of processing time - and if the shared priority is above the idle priority then this is indeed
the case.
When tasks share the idle priority the behaviour can be slightly different. When
configIDLE_SHOULD_YIELD is set to 1 the idle task will yield immediately should any other task
at the idle priority be ready to run.
menuconfig FREERTOS_USE_TASK_NOTIFICATIONS
bool "Use task notifications"
default y
---help---
Setting configUSE_TASK_NOTIFICATIONS to 1 (or leaving configUSE_TASK_NOTIFICATIONS undefined)
will include direct to task notification functionality and its associated API in the build.
Setting configUSE_TASK_NOTIFICATIONS to 0 will exclude direct to task notification functionality
and its associated API from the build.
Each task consumes 8 additional bytes of RAM when direct to task notifications are included in
the build.
if FREERTOS_USE_TASK_NOTIFICATIONS
config FREERTOS_USE_TASK_NOTIFICATION_ARRAY_ENTRIES
int "Task notifications arry entries"
default 3
endif
config FREERTOS_USE_TIME_SLICING
bool "Use time slicing"
default y
depends on FREERTOS_USE_QUEUE_SETS
---help---
By default (if configUSE_TIME_SLICING is not defined, or if configUSE_TIME_SLICING is defined as
1) FreeRTOS uses prioritised preemptive scheduling with time slicing. That means the RTOS scheduler
will always run the highest priority task that is in the Ready state, and will switch between tasks
of equal priority on every RTOS tick interrupt. If configUSE_TIME_SLICING is set to 0 then the RTOS
scheduler will still run the highest priority task that is in the Ready state, but will not switch
between tasks of equal priority just because a tick interrupt has occurred.
config FREERTOS_NUM_THREAD_LOCAL_STORAGE_POINTERS
int "Number of pointers in TLS"
default 4
---help---
Sets the number of indexes in each task's thread local storage array.
config FREERTOS_MAIN_THREAD_STACK_SIZE
int "Set main thread stack size"
default 8096
config FREERTOS_MAIN_THREAD_PRIORITY
int "Set main thread priority"
default 32
endmenu
menu "Hooks"
config FREERTOS_USE_IDLE_HOOK
bool "Use idle hook"
default n
---help---
Set to use idle hook or clear to omit it
config FREERTOS_USE_TICK_HOOK
bool "Use tick hook"
default n
---help---
Set if you wish to use a tick hook, or clear to omit an tick hook
config FREERTOS_USE_CHECK_STACK_OVERFLOW_HOOK
bool "Use check stack overflow hook"
default y
---help---
Check stack overflow
config FREERTOS_USE_MALLOC_FAILED_HOOK
bool "Use malloc-failed hook"
default y
---help---
The kernel uses a call to pvPortMalloc() to allocate memory from the heap each time a
task, queue or semaphore is created. The official FreeRTOS download includes four sample
memory allocation schemes for this purpose. The schemes are implemented in the heap_1.c,
heap_2.c, heap_3.c, heap_4.c and heap_5.c source files respectively. configUSE_MALLOC_FAILED_HOOK
is only relevant when one of these three sample schemes is being used. The malloc() failed
hook function is a hook (or callback) function that, if defined and configured, will be
called if pvPortMalloc() ever returns NULL. NULL will be returned only if there is
insufficient FreeRTOS heap memory remaining for the requested allocation to succeed.
If configUSE_MALLOC_FAILED_HOOK is set to 1 then the application must define a malloc()
failed hook function. If configUSE_MALLOC_FAILED_HOOK is set to 0 then the malloc() failed
hook function will not be called, even if one is defined. Malloc() failed hook functions
must have the name and prototype shown below.
void vApplicationMallocFailedHook( void );
endmenu
menu "Primitives"
config FREERTOS_USE_MUTEXES
bool "Mutexes"
default y
---help---
Set to 1 to include mutex functionality in the build, or 0 to omit mutex functionality from the
build. Readers should familiarise themselves with the differences between mutexes and binary semaphores
in relation to the FreeRTOS functionality.
config FREERTOS_USE_RECURSIVE_MUTEXES
bool "Recursive mutexes"
default n
depends on FREERTOS_USE_MUTEXES
---help---
Set to 1 to include recursive mutex functionality in the build, or 0 to omit recursive mutex
functionality from the build.
config FREERTOS_USE_COUNTING_SEMAPHORES
bool "Counting semaphores"
default y
---help---
Set to 1 to include counting semaphore functionality in the build, or 0 to omit counting semaphore
functionality from the build.
config FREERTOS_USE_ALTERNATIVE_API
bool "Alternative queue API"
default n
---help---
Set to 1 to include the 'alternative' queue functions in the build, or 0 to omit the 'alternative'
queue functions from the build. The alternative API is described within the queue.h header file. The
alternative API is deprecated and should not be used in new designs.
config FREERTOS_USE_QUEUE_SETS
bool "Queue sets"
default n
---help---
Set to 1 to include queue set functionality (the ability to block, or pend, on multiple queues and
semaphores), or 0 to omit queue set functionality.
menuconfig FREERTOS_USE_CO_ROUTINES
bool "Co-routines"
default n
---help---
Set to 1 to include co-routine functionality in the build, or 0 to omit co-routine functionality
from the build. To include co-routines croutine.c must be included in the project.
if FREERTOS_USE_CO_ROUTINES
config FREERTOS_MAX_CO_ROUTINE_PRIORITIES
int "Number of co-routine priorities"
default 2
---help---
The number of priorities available to the application co-routines. Any number of co-routines can
share the same priority.
endif
menuconfig FREERTOS_USE_TIMERS
bool "Timers"
default y
---help---
Set to 1 to include software timer functionality, or 0 to omit software timer functionality
if FREERTOS_USE_TIMERS
config FREERTOS_TIMER_TASK_PRIORITY
int "Timer service task priority"
default 1
---help---
Sets the priority of the software timer service/daemon task
config FREERTOS_TIMER_QUEUE_LENGTH
int "Timer queue length"
default 36
---help---
Sets the length of the software timer command queue
config FREERTOS_TIMER_TASK_STACK_DEPTH
int "Timer task stack depth"
default FREERTOS_MINIMAL_STACK_SIZE
---help---
Sets the stack depth allocated to the software timer service/daemon task
endif
endmenu
menu "Libraries"
config FREERTOS_USE_NEWLIB_REENTRANT
bool "Re-entrant newlib support"
default n
---help---
If configUSE_NEWLIB_REENTRANT is set to 1 then a newlib reent structure will be allocated for each
created task.
config FREERTOS_ENABLE_BACKWARD_COMPATIBILITY
bool "Enable backward compatibility"
default y
---help---
The FreeRTOS.h header file includes a set of #define macros that map the names of data types used
in versions of FreeRTOS prior to version 8.0.0 to the names used in FreeRTOS version 8.0.0. The macros
allow application code to update the version of FreeRTOS they are built against from a pre 8.0.0
version to a post 8.0.0 version without modification. Setting configENABLE_BACKWARD_COMPATIBILITY to
0 in FreeRTOSConfig.h excludes the macors from the build, and in so doing allowing validation that
no pre version 8.0.0 names are being used
endmenu
menu "Debug"
config FREERTOS_USE_TRACE_FACILITY
bool "Enable trace facility"
default n
---help---
Set to 1 if you wish to include additional structure members and functions to assist with execution
visualisation and tracing.
config FREERTOS_USE_STATS_FORMATTING_FUNCTIONS
bool "Include vTaskList() and vTaskGetRunTimeStats()"
default n
depends on FREERTOS_USE_TRACE_FACILITY
---help---
Includes vTaskList() and vTaskGetRunTimeStats() to the build.
config FREERTOS_QUEUE_REGISTRY_SIZE
int "Queue registry size"
default 10
---help---
The queue registry has two purposes, both of which are associated with RTOS kernel aware debugging:
1. It allows a textual name to be associated with a queue for easy queue identification within a
debugging GUI.
2. It contains the information required by a debugger to locate each registered queue and semaphore.
The queue registry has no purpose unless you are using a RTOS kernel aware debugger.
configQUEUE_REGISTRY_SIZE defines the maximum number of queues and semaphores that can be registered.
Only those queues and semaphores that you want to view using a RTOS kernel aware debugger need be
registered. See the API reference documentation for vQueueAddToRegistry() and vQueueUnregisterQueue()
for more information.
config FREERTOS_GENERATE_RUN_TIME_STATS
bool "Generate run time stats"
default n
---help---
The Run Time Stats page describes the use of this parameter.
endmenu
endmenu