Skip to content

Update sample configuration file #923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 110 additions & 2 deletions examples/sample_configuration/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@
* Defaults to 0 if left undefined. */
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0

/* When configUSE_MINI_LIST_ITEM is set to 0, MiniListItem_t and ListItem_t are
* both the same. When configUSE_MINI_LIST_ITEM is set to 1, MiniListItem_t contains
* 3 fewer fields than ListItem_t which saves some RAM at the cost of violating
* strict aliasing rules which some compilers depend on for optimization. If left
* undefined, configUSE_MINI_LIST_ITEM defaults to 1. */
#define configUSE_MINI_LIST_ITEM 1

/* Sets the type used by the parameter to xTaskCreate() that specifies the stack
* size of the task being created. The same type is used to return information
* about stack usage in various other API calls. Defaults to size_t if left
Expand All @@ -174,6 +181,18 @@
* space if messages never go above a length that could be held in a uint8_t. */
#define configMESSAGE_BUFFER_LENGTH_TYPE size_t

/* If configHEAP_CLEAR_MEMORY_ON_FREE is set to 1, then blocks of memory allocated
* using pvPortMalloc() will be cleared when freed using vPortFree(). If left
* undefined, configHEAP_CLEAR_MEMORY_ON_FREE defaults to 0 for backward compatibility.*/
#define configHEAP_CLEAR_MEMORY_ON_FREE 1

/* vTaskList and vTaskGetRunTimeStats APIs take a buffer as a parameter and assume
* that the length of the buffer is configSTATS_BUFFER_MAX_LENGTH. It defaults to
* 0xFFFF to ensure that the existing applications do not break. The application
* writers can set it to a different value in their FreeRTOSConfig.h, if the default
* value is not suitable for their application. */
#define configSTATS_BUFFER_MAX_LENGTH 0xFFFF

/* Set configUSE_NEWLIB_REENTRANT to 1 to have a newlib reent structure
* allocated for each task. Set to 0 to not support newlib reent structures.
* Default to 0 if left undefined.
Expand Down Expand Up @@ -253,6 +272,11 @@
* Defaults to 0 if left undefined. */
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0

/* Set configENABLE_HEAP_PROTECTOR to 1 to enable bounds checking and obfuscation
* to internal heap block pointers in heap_4.c and heap_5.c to help catch pointer
* corruptions Defaults to 0 if left undefined. */
#define configENABLE_HEAP_PROTECTOR 0

/******************************************************************************/
/* Interrupt nesting behaviour configuration. *********************************/
/******************************************************************************/
Expand Down Expand Up @@ -288,6 +312,7 @@
#define configUSE_TICK_HOOK 0
#define configUSE_MALLOC_FAILED_HOOK 0
#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
#define configUSE_SB_COMPLETED_CALLBACK 0

/* Set configCHECK_FOR_STACK_OVERFLOW to 1 or 2 for FreeRTOS to check for a
* stack overflow at the time of a context switch. Set to 0 to not look for a
Expand All @@ -314,7 +339,7 @@

/* Set configUSE_TRACE_FACILITY to include additional task structure members
* are used by trace and visualisation functions and tools. Set to 0 to exclude
* the additional information from the structures. Defaults to 0 if left
* the additional information from the structures. Defaults to 0 if left
* undefined. */
#define configUSE_TRACE_FACILITY 0

Expand All @@ -325,6 +350,21 @@
* undefined. */
#define configUSE_STATS_FORMATTING_FUNCTIONS 0

/******************************************************************************/
/* Co-routine related definitions. ********************************************/
/******************************************************************************/

/* Set configUSE_CO_ROUTINES 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. Defaults to 0 if left
* undefined. */
#define configUSE_CO_ROUTINES 0

/* configMAX_CO_ROUTINE_PRIORITIES defines the number of priorities available
* to the application co-routines. Any number of co-routines can share the same
* priority. Defaults to 0 if left undefined. */
#define configMAX_CO_ROUTINE_PRIORITIES 1

/******************************************************************************/
/* Debugging assistance. ******************************************************/
/******************************************************************************/
Expand All @@ -346,7 +386,7 @@
}

/******************************************************************************/
/* Cortex-M MPU specific definitions. *****************************************/
/* FreeRTOS MPU specific definitions. *****************************************/
/******************************************************************************/

/* If configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS is set to 1 then
Expand Down Expand Up @@ -390,6 +430,74 @@
* ARMv7-M Cortex-M port.*/
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0

/* Set configUSE_MPU_WRAPPERS_V1 to 1 to allow application writers to use old MPU
* wrapper for backward compatibility. Set configUSE_MPU_WRAPPERS_V1 to 0 to use
* the new MPU wrapper. If left undefined, configUSE_MPU_WRAPPERS_V1 defaults
* to 0.*/
#define configUSE_MPU_WRAPPERS_V1 0

/* Set configPROTECTED_KERNEL_OBJECT_POOL_SIZE to the total number of kernel objects,
* which includes tasks, queues, semaphores, mutexes, event groups, timers, stream
* buffers and message buffers, in your application. The application will not be
* able to have more than configPROTECTED_KERNEL_OBJECT_POOL_SIZE kernel objects
* at any point of time.*/
#define configPROTECTED_KERNEL_OBJECT_POOL_SIZE 10

/* Set configSYSTEM_CALL_STACK_SIZE to the size of system call stack in words.
* Each task has a statically allocated memory buffer of this size which is used
* as the stack to execute system calls. For example, if configSYSTEM_CALL_STACK_SIZE
* is defined as 128 and there are 10 tasks in the application, the total amount of
* memory used for system call stacks is 128 * 10 = 1280 words.*/
#define configSYSTEM_CALL_STACK_SIZE 128

/* Set configENABLE_ACCESS_CONTROL_LIST to 1 to enable Access Control List (ACL)
* feature, when using the latest MPU wrappers. If left undefined,
* configENABLE_ACCESS_CONTROL_LIST defaults to 0.*/
#define configENABLE_ACCESS_CONTROL_LIST 1

/******************************************************************************/
/* SMP( Symmetric MultiProcessing ) Specific Configuration definitions. *******/
/******************************************************************************/

/* Sets the number of available processor cores. If configNUMBER_OF_CORES is left
* undefined, it will default to 1.*/

/*
#define configNUMBER_OF_CORES [Num of available cores]
*/

/* Set configRUN_MULTIPLE_PRIORITIES to 0 to allow multiple tasks to run
* simultaneously only if they have equal priority - maintaining the paradigm of
* a lower priority task never running if there is a higher priority task that
* is able to run. If configRUN_MULTIPLE_PRIORITIES is defined as 1, multiple tasks
* with different priorities may run simultaneously - so a higher and lower priority
* task may run on different cores at the same time.*/
#define configRUN_MULTIPLE_PRIORITIES 0

/* Set configUSE_CORE_AFFINITY to 1, to allow vTaskCoreAffinitySet to control which
* cores a task can run on, and vTaskCoreAffinityGet can be used to query which
* cores a task can run on. If configUSE_CORE_AFFINITY is 0 then the FreeRTOS scheduler
* is free to run any task on any available core.*/
#define configUSE_CORE_AFFINITY 0

/* In an SMP FreeRTOS application, if configUSE_TASK_PREEMPTION_DISABLE is defined
* as 1, then individual tasks can be set to either pre-emptive or co-operative
* mode using the vTaskPreemptionDisable and vTaskPreemptionEnable API functions.*/
#define configUSE_TASK_PREEMPTION_DISABLE 0

/* Set configUSE_PASSIVE_IDLE_HOOK to 1 to allow the application writer to use
* the passive idle task hook to add background functionality without the overhead
* of a separate task. If configUSE_PASSIVE_IDLE_HOOK is left undefined, it will
* default to 0.*/
#define configUSE_PASSIVE_IDLE_HOOK 0

/* configTIMER_SERVICE_TASK_CORE_AFFINITY allows the application writer to set
* the core affinity of the RTOS Daemon/Timer Service task on SMP systems.If
* configTIMER_SERVICE_TASK_CORE_AFFINITY is left undefined, it will default to
* tskNO_AFFINITY.*/
#define configTIMER_SERVICE_TASK_CORE_AFFINITY 0


/******************************************************************************/
/* ARMv8-M secure side port related definitions. ******************************/
/******************************************************************************/
Expand Down