<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<IP xmlns="http://mcd.rou.st.com/modules.php?name=mcu" xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance" CodeTemplate="" DBVersion="V4.0" IncludeFile="cmsis_os.h" Name="FREERTOS" RootFolder="Middlewares/Third_Party/FreeRTOS/" Version="STM32Cube_FW_WL_V0.5.0" ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/Specifications/db/IP_Configs.xsd">

    <RefConfig Comment="" Name="FREERTOS_ENABLE_Init">
        <CallLibMethod Name="osKernelStart" ReturnHAL="false"/>
        <Component Name="Middleware:FREERTOS:HEAP:$HEAP_NUMBER"/>
        <ConfigFile Name="CONFIG"/>
        <ConfigFile Name="HOOKS"/>
        <ConfigFile Name="CREATION"/>
        <ConfigFile Name="INC"/>
        <ConfigFile Name="VARS"/>
        <ConfigFile Name="PFP"/>
        <ConfigFile Name="DEFAULT_THREAD"/>
        <ConfigFile Name="USER_THREADS"/>
        <ConfigFile Name="RTOS_START"/>
        <ConfigFile Name="HEAP_USER"/>	
    </RefConfig>
    
    <RefConfig Comment="" Name="FREERTOS_CMSIS_V2_ENABLE_Init">  
        <CallLibMethod Name="osKernelStart" ReturnHAL="false"/>                 
        <Component Name="Middleware:FREERTOS:HEAP:$HEAP_NUMBER"/>
        <ConfigFile Name="CONFIG_V2"/>
        <ConfigFile Name="HOOKS_V2"/>
        <ConfigFile Name="CREATION_V2"/>
        <ConfigFile Name="INC"/>
        <ConfigFile Name="TYPEDEFS_V2"/>
        <ConfigFile Name="VARS_V2"/>
        <ConfigFile Name="PFP_V2"/>
        <ConfigFile Name="DEFAULT_THREAD_V2"/>
        <ConfigFile Name="USER_THREADS_V2"/>
        <ConfigFile Name="RTOS_INIT"/>  <!-- new tmp generated now for CMSIS-RTOS v2 case -->
        <ConfigFile Name="RTOS_START"/>
        <ConfigFile Name="HEAP_USER"/>	
    </RefConfig>
    
    <RefConfig Comment="" Name="FREERTOS_NATIVE_ENABLE_Init">       
        <CallLibMethod Name="osKernelStart" ReturnHAL="false"/>                 
        <Component Name="Middleware:FREERTOS:HEAP:$HEAP_NUMBER"/>
        <ConfigFile Name="CONFIG"/>
        <ConfigFile Name="HOOKS"/>
        <ConfigFile Name="CREATION_NATIVE"/>
        <ConfigFile Name="INC_NATIVE"/>
        <ConfigFile Name="VARS_NATIVE"/>
        <ConfigFile Name="PFP_NATIVE"/>
        <ConfigFile Name="DEFAULT_THREAD_NATIVE"/>
        <ConfigFile Name="USER_THREADS_NATIVE"/>
        <ConfigFile Name="RTOS_START_NATIVE"/>
        <ConfigFile Name="HEAP_USER"/>	
    </RefConfig>
       
    <LibMethod Comment="Start scheduler" Name="osKernelStart">
        <Argument Context="local" GenericType="baseaddress" Name="thread_def" TypeName="osThreadDef_t *"/>
        <Argument Context="local" GenericType="baseaddress" Name="argument" TypeName="void *"/>
    </LibMethod>

    <RefComponent Cclass="Middleware" Cgroup="FREERTOS" Cversion="10.2.1">
        <!-- <File Category="header" Name="Source/include/*.h"/>  -->
        <File Category="header" Name="Source/include/croutine.h"/>
        <File Category="header" Name="Source/include/deprecated_definitions.h"/>
        <File Category="header" Name="Source/include/event_groups.h"/>
        <File Category="header" Name="Source/include/FreeRTOS.h"/>
        <File Category="header" Name="Source/include/list.h"/>
        <File Category="header" Name="Source/include/message_buffer.h"/>
        <File Category="header" Name="Source/include/mpu_prototypes.h"/>
        <File Category="header" Name="Source/include/mpu_wrappers.h"/>
        <File Category="header" Name="Source/include/portable.h"/>
        <File Category="header" Name="Source/include/projdefs.h"/>
        <File Category="header" Name="Source/include/queue.h"/>
        <File Category="header" Name="Source/include/semphr.h"/>
        <File Category="header" Name="Source/include/stack_macros.h"/>
        <File Category="header" Name="Source/include/StackMacros.h"/>
        <File Category="header" Name="Source/include/stream_buffer.h"/>
        <File Category="header" Name="Source/include/task.h"/>
        <File Category="header" Name="Source/include/timers.h"/>        
        
        <!-- <File Category="source" Name="Source/*.c"/> -->
        <File Category="source" Name="Source/croutine.c"/>
        <File Category="source" Name="Source/event_groups.c"/>
        <File Category="source" Name="Source/list.c"/>
        <File Category="source" Name="Source/queue.c"/>
        <File Category="source" Name="Source/stream_buffer.c"/>
        <File Category="source" Name="Source/tasks.c"/>
        <File Category="source" Name="Source/timers.c"/>
        
        <!-- Section for copying the right files according to the chosen API -->
        <!-- 
        <File Category="source" Name="Source/CMSIS_RTOS/cmsis_os.c" Condition="S_CMSIS_RTOS_V1"/>
        <File Category="header" Name="Source/CMSIS_RTOS/cmsis_os.h" Condition="S_CMSIS_RTOS_V1"/>
        <File Category="source" Name="Source/CMSIS_RTOS_V2/cmsis_os2.c" Condition="S_CMSIS_RTOS_V2"/>
        <File Category="header" Name="Source/CMSIS_RTOS_V2/cmsis_os2.h" Condition="S_CMSIS_RTOS_V2"/>
        <File Category="header" Name="Source/CMSIS_RTOS_V2/cmsis_os.h" Condition="S_CMSIS_RTOS_V2"/>
         -->
        <File Category="source" Name="Source/CMSIS_RTOS/cmsis_os.c" Condition="S_CMSIS_RTOS_V1$context"/>
        <File Category="header" Name="Source/CMSIS_RTOS/cmsis_os.h" Condition="S_CMSIS_RTOS_V1$context"/>
        <File Category="source" Name="Source/CMSIS_RTOS_V2/cmsis_os2.c" Condition="S_CMSIS_RTOS_V2$context"/>
        <File Category="header" Name="Source/CMSIS_RTOS_V2/cmsis_os2.h" Condition="S_CMSIS_RTOS_V2$context"/>
        <File Category="header" Name="Source/CMSIS_RTOS_V2/cmsis_os.h" Condition="S_CMSIS_RTOS_V2$context"/>

        <File Category="source" Name="Source/portable/Common/mpu_wrappers.c" Condition="S_FREERTOS_WITH_MPU"/>     
        
        <SubComponent Csub="HEAP" Cvariant="1">
            <File Category="source" Name="Source/portable/MemMang/heap_1.c" Condition="!S_DO_NOT_COPY_HEAP_FILE"/>
        </SubComponent>
        <SubComponent Csub="HEAP" Cvariant="2">
            <File Category="source" Name="Source/portable/MemMang/heap_2.c" Condition="!S_DO_NOT_COPY_HEAP_FILE"/>
        </SubComponent>
        <SubComponent Csub="HEAP" Cvariant="3">
            <File Category="source" Name="Source/portable/MemMang/heap_3.c" Condition="!S_DO_NOT_COPY_HEAP_FILE"/>
        </SubComponent>
        <SubComponent Csub="HEAP" Cvariant="4">
            <File Category="source" Name="Source/portable/MemMang/heap_4.c" Condition="!S_DO_NOT_COPY_HEAP_FILE"/>
        </SubComponent>
        <SubComponent Csub="HEAP" Cvariant="5">
            <File Category="source" Name="Source/portable/MemMang/heap_5.c" Condition="!S_DO_NOT_COPY_HEAP_FILE"/>
        </SubComponent>

        <!-- WL is based on Cortex-M4 without FPU so we need to refer to freertos\Source\portable\IAR\ARM_CM3xxx -->
        <SubComponent Csub="IAR">
            <File Category="source" Name="Source/portable/IAR/ARM_CM3/port.c" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="source" Name="Source/portable/IAR/ARM_CM3/portasm.s" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="header" Name="Source/portable/IAR/ARM_CM3/portmacro.h" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="source" Name="Source/portable/IAR/ARM_CM3_MPU/port.c" Condition="S_FREERTOS_WITH_MPU"/>
            <File Category="source" Name="Source/portable/IAR/ARM_CM3_MPU/portasm.s" Condition="S_FREERTOS_WITH_MPU"/>
            <File Category="header" Name="Source/portable/IAR/ARM_CM3_MPU/portmacro.h" Condition="S_FREERTOS_WITH_MPU"/>
        </SubComponent>
        <SubComponent Csub="Keil">    <!-- Keil refers to RVDS files -->
            <!-- cf BZ 88784
            <File Category="source" Name="Source/portable/RVDS/ARM_CM3/port.c" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="header" Name="Source/portable/RVDS/ARM_CM3/portmacro.h" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="source" Name="Source/portable/RVDS/ARM_CM3_MPU/port.c" Condition="S_FREERTOS_WITH_MPU"/>
            <File Category="header" Name="Source/portable/RVDS/ARM_CM3_MPU/portmacro.h" Condition="S_FREERTOS_WITH_MPU"/>
             -->
            <File Category="source" Name="Source/portable/GCC/ARM_CM3/port.c" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM3/portmacro.h" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM3_MPU/port.c" Condition="S_FREERTOS_WITH_MPU"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM3_MPU/portmacro.h" Condition="S_FREERTOS_WITH_MPU"/>              
        </SubComponent> 
        <SubComponent Csub="RVDS">
            <!-- cf BZ 88784
            <File Category="source" Name="Source/portable/RVDS/ARM_CM3/port.c" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="header" Name="Source/portable/RVDS/ARM_CM3/portmacro.h" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="source" Name="Source/portable/RVDS/ARM_CM3_MPU/port.c" Condition="S_FREERTOS_WITH_MPU"/>
            <File Category="header" Name="Source/portable/RVDS/ARM_CM3_MPU/portmacro.h" Condition="S_FREERTOS_WITH_MPU"/>
             -->
            <File Category="source" Name="Source/portable/GCC/ARM_CM3/port.c" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM3/portmacro.h" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM3_MPU/port.c" Condition="S_FREERTOS_WITH_MPU"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM3_MPU/portmacro.h" Condition="S_FREERTOS_WITH_MPU"/>             
        </SubComponent> 
        <SubComponent Csub="GCC">
            <File Category="source" Name="Source/portable/GCC/ARM_CM3/port.c" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM3/portmacro.h" Condition="!S_FREERTOS_WITH_MPU"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM3_MPU/port.c" Condition="S_FREERTOS_WITH_MPU"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM3_MPU/portmacro.h" Condition="S_FREERTOS_WITH_MPU"/>
        </SubComponent>
    </RefComponent>

    <RefConfigFile Description="Heap for user choice" Name="HEAP_USER" Template="freertos_heap_user.ftl">
        <File Category="source" Name="heap_user.c" Version="10.2.1" Condition="S_HEAP_USER"/>
    </RefConfigFile>

    <RefConfigFile Description="Header file for #include" Name="INC" Template="freertos_inc.ftl">
        <File Category="source" Condition="all" Name="rtos_inc.tmp" Version="10.2.1"/>
    </RefConfigFile>

    <RefConfigFile Description="Variable declarations for FreeRTOS" Name="VARS" Template="freertos_vars_v10_0_0.ftl">
        <File Category="source" Condition="all" Name="rtos_vars.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User queues" GenericType="rtos_list" Name="Queues"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>
        <Argument Comment="User mutexes" GenericType="rtos_list" Name="Mutexes"/>
        <Argument Comment="User recursive mutexes" GenericType="rtos_list" Name="RecursiveMutexes"/>
        <Argument Comment="User binary semaphores" GenericType="rtos_list" Name="BinarySemaphores"/>
        <Argument Comment="User counting semaphores" GenericType="rtos_list" Name="Semaphores"/>  
    </RefConfigFile>

    <RefConfigFile Description="Private Functions Prototypes for FreeRTOS" Name="PFP" Template="freertos_pfp.ftl">
        <File Category="source" Condition="all" Name="rtos_pfp.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>
    </RefConfigFile>

    <RefConfigFile Description="Variable creation then launch the RTOS" Name="CREATION" Template="freertos_init_c_v10_0_0.ftl">
        <File Category="source" Condition="all" Name="rtos_obj_creat.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User queues" GenericType="rtos_list" Name="Queues"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>
        <Argument Comment="User mutexes" GenericType="rtos_list" Name="Mutexes"/>
        <Argument Comment="User recursive mutexes" GenericType="rtos_list" Name="RecursiveMutexes"/>
        <Argument Comment="User binary semaphores" GenericType="rtos_list" Name="BinarySemaphores"/>
        <Argument Comment="User counting semaphores" GenericType="rtos_list" Name="Semaphores"/>
    </RefConfigFile>

    <!-- NEW template for kernel init code -->
    <RefConfigFile Description="Code to init the kernel" Name="RTOS_INIT" Template="freertos_init_kernel.ftl">
        <File Category="source" Condition="all" Name="rtos_kernelInit.tmp" Version="10.2.1"/>
    </RefConfigFile>

    <RefConfigFile Description="Code to start the kernel" Name="RTOS_START" Template="freertos_start.ftl">
        <File Category="source" Condition="all" Name="rtos_kernelStart.tmp" Version="10.2.1"/>
    </RefConfigFile>

    <RefConfigFile Description="FreeRTOS default thread" Name="DEFAULT_THREAD" Template="freertos_body_default_thread_cmsis_v1.ftl">
        <File Category="source" Condition="all" Name="rtos_default_thread.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
    </RefConfigFile>

    <RefConfigFile Description="FreeRTOS user threads" Name="USER_THREADS" Template="freertos_body_user_threads_cmsis_v1.ftl">
        <File Category="source" Condition="all" Name="rtos_threads.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>
    </RefConfigFile>

    <!-- use specific template file to generate header file containing #define -->
    <RefConfigFile Description="Header file for #define" Name="CONFIG" Template="freertos_conf_v10_2_1.ftl">
        <File Category="header" Condition="all" Name="FreeRTOSConfig.h" Version="10.2.1"/>
        <!-- Parameters for FReeRTOS -->
        <Argument Comment="Set to 1 to use the preemptive RTOS scheduler, or 0 to use the cooperative RTOS scheduler. " GenericType="simple" Name="configUSE_PREEMPTION"/>
        <Argument Comment="Frequency in Hz of the internal CPU clock" GenericType="simple" Name="configCPU_CLOCK_HZ"/>
        <Argument Comment="The frequency of the RTOS tick interrupt" GenericType="simple" Name="configTICK_RATE_HZ"/>
        <Argument Comment="The number of priorities available to the application tasks" GenericType="simple" Name="configMAX_PRIORITIES"/>
        <Argument Comment="The size of the stack used by the idle task" GenericType="simple" Name="configMINIMAL_STACK_SIZE"/>
        <Argument Comment="The total amount of RAM available to the RTOS kernel" GenericType="simple" Name="configTOTAL_HEAP_SIZE"/>
        <Argument Comment="The maximum permissible length of the descriptive name given to a task when the task is created" GenericType="simple" Name="configMAX_TASK_NAME_LEN"/>
        <Argument Comment="" GenericType="simple" Name="configUSE_16_BIT_TICKS"/>
        <Argument Comment="This parameter controls the behaviour of tasks at the idle priority" GenericType="simple" Name="configIDLE_SHOULD_YIELD"/>
        <Argument Comment="Set to 1 to include mutex functionality, or 0 to omit it" GenericType="simple" Name="configUSE_MUTEXES"/>
        <Argument Comment="Set to 1 to include recursive mutex functionality, or 0 to omit it" GenericType="simple" Name="configUSE_RECURSIVE_MUTEXES"/>  
        <Argument Comment="Set to 1 to include counting semaphore functionality, or 0 to omit it" GenericType="simple" Name="configUSE_COUNTING_SEMAPHORES"/>  
        <Argument Comment="Defines the maximum number of queues and semaphores that can be registered." GenericType="simple" Name="configQUEUE_REGISTRY_SIZE"/>
        <Argument Comment="" GenericType="simple" Name="configUSE_APPLICATION_TASK_TAG"/>

        <Argument Comment="Set to 1 if you wish to use an idle hook, or 0 to omit it" GenericType="simple" Name="configUSE_IDLE_HOOK"/>
        <Argument Comment="Set to 1 if you wish to use a tick hook, or 0 to omit it" GenericType="simple" Name="configUSE_TICK_HOOK"/>
        <Argument Comment="Set to 1 if you wish to use a malloc failed hook, or 0 to omit it" GenericType="simple" Name="configUSE_MALLOC_FAILED_HOOK"/>

        <!--  <Argument Name="configUSE_TICK_HOOK" GenericType="simple" Comment=
            "&#xD;Tick hook: when set to 1, the application must provide the hook function (a callback) with the following prototype: &#xD;    void vApplicationTickHook( void );&#xD;"/> -->
        <Argument Comment="" GenericType="simple" Name="configCHECK_FOR_STACK_OVERFLOW"/>

        <Argument Comment="Set to 1 to include additional structure members and functions to assist with execution visualisation and tracing" GenericType="simple" Name="configUSE_TRACE_FACILITY"/>    
        <Argument Comment="When set to 1, a collection of run time statistics is enabled" GenericType="simple" Name="configGENERATE_RUN_TIME_STATS"/>
        <Argument Comment="When USE_TRACE_FACILITY and USE_STATS_FORMATTING_FUNCTIONS set to 1, the vTaskList() and vTaskGetRunTimeStats() functions are included in the build." GenericType="simple" Name="configUSE_STATS_FORMATTING_FUNCTIONS"/>

        <Argument Comment="Set to 1 to include co-routine functionality, or 0 to omit it" GenericType="simple" Name="configUSE_CO_ROUTINES"/>
        <Argument Comment="The number of priorities available to the application co-routines." GenericType="simple" Name="configMAX_CO_ROUTINE_PRIORITIES"/>

        <Argument Comment="Set to 1 to include software timer functionality, or 0 to omit it" GenericType="simple" Name="configUSE_TIMERS"/>
        <Argument Comment="Sets the priority of the software timer service/daemon task" GenericType="simple" Name="configTIMER_TASK_PRIORITY"/>
        <Argument Comment="Sets the length of the software timer command queue" GenericType="simple" Name="configTIMER_QUEUE_LENGTH"/>
        <Argument Comment="Sets the size of the stack (in words, not bytes) allocated to the timer service task." GenericType="simple" Name="configTIMER_TASK_STACK_DEPTH"/>

        <!-- <Argument Name="configKERNEL_INTERRUPT_PRIORITY" GenericType="simple" Comment=""/>  -->
        <Argument Comment="" GenericType="simple" Name="configLIBRARY_LOWEST_INTERRUPT_PRIORITY"/>
        <!-- <Argument Name="configKERNEL_INTERRUPT_PRIORITY" GenericType="simple" Comment=""/>  -->
        <Argument Comment="" GenericType="simple" Name="configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY"/>

        <Argument Comment="" GenericType="simple" Name="configPRIO_BITS"/>

        <Argument Comment="" GenericType="simple" Name="INCLUDE_vTaskPrioritySet"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_uxTaskPriorityGet"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_vTaskDelete"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_vTaskCleanUpResources"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_vTaskSuspend"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_vTaskDelayUntil"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_vTaskDelay"/>  
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xTaskGetSchedulerState"/> 

        <Argument Comment="" GenericType="simple" Name="configASSERT( x )"/>

        <!-- New for all families -->
        <Argument Comment="" GenericType="simple" Name="configUSE_ALTERNATIVE_API"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xTaskResumeFromISR"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xQueueGetMutexHolder"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xSemaphoreGetMutexHolder"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_pcTaskGetTaskName"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_uxTaskGetStackHighWaterMark"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xTaskGetCurrentTaskHandle"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_eTaskGetState"/>
        
        <Argument Comment="" GenericType="simple" Name="CMSIS_version"/>

        <!--  New for FreeRTOS 8.1.2 -->
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xEventGroupSetBitFromISR"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xTimerPendFunctionCall"/>
        <Argument Comment="" GenericType="simple" Name="configENABLE_BACKWARD_COMPATIBILITY"/>
        <Argument Comment="" GenericType="simple" Name="configUSE_PORT_OPTIMISED_TASK_SELECTION"/>
        
        <!--  New for FreeRTOS 8.2.1 -->
        <Argument Comment="" GenericType="simple" Name="configUSE_TICKLESS_IDLE"/>
        <Argument Comment="" GenericType="simple" Name="configUSE_TASK_NOTIFICATIONS"/>
        
        <!--  New for FreeRTOS 9.0.0 -->
        <Argument Comment="Default value is 0" GenericType="simple" Name="MEMORY_ALLOCATION"/>
        <Argument Comment="Set to 1 if you wish to use a hook, or 0 to omit it" GenericType="simple" Name="configUSE_DAEMON_TASK_STARTUP_HOOK"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xTaskAbortDelay"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xTaskGetHandle"/>
        
        <!--  New for FreeRTOS 10.0.0 -->
        <Argument Comment="" GenericType="simple" Name="configRECORD_STACK_HIGH_ADDRESS"/>

        <!-- NEWLIB -->
        <Argument Comment="" GenericType="simple" Name="configUSE_NEWLIB_REENTRANT"/>

        <!--  New for FreeRTOS 10.2.1 -->
        <Argument Comment="" GenericType="simple" Name="configENABLE_MPU"/>
        <Argument Comment="" GenericType="simple" Name="configENABLE_FPU"/>
        <Argument Comment="" GenericType="simple" Name="configUSE_POSIX_ERRNO"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_uxTaskGetStackHighWaterMark2"/>

    </RefConfigFile>

    <!-- Putting it at the end of the file (as the last one to deal with) allows to include all tmp files previously generated in app_freertos.c -->
    <RefConfigFile Description="Optional hook functions" Name="HOOKS" Template="freertos_app_c_v10_0_0.ftl">
        <File Category="source" Condition="all" Name="app_freertos.c" Version="10.2.1"/>
        <Argument Comment="When set to 1, a collection of run time statistics is enabled" GenericType="simple" Name="configGENERATE_RUN_TIME_STATS"/>
        <Argument Comment="Set to 1 if you wish to use an idle hook, or 0 to omit it" GenericType="simple" Name="configUSE_IDLE_HOOK"/>
        <Argument Comment="Set to 1 if you wish to use a tick hook, or 0 to omit it" GenericType="simple" Name="configUSE_TICK_HOOK"/>
        <Argument Comment="" GenericType="simple" Name="configCHECK_FOR_STACK_OVERFLOW"/>
        <Argument Comment="Set to 1 if you wish to use a malloc failed hook, or 0 to omit it" GenericType="simple" Name="configUSE_MALLOC_FAILED_HOOK"/>
        <!--  New for FreeRTOS 8.1.2 -->
        <Argument Comment="" GenericType="simple" Name="configENABLE_BACKWARD_COMPATIBILITY"/> 
        <!--  New for FreeRTOS 8.2.1 -->
        <Argument Comment="" GenericType="simple" Name="configUSE_TICKLESS_IDLE"/>
        <!--  New for FreeRTOS 9.0.0 -->
        <Argument Comment="Set to 1 if you wish to use a hook, or 0 to omit it" GenericType="simple" Name="configUSE_DAEMON_TASK_STARTUP_HOOK"/>
        <Argument Comment="Static allocation" GenericType="simple" Name="MEMORY_ALLOCATION"/>
        <Argument Comment="Set to 1 to include software timer functionality, or 0 to omit it" GenericType="simple" Name="configUSE_TIMERS"/>
    </RefConfigFile>

    <!-- Specific for CMSIS V2 -->

    <RefConfigFile Description="Variable declarations for FreeRTOS" Name="TYPEDEFS_V2" Template="freertos_typedefs_v10_0_cmsis_v2.ftl">  
        <File Category="source" Condition="all" Name="rtos_typedefs.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User queues" GenericType="rtos_list" Name="Queues"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>     
        <Argument Comment="User mutexes" GenericType="rtos_list" Name="Mutexes"/>
        <Argument Comment="User recursive mutexes" GenericType="rtos_list" Name="RecursiveMutexes"/>
        <Argument Comment="User binary semaphores" GenericType="rtos_list" Name="BinarySemaphores"/>  
        <Argument Comment="User counting semaphores" GenericType="rtos_list" Name="Semaphores"/>  
        <Argument Comment="User events" GenericType="rtos_list" Name="Events"/>  <!-- NEW FOR EVENTS -->
    </RefConfigFile>

    <RefConfigFile Description="Variable declarations for FreeRTOS" Name="VARS_V2" Template="freertos_vars_v10_0_cmsis_v2.ftl">  
        <File Category="source" Condition="all" Name="rtos_vars.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User queues" GenericType="rtos_list" Name="Queues"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>     
        <Argument Comment="User mutexes" GenericType="rtos_list" Name="Mutexes"/>
        <Argument Comment="User recursive mutexes" GenericType="rtos_list" Name="RecursiveMutexes"/>
        <Argument Comment="User binary semaphores" GenericType="rtos_list" Name="BinarySemaphores"/>  
        <Argument Comment="User counting semaphores" GenericType="rtos_list" Name="Semaphores"/>  
        <Argument Comment="User events" GenericType="rtos_list" Name="Events"/>  <!-- NEW FOR EVENTS -->
    </RefConfigFile>

    <RefConfigFile Description="Private Functions Prototypes for FreeRTOS" Name="PFP_V2" Template="freertos_pfp_cmsis_v2.ftl">
        <File Category="source" Condition="all" Name="rtos_pfp.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>
    </RefConfigFile>

    <RefConfigFile Description="Variable creation then launch the RTOS" Name="CREATION_V2" Template="freertos_init_c_v10_0_cmsis_v2.ftl">
        <File Category="source" Condition="all" Name="rtos_obj_creat.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User queues" GenericType="rtos_list" Name="Queues"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>
        <Argument Comment="User mutexes" GenericType="rtos_list" Name="Mutexes"/>
        <Argument Comment="User recursive mutexes" GenericType="rtos_list" Name="RecursiveMutexes"/>
        <Argument Comment="User binary semaphores" GenericType="rtos_list" Name="BinarySemaphores"/>  
        <Argument Comment="User counting semaphores" GenericType="rtos_list" Name="Semaphores"/> 
        <Argument Comment="User events" GenericType="rtos_list" Name="Events"/>  <!-- NEW FOR EVENTS -->
        <Argument Comment="API in use" GenericType="simple" Name="FreeRTOS_API"/>   <!--  need to distinguish CMSIS v1 and v2 -->
    </RefConfigFile>

    <RefConfigFile Description="FreeRTOS default thread" Name="DEFAULT_THREAD_V2" Template="freertos_body_default_thread_cmsis_v2.ftl">
        <File Category="source" Condition="all" Name="rtos_default_thread.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="" GenericType="simple" Name="FreeRTOS_API"/>   <!--  need to distinguish CMSIS v1 and v2 -->
    </RefConfigFile>

    <RefConfigFile Description="FreeRTOS user threads" Name="USER_THREADS_V2" Template="freertos_body_user_threads_cmsis_v2.ftl">
        <File Category="source" Condition="all" Name="rtos_threads.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>
    </RefConfigFile>

    <!-- use specific template file to generate header file containing #define -->
    <RefConfigFile Description="Header file for #define" Name="CONFIG_V2" Template="freertos_conf_v10_2_1_cmsis_v2.ftl">
        <File Category="header" Condition="all" Name="FreeRTOSConfig.h" Version="10.2.1"/>
        <!-- Parameters for FReeRTOS -->
        <Argument Comment="Set to 1 to use the preemptive RTOS scheduler, or 0 to use the cooperative RTOS scheduler. " GenericType="simple" Name="configUSE_PREEMPTION"/>
        <Argument Comment="Frequency in Hz of the internal CPU clock" GenericType="simple" Name="configCPU_CLOCK_HZ"/>
        <Argument Comment="The frequency of the RTOS tick interrupt" GenericType="simple" Name="configTICK_RATE_HZ"/>
        <Argument Comment="The number of priorities available to the application tasks" GenericType="simple" Name="configMAX_PRIORITIES"/>
        <Argument Comment="The size of the stack used by the idle task" GenericType="simple" Name="configMINIMAL_STACK_SIZE"/>
        <Argument Comment="The total amount of RAM available to the RTOS kernel" GenericType="simple" Name="configTOTAL_HEAP_SIZE"/>
        <Argument Comment="The maximum permissible length of the descriptive name given to a task when the task is created" GenericType="simple" Name="configMAX_TASK_NAME_LEN"/>
        <Argument Comment="" GenericType="simple" Name="configUSE_16_BIT_TICKS"/>
        <Argument Comment="This parameter controls the behaviour of tasks at the idle priority" GenericType="simple" Name="configIDLE_SHOULD_YIELD"/>
        <Argument Comment="Set to 1 to include mutex functionality, or 0 to omit it" GenericType="simple" Name="configUSE_MUTEXES"/>
        <Argument Comment="Set to 1 to include recursive mutex functionality, or 0 to omit it" GenericType="simple" Name="configUSE_RECURSIVE_MUTEXES"/>  
        <Argument Comment="Set to 1 to include counting semaphore functionality, or 0 to omit it" GenericType="simple" Name="configUSE_COUNTING_SEMAPHORES"/>  
        <Argument Comment="Defines the maximum number of queues and semaphores that can be registered." GenericType="simple" Name="configQUEUE_REGISTRY_SIZE"/>
        <Argument Comment="" GenericType="simple" Name="configUSE_APPLICATION_TASK_TAG"/>
        
        <Argument Comment="Set to 1 if you wish to use an idle hook, or 0 to omit it" GenericType="simple" Name="configUSE_IDLE_HOOK"/>
        <Argument Comment="Set to 1 if you wish to use a tick hook, or 0 to omit it" GenericType="simple" Name="configUSE_TICK_HOOK"/>
        <Argument Comment="Set to 1 if you wish to use a malloc failed hook, or 0 to omit it" GenericType="simple" Name="configUSE_MALLOC_FAILED_HOOK"/>
        
        <!--  <Argument Name="configUSE_TICK_HOOK" GenericType="simple" Comment=
            "&#xD;Tick hook: when set to 1, the application must provide the hook function (a callback) with the following prototype: &#xD;    void vApplicationTickHook( void );&#xD;"/> -->
        <Argument Comment="" GenericType="simple" Name="configCHECK_FOR_STACK_OVERFLOW"/>
        
        <Argument Comment="Set to 1 to include additional structure members and functions to assist with execution visualisation and tracing" GenericType="simple" Name="configUSE_TRACE_FACILITY"/>    
        <Argument Comment="When set to 1, a collection of run time statistics is enabled" GenericType="simple" Name="configGENERATE_RUN_TIME_STATS"/>
        <Argument Comment="When USE_TRACE_FACILITY and USE_STATS_FORMATTING_FUNCTIONS set to 1, the vTaskList() and vTaskGetRunTimeStats() functions are included in the build." GenericType="simple" Name="configUSE_STATS_FORMATTING_FUNCTIONS"/>

        <Argument Comment="Set to 1 to include co-routine functionality, or 0 to omit it" GenericType="simple" Name="configUSE_CO_ROUTINES"/>
        <Argument Comment="The number of priorities available to the application co-routines." GenericType="simple" Name="configMAX_CO_ROUTINE_PRIORITIES"/>
              
        <Argument Comment="Set to 1 to include software timer functionality, or 0 to omit it" GenericType="simple" Name="configUSE_TIMERS"/>
        <Argument Comment="Sets the priority of the software timer service/daemon task" GenericType="simple" Name="configTIMER_TASK_PRIORITY"/>
        <Argument Comment="Sets the length of the software timer command queue" GenericType="simple" Name="configTIMER_QUEUE_LENGTH"/>
        <Argument Comment="Sets the size of the stack (in words, not bytes) allocated to the timer service task." GenericType="simple" Name="configTIMER_TASK_STACK_DEPTH"/>
        
        <!-- <Argument Name="configKERNEL_INTERRUPT_PRIORITY" GenericType="simple" Comment=""/>  -->
        <Argument Comment="" GenericType="simple" Name="configLIBRARY_LOWEST_INTERRUPT_PRIORITY"/>
        <!-- <Argument Name="configKERNEL_INTERRUPT_PRIORITY" GenericType="simple" Comment=""/>  -->
        <Argument Comment="" GenericType="simple" Name="configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY"/>
        
        <Argument Comment="" GenericType="simple" Name="configPRIO_BITS"/>
        
        <Argument Comment="" GenericType="simple" Name="INCLUDE_vTaskPrioritySet"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_uxTaskPriorityGet"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_vTaskDelete"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_vTaskCleanUpResources"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_vTaskSuspend"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_vTaskDelayUntil"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_vTaskDelay"/>  
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xTaskGetSchedulerState"/> 
        
        <Argument Comment="" GenericType="simple" Name="configASSERT( x )"/>

        <!-- New for all families -->   
        <Argument Comment="" GenericType="simple" Name="configUSE_ALTERNATIVE_API"/> 
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xTaskResumeFromISR"/>         
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xQueueGetMutexHolder"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xSemaphoreGetMutexHolder"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_pcTaskGetTaskName"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_uxTaskGetStackHighWaterMark"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xTaskGetCurrentTaskHandle"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_eTaskGetState"/>
        
        <Argument Comment="" GenericType="simple" Name="CMSIS_version"/>

        <!--  New for FreeRTOS 8.1.2 -->
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xEventGroupSetBitFromISR"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xTimerPendFunctionCall"/>
        <Argument Comment="" GenericType="simple" Name="configENABLE_BACKWARD_COMPATIBILITY"/>
        <Argument Comment="" GenericType="simple" Name="configUSE_PORT_OPTIMISED_TASK_SELECTION"/>

        <!--  New for FreeRTOS 8.2.1 -->
        <Argument Comment="" GenericType="simple" Name="configUSE_TICKLESS_IDLE"/>
        <Argument Comment="" GenericType="simple" Name="configUSE_TASK_NOTIFICATIONS"/>

        <!--  New for FreeRTOS 9.0.0 -->
        <Argument Comment="Default value is 0" GenericType="simple" Name="MEMORY_ALLOCATION"/>
        <Argument Comment="Set to 1 if you wish to use a hook, or 0 to omit it" GenericType="simple" Name="configUSE_DAEMON_TASK_STARTUP_HOOK"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xTaskAbortDelay"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_xTaskGetHandle"/>

        <!--  New for FreeRTOS 10.0.0 -->
        <Argument Comment="" GenericType="simple" Name="configRECORD_STACK_HIGH_ADDRESS"/>

        <!--  For CMSIS V2 -->
        <Argument Comment="" GenericType="simple" Name="HEAP_NUMBER"/>

        <!-- NEWLIB -->
        <Argument Comment="" GenericType="simple" Name="configUSE_NEWLIB_REENTRANT"/>

        <!--  New for FreeRTOS 10.2.1 -->
        <Argument Comment="" GenericType="simple" Name="configENABLE_MPU"/>
        <Argument Comment="" GenericType="simple" Name="configENABLE_FPU"/>
        <Argument Comment="" GenericType="simple" Name="configUSE_POSIX_ERRNO"/>
        <Argument Comment="" GenericType="simple" Name="INCLUDE_uxTaskGetStackHighWaterMark2"/>

    </RefConfigFile>

    <!-- Putting it at the end of the file (as the last one to deal with) allows to include all tmp files previously generated in freertos.c -->
    <RefConfigFile Description="Optional hook functions" Name="HOOKS_V2" Template="freertos_app_c_v10_0_cmsis_v2.ftl"> <!-- TBC -->
        <File Category="source" Condition="all" Name="app_freertos.c" Version="10.2.1"/>
        <Argument Comment="When set to 1, a collection of run time statistics is enabled" GenericType="simple" Name="configGENERATE_RUN_TIME_STATS"/>
        <Argument Comment="Set to 1 if you wish to use an idle hook, or 0 to omit it" GenericType="simple" Name="configUSE_IDLE_HOOK"/>
        <Argument Comment="Set to 1 if you wish to use a tick hook, or 0 to omit it" GenericType="simple" Name="configUSE_TICK_HOOK"/>
        <Argument Comment="" GenericType="simple" Name="configCHECK_FOR_STACK_OVERFLOW"/>
        <Argument Comment="Set to 1 if you wish to use a malloc failed hook, or 0 to omit it" GenericType="simple" Name="configUSE_MALLOC_FAILED_HOOK"/>
        <!--  New for FreeRTOS 8.1.2 -->
        <Argument Comment="" GenericType="simple" Name="configENABLE_BACKWARD_COMPATIBILITY"/> 
        <!--  New for FreeRTOS 8.2.1 -->
        <Argument Comment="" GenericType="simple" Name="configUSE_TICKLESS_IDLE"/>
        <!--  New for FreeRTOS 9.0.0 -->
        <Argument Comment="Set to 1 if you wish to use a hook, or 0 to omit it" GenericType="simple" Name="configUSE_DAEMON_TASK_STARTUP_HOOK"/>
        <Argument Comment="Static allocation" GenericType="simple" Name="MEMORY_ALLOCATION"/>
        <Argument Comment="Set to 1 to include software timer functionality, or 0 to omit it" GenericType="simple" Name="configUSE_TIMERS"/>
        <!-- CMSIS v2 -->
        <Argument Comment="" GenericType="simple" Name="FreeRTOS_API"/>   <!--  need to distinguish CMSIS v1 and v2 -->
    </RefConfigFile>

    <!-- Specific for Native API -->

    <RefConfigFile Description="Header file for #include" Name="INC_NATIVE" Template="freertos_inc_native.ftl">
        <File Category="source" Condition="all" Name="rtos_inc.tmp" Version="10.2.1"/>
    </RefConfigFile>

    <RefConfigFile Description="Variable declarations for FreeRTOS" Name="VARS_NATIVE" Template="freertos_vars_native.ftl"> <!-- maybe a custom ftl for G4? -->
        <File Category="source" Condition="all" Name="rtos_vars.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User queues" GenericType="rtos_list" Name="Queues"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>
        <Argument Comment="User mutexes" GenericType="rtos_list" Name="Mutexes"/>
        <Argument Comment="User recursive mutexes" GenericType="rtos_list" Name="RecursiveMutexes"/>
        <Argument Comment="User binary semaphores" GenericType="rtos_list" Name="BinarySemaphores"/>
        <Argument Comment="User counting semaphores" GenericType="rtos_list" Name="Semaphores"/>
        <Argument Comment="" GenericType="simple" Name="USE_MPU"/> <!-- Do not generate default task if native + mpu -->
    </RefConfigFile>

    <RefConfigFile Description="Private Functions Prototypes for FreeRTOS" Name="PFP_NATIVE" Template="freertos_pfp_native.ftl">
        <File Category="source" Condition="all" Name="rtos_pfp.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>
        <Argument Comment="" GenericType="simple" Name="USE_MPU"/> <!-- Do not generate default task if native + mpu -->
    </RefConfigFile>

    <RefConfigFile Description="Variable creation then launch the RTOS" Name="CREATION_NATIVE" Template="freertos_init_c_native.ftl">
        <File Category="source" Condition="all" Name="rtos_obj_creat.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User queues" GenericType="rtos_list" Name="Queues"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>
        <Argument Comment="User mutexes" GenericType="rtos_list" Name="Mutexes"/>
        <Argument Comment="User recursive mutexes" GenericType="rtos_list" Name="RecursiveMutexes"/>
        <Argument Comment="User binary semaphores" GenericType="rtos_list" Name="BinarySemaphores"/>  
        <Argument Comment="User counting semaphores" GenericType="rtos_list" Name="Semaphores"/>
        <Argument Comment="" GenericType="simple" Name="USE_MPU"/> <!-- Do not generate default task if native + mpu --> 
    </RefConfigFile>

    <RefConfigFile Description="Code to start the kernel" Name="RTOS_START_NATIVE" Template="freertos_start_native.ftl">
        <File Category="source" Condition="all" Name="rtos_kernelStart.tmp" Version="10.2.1"/>
    </RefConfigFile>

    <!-- 16/07/2018: Temporary fix for WB and MPU: do not generate default task (removed for WL) -->
    <RefConfigFile Description="FreeRTOS default thread" Name="DEFAULT_THREAD_NATIVE" Template="freertos_body_default_thread_native.ftl">
        <File Category="source" Condition="all" Name="rtos_default_thread.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
    </RefConfigFile>
    
    <RefConfigFile Description="FreeRTOS user threads" Name="USER_THREADS_NATIVE" Template="freertos_body_user_threads_native.ftl">
        <File Category="source" Condition="all" Name="rtos_threads.tmp" Version="10.2.1"/>
        <Argument Comment="User threads" GenericType="rtos_list" Name="Threads"/>
        <Argument Comment="User timers" GenericType="rtos_list" Name="Timers"/>
    </RefConfigFile>

</IP>
