<?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_L5_V1.0.0" ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/Specifications/db/IP_Configs.xsd">

    <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"/>
<!-- BZ 75909: ok without condition on IAR  
        <Defines Name="configENABLE_MPU" Type="Adefine" Value="$configENABLE_MPU"/>
        <Defines Name="configENABLE_FPU" Type="Adefine" Value="$configENABLE_FPU"/> 
--> 
    </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" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/deprecated_definitions.h" Condition="SEM_M33NS | !S_SECURE" />
        <File Category="header" Name="Source/include/event_groups.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/FreeRTOS.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/list.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/message_buffer.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/mpu_prototypes.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/mpu_wrappers.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/portable.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/projdefs.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/queue.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/semphr.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/stack_macros.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/StackMacros.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/stream_buffer.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/task.h" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/include/timers.h" Condition="SEM_M33NS | !S_SECURE"/>        
        
        <!-- <File Category="source" Name="Source/*.c"/> -->
        <File Category="source" Name="Source/croutine.c" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="source" Name="Source/event_groups.c" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="source" Name="Source/list.c" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="source" Name="Source/queue.c" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="source" Name="Source/stream_buffer.c" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="source" Name="Source/tasks.c" Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="source" Name="Source/timers.c" Condition="SEM_M33NS | !S_SECURE"/>
        
        <!--  Always use CMSIS-RTOS v2 files -->
        <File Category="source" Name="Source/CMSIS_RTOS_V2/cmsis_os2.c"  Condition="SEM_M33NS | !S_SECURE"/>
        <File Category="header" Name="Source/CMSIS_RTOS_V2/cmsis_os2.h" Condition="SEM_M33NS | !S_SECURE" />
        <File Category="header" Name="Source/CMSIS_RTOS_V2/cmsis_os.h" Condition="SEM_M33NS | !S_SECURE" />
        
        <SubComponent Csub="HEAP" Cvariant="1">
            <File Category="source" Name="Source/portable/MemMang/heap_1.c" Condition="SEM_M33NS | !S_SECURE"/>
        </SubComponent>
        <SubComponent Csub="HEAP" Cvariant="2">
            <File Category="source" Name="Source/portable/MemMang/heap_2.c" Condition="SEM_M33NS | !S_SECURE"/>
        </SubComponent>
        <SubComponent Csub="HEAP" Cvariant="3">
            <File Category="source" Name="Source/portable/MemMang/heap_3.c" Condition="SEM_M33NS | !S_SECURE"/>
        </SubComponent>
        <SubComponent Csub="HEAP" Cvariant="4">
            <File Category="source" Name="Source/portable/MemMang/heap_4.c" Condition="SEM_M33NS | !S_SECURE"/>
        </SubComponent>
        <SubComponent Csub="HEAP" Cvariant="5">
            <File Category="source" Name="Source/portable/MemMang/heap_5.c" Condition="SEM_M33NS | !S_SECURE"/>
        </SubComponent>    
   
        <!-- L5 is based on Cortex-M33 (filenames to be confirmed, once FW pack available -->
        <SubComponent Csub="IAR">        
            <!-- Files to copy/use when TZEN=0 -->
            <File Category="source" Name="Source/portable/IAR/ARM_CM33_NTZ/non_secure/port.c" Condition="!S_SECURE"/>
            <File Category="source" Name="Source/portable/IAR/ARM_CM33_NTZ/non_secure/portasm.s" Condition="!S_SECURE"/>
            <File Category="header" Name="Source/portable/IAR/ARM_CM33_NTZ/non_secure/portasm.h" Condition="!S_SECURE"/>
            <File Category="header" Name="Source/portable/IAR/ARM_CM33_NTZ/non_secure/portmacro.h" Condition="!S_SECURE"/>
            <!-- Files to copy/use when TZEN=1 (should be copied in non-secure project) -->
            <File Category="header" Name="Source/portable/IAR/ARM_CM33/secure/*.h" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="source" Name="Source/portable/IAR/ARM_CM33/non_secure/port.c" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="source" Name="Source/portable/IAR/ARM_CM33/non_secure/portasm.s" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="header" Name="Source/portable/IAR/ARM_CM33/non_secure/portasm.h" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="header" Name="Source/portable/IAR/ARM_CM33/non_secure/portmacro.h" Condition="SEM_M33NS &amp; S_SECURE"/>
            <!-- Files to copy/use when TZEN=1 (should be copied in secure project: requires ticket 71952) -->
            <File Category="header" Name="Source/portable/IAR/ARM_CM33/non_secure/*.h" Condition="SEM_M33S &amp; S_SECURE"/>
            <File Category="source" Name="Source/portable/IAR/ARM_CM33/secure/secure_context.c" Condition="SEM_M33S"/>
            <File Category="header" Name="Source/portable/IAR/ARM_CM33/secure/secure_context.h" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/IAR/ARM_CM33/secure/secure_context_port.c" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/IAR/ARM_CM33/secure/secure_context_port_asm.s" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/IAR/ARM_CM33/secure/secure_heap.c" Condition="SEM_M33S"/>
            <File Category="header" Name="Source/portable/IAR/ARM_CM33/secure/secure_heap.h" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/IAR/ARM_CM33/secure/secure_init.c" Condition="SEM_M33S"/>
            <File Category="header" Name="Source/portable/IAR/ARM_CM33/secure/secure_init.h" Condition="SEM_M33S"/>                                       
            <File Category="header" Name="Source/portable/IAR/ARM_CM33/secure/secure_port_macros.h" Condition="SEM_M33S"/>
        </SubComponent>
        <SubComponent Csub="Keil">    <!-- Keil refers to GCC files (no specific files for Keil)  -->
            <!-- Files to copy/use when TZEN=0 -->
            <File Category="source" Name="Source/portable/GCC/ARM_CM33_NTZ/non_secure/port.c" Condition="!S_SECURE"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c" Condition="!S_SECURE"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.h" Condition="!S_SECURE"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h" Condition="!S_SECURE"/> 
            <!-- Files to copy/use when TZEN=1 (should be copied in non-secure project) -->
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/*.h" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/non_secure/port.c" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/non_secure/portasm.c" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/non_secure/portasm.h" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/non_secure/portmacro.h" Condition="SEM_M33NS &amp; S_SECURE"/>
            <!-- Files to copy/use when TZEN=1 (should be copied in secure project: requires ticket 71952) -->
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/non_secure/*.h" Condition="SEM_M33S &amp; S_SECURE"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/secure/secure_context.c" Condition="SEM_M33S"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/secure_context.h" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/secure/secure_context_port.c" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/secure/secure_heap.c" Condition="SEM_M33S"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/secure_heap.h" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/secure/secure_init.c" Condition="SEM_M33S"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/secure_init.h" Condition="SEM_M33S"/>                                       
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/secure_port_macros.h" Condition="SEM_M33S"/>
        </SubComponent> 
        <SubComponent Csub="RVDS">   <!--  Same as Keil -->
            <!-- Files to copy/use when TZEN=0 -->
            <File Category="source" Name="Source/portable/GCC/ARM_CM33_NTZ/non_secure/port.c" Condition="!S_SECURE"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c" Condition="!S_SECURE"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.h" Condition="!S_SECURE"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h" Condition="!S_SECURE"/> 
            <!-- Files to copy/use when TZEN=1 (should be copied in non-secure project) -->
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/*.h" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/non_secure/port.c" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/non_secure/portasm.c" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/non_secure/portasm.h" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/non_secure/portmacro.h" Condition="SEM_M33NS &amp; S_SECURE"/>             
            <!-- Files to copy/use when TZEN=1 (should be copied in secure project: requires ticket 71952) -->
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/non_secure/*.h" Condition="SEM_M33S &amp; S_SECURE"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/secure/secure_context.c" Condition="SEM_M33S"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/secure_context.h" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/secure/secure_context_port.c" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/secure/secure_heap.c" Condition="SEM_M33S"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/secure_heap.h" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/secure/secure_init.c" Condition="SEM_M33S"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/secure_init.h" Condition="SEM_M33S"/>                                       
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/secure_port_macros.h" Condition="SEM_M33S"/>
        </SubComponent> 
        <SubComponent Csub="GCC">
            <!-- Files to copy/use when TZEN=0 -->
            <File Category="source" Name="Source/portable/GCC/ARM_CM33_NTZ/non_secure/port.c" Condition="!S_SECURE"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c" Condition="!S_SECURE"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.h" Condition="!S_SECURE"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h" Condition="!S_SECURE"/>        
            <!-- Files to copy/use when TZEN=1 (should be copied in non-secure project) -->
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/*.h" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/non_secure/port.c" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/non_secure/portasm.c" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/non_secure/portasm.h" Condition="SEM_M33NS &amp; S_SECURE"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/non_secure/portmacro.h" Condition="SEM_M33NS &amp; S_SECURE"/>        
            <!-- Files to copy/use when TZEN=1 (should be copied in secure project: requires ticket 71952) -->
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/non_secure/*.h" Condition="SEM_M33S &amp; S_SECURE"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/secure/secure_context.c" Condition="SEM_M33S"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/secure_context.h" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/secure/secure_context_port.c" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/secure/secure_heap.c" Condition="SEM_M33S"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/secure_heap.h" Condition="SEM_M33S"/>
            <File Category="source" Name="Source/portable/GCC/ARM_CM33/secure/secure_init.c" Condition="SEM_M33S"/>
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/secure_init.h" Condition="SEM_M33S"/>                                       
            <File Category="header" Name="Source/portable/GCC/ARM_CM33/secure/secure_port_macros.h" Condition="SEM_M33S"/>
        </SubComponent> 
        <!--
        <SubComponent Csub="Tasking" >
            <File Name="Source/portable/Tasking/ARM_CM7/r0p1/port.c" Category="source"/>
            <File Name="Source/portable/Tasking/ARM_CM7/r0p1/port_asm.asm" Category="source"/>
            <File Name="Source/portable/Tasking/ARM_CM7/r0p1/portmacro.h" Category="header"/>
        </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 &amp; (SEM_M33NS | !S_SECURE)"/>
    </RefConfigFile>
    
    <RefConfigFile Description="Header file for #include" Name="INC" Template="freertos_inc.ftl">
        <File Category="source" Condition="!S_SECURE | SEM_M33NS" Name="rtos_inc.tmp" Version="10.2.1"/>
    </RefConfigFile>
    
    <RefConfigFile Description="Variable declarations for FreeRTOS" Name="TYPEDEFS_V2" Template="freertos_typedefs_v10_0_cmsis_v2.ftl">
        <File Category="source" Condition="!S_SECURE | SEM_M33NS" 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_L5.ftl">
        <File Category="source" Condition="!S_SECURE | SEM_M33NS" 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>

    <!-- 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="!S_SECURE | SEM_M33NS" Name="rtos_kernelInit.tmp" Version="10.2.1"/>
    </RefConfigFile>

    <RefConfigFile Description="Private Functions Prototypes for FreeRTOS" Name="PFP_V2" Template="freertos_pfp_cmsis_v2.ftl">
        <File Category="source" Condition="!S_SECURE | SEM_M33NS" 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="!S_SECURE | SEM_M33NS" 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="Code to start the kernel" Name="RTOS_START" Template="freertos_start.ftl">
        <File Category="source" Condition="!S_SECURE | SEM_M33NS" Name="rtos_kernelStart.tmp" Version="10.2.1"/>
    </RefConfigFile>

    <RefConfigFile Description="FreeRTOS default thread" Name="DEFAULT_THREAD_V2" Template="freertos_body_default_thread_cmsis_v2.ftl">
        <File Category="source" Condition="!S_SECURE | SEM_M33NS" 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="!S_SECURE | SEM_M33NS" 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 -->
         <!-- TBC -->
         <Argument Comment="" GenericType="simple" Name="configENABLE_TRUSTZONE"/>
         <Argument Comment="" GenericType="simple" Name="configRUN_FREERTOS_SECURE_ONLY"/>
         <Argument Comment="" GenericType="simple" Name="configMINIMAL_SECURE_STACK_SIZE"/>
         <Argument Comment="" GenericType="simple" Name="configENABLE_MPU"/>
         <Argument Comment="" GenericType="simple" Name="configENABLE_FPU"/>

    </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">
        <File Category="source" Condition="!S_SECURE | SEM_M33NS" 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>

</IP>
