├── .git-blame-ignore-revs ├── .gitattributes ├── .github ├── .cSpellWords.txt ├── CODEOWNERS ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ ├── bug-report.md │ ├── config.yml │ ├── documentation-issue.md │ └── feature_request.md ├── SECURITY.md ├── allowed_urls.txt ├── media │ └── pr_process.png ├── pull_request_process.md ├── pull_request_template.md ├── scripts │ ├── find_replace.sh │ ├── kernel_checker.py │ └── manifest_updater.py ├── third_party_tools.md ├── uncrustify.cfg └── workflows │ ├── auto-release.yml │ ├── ci.yml │ ├── coverity_scan.yml │ ├── git-secrets.yml │ ├── kernel-checks.yml │ ├── kernel-demos.yml │ └── unit-tests.yml ├── .gitmodules ├── CMakeLists.txt ├── GitHub-FreeRTOS-Kernel-Home.url ├── History.txt ├── LICENSE.md ├── MISRA.md ├── Quick_Start_Guide.url ├── README.md ├── croutine.c ├── cspell.config.yaml ├── event_groups.c ├── examples ├── README.md ├── cmake_example │ ├── CMakeLists.txt │ └── main.c ├── coverity │ ├── CMakeLists.txt │ ├── FreeRTOSConfig.h │ ├── README.md │ └── coverity_misra.config └── template_configuration │ ├── FreeRTOSConfig.h │ └── readme.md ├── include ├── CMakeLists.txt ├── FreeRTOS.h ├── StackMacros.h ├── atomic.h ├── croutine.h ├── deprecated_definitions.h ├── event_groups.h ├── list.h ├── message_buffer.h ├── mpu_prototypes.h ├── mpu_syscall_numbers.h ├── mpu_wrappers.h ├── newlib-freertos.h ├── picolibc-freertos.h ├── portable.h ├── projdefs.h ├── queue.h ├── semphr.h ├── stack_macros.h ├── stdint.readme ├── stream_buffer.h ├── task.h └── timers.h ├── list.c ├── manifest.yml ├── portable ├── ARMClang │ └── Use-the-GCC-ports.txt ├── ARMv8M │ ├── ReadMe.txt │ ├── copy_files.py │ ├── non_secure │ │ ├── ReadMe.txt │ │ ├── port.c │ │ ├── portable │ │ │ ├── GCC │ │ │ │ ├── ARM_CM23 │ │ │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ │ │ ├── portasm.c │ │ │ │ │ └── portmacro.h │ │ │ │ ├── ARM_CM23_NTZ │ │ │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ │ │ ├── portasm.c │ │ │ │ │ └── portmacro.h │ │ │ │ ├── ARM_CM33 │ │ │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ │ │ ├── portasm.c │ │ │ │ │ └── portmacro.h │ │ │ │ ├── ARM_CM33_NTZ │ │ │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ │ │ ├── portasm.c │ │ │ │ │ └── portmacro.h │ │ │ │ ├── ARM_CM35P │ │ │ │ │ └── portmacro.h │ │ │ │ ├── ARM_CM55 │ │ │ │ │ └── portmacro.h │ │ │ │ └── ARM_CM85 │ │ │ │ │ └── portmacro.h │ │ │ └── IAR │ │ │ │ ├── ARM_CM23 │ │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ │ ├── portasm.s │ │ │ │ └── portmacro.h │ │ │ │ ├── ARM_CM23_NTZ │ │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ │ ├── portasm.s │ │ │ │ └── portmacro.h │ │ │ │ ├── ARM_CM33 │ │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ │ ├── portasm.s │ │ │ │ └── portmacro.h │ │ │ │ ├── ARM_CM33_NTZ │ │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ │ ├── portasm.s │ │ │ │ └── portmacro.h │ │ │ │ ├── ARM_CM35P │ │ │ │ └── portmacro.h │ │ │ │ ├── ARM_CM55 │ │ │ │ └── portmacro.h │ │ │ │ └── ARM_CM85 │ │ │ │ └── portmacro.h │ │ ├── portasm.h │ │ └── portmacrocommon.h │ └── secure │ │ ├── ReadMe.txt │ │ ├── context │ │ ├── portable │ │ │ ├── GCC │ │ │ │ ├── ARM_CM23 │ │ │ │ │ └── secure_context_port.c │ │ │ │ └── ARM_CM33 │ │ │ │ │ └── secure_context_port.c │ │ │ └── IAR │ │ │ │ ├── ARM_CM23 │ │ │ │ └── secure_context_port_asm.s │ │ │ │ └── ARM_CM33 │ │ │ │ └── secure_context_port_asm.s │ │ ├── secure_context.c │ │ └── secure_context.h │ │ ├── heap │ │ ├── secure_heap.c │ │ └── secure_heap.h │ │ ├── init │ │ ├── secure_init.c │ │ └── secure_init.h │ │ └── macros │ │ └── secure_port_macros.h ├── BCC │ └── 16BitDOS │ │ ├── Flsh186 │ │ ├── port.c │ │ └── prtmacro.h │ │ ├── PC │ │ ├── port.c │ │ └── prtmacro.h │ │ └── common │ │ ├── portasm.h │ │ └── portcomn.c ├── CCRH │ └── F1Kx │ │ ├── README.md │ │ ├── port.c │ │ ├── portasm.s │ │ └── portmacro.h ├── CCS │ ├── ARM_CM3 │ │ ├── port.c │ │ ├── portasm.asm │ │ └── portmacro.h │ ├── ARM_CM4F │ │ ├── port.c │ │ ├── portasm.asm │ │ └── portmacro.h │ ├── ARM_Cortex-R4 │ │ ├── port.c │ │ ├── portASM.asm │ │ └── portmacro.h │ └── MSP430X │ │ ├── data_model.h │ │ ├── port.c │ │ ├── portext.asm │ │ └── portmacro.h ├── CMakeLists.txt ├── CodeWarrior │ ├── ColdFire_V1 │ │ ├── port.c │ │ ├── portasm.S │ │ └── portmacro.h │ ├── ColdFire_V2 │ │ ├── port.c │ │ ├── portasm.S │ │ └── portmacro.h │ └── HCS12 │ │ ├── port.c │ │ └── portmacro.h ├── Common │ ├── mpu_wrappers.c │ └── mpu_wrappers_v2.c ├── GCC │ ├── ARM7_AT91FR40008 │ │ ├── port.c │ │ ├── portISR.c │ │ └── portmacro.h │ ├── ARM7_AT91SAM7S │ │ ├── AT91SAM7X256.h │ │ ├── ioat91sam7x256.h │ │ ├── lib_AT91SAM7X256.c │ │ ├── lib_AT91SAM7X256.h │ │ ├── port.c │ │ ├── portISR.c │ │ └── portmacro.h │ ├── ARM7_LPC2000 │ │ ├── port.c │ │ ├── portISR.c │ │ └── portmacro.h │ ├── ARM7_LPC23xx │ │ ├── port.c │ │ ├── portISR.c │ │ └── portmacro.h │ ├── ARM_AARCH64 │ │ ├── README.md │ │ ├── port.c │ │ ├── portASM.S │ │ └── portmacro.h │ ├── ARM_AARCH64_SRE │ │ ├── README.md │ │ ├── port.c │ │ ├── portASM.S │ │ └── portmacro.h │ ├── ARM_CA53_64_BIT │ │ └── README.md │ ├── ARM_CA53_64_BIT_SRE │ │ └── README.md │ ├── ARM_CA9 │ │ ├── port.c │ │ ├── portASM.S │ │ └── portmacro.h │ ├── ARM_CM0 │ │ ├── mpu_wrappers_v2_asm.c │ │ ├── port.c │ │ ├── portasm.c │ │ ├── portasm.h │ │ └── portmacro.h │ ├── ARM_CM23 │ │ ├── non_secure │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ ├── port.c │ │ │ ├── portasm.c │ │ │ ├── portasm.h │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ │ └── secure │ │ │ ├── secure_context.c │ │ │ ├── secure_context.h │ │ │ ├── secure_context_port.c │ │ │ ├── secure_heap.c │ │ │ ├── secure_heap.h │ │ │ ├── secure_init.c │ │ │ ├── secure_init.h │ │ │ └── secure_port_macros.h │ ├── ARM_CM23_NTZ │ │ └── non_secure │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ ├── port.c │ │ │ ├── portasm.c │ │ │ ├── portasm.h │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ ├── ARM_CM3 │ │ ├── port.c │ │ └── portmacro.h │ ├── ARM_CM33 │ │ ├── non_secure │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ ├── port.c │ │ │ ├── portasm.c │ │ │ ├── portasm.h │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ │ └── secure │ │ │ ├── secure_context.c │ │ │ ├── secure_context.h │ │ │ ├── secure_context_port.c │ │ │ ├── secure_heap.c │ │ │ ├── secure_heap.h │ │ │ ├── secure_init.c │ │ │ ├── secure_init.h │ │ │ └── secure_port_macros.h │ ├── ARM_CM33_NTZ │ │ └── non_secure │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ ├── port.c │ │ │ ├── portasm.c │ │ │ ├── portasm.h │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ ├── ARM_CM35P │ │ ├── non_secure │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ ├── port.c │ │ │ ├── portasm.c │ │ │ ├── portasm.h │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ │ └── secure │ │ │ ├── secure_context.c │ │ │ ├── secure_context.h │ │ │ ├── secure_context_port.c │ │ │ ├── secure_heap.c │ │ │ ├── secure_heap.h │ │ │ ├── secure_init.c │ │ │ ├── secure_init.h │ │ │ └── secure_port_macros.h │ ├── ARM_CM35P_NTZ │ │ └── non_secure │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ ├── port.c │ │ │ ├── portasm.c │ │ │ ├── portasm.h │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ ├── ARM_CM3_MPU │ │ ├── mpu_wrappers_v2_asm.c │ │ ├── port.c │ │ └── portmacro.h │ ├── ARM_CM4F │ │ ├── port.c │ │ └── portmacro.h │ ├── ARM_CM4_MPU │ │ ├── mpu_wrappers_v2_asm.c │ │ ├── port.c │ │ └── portmacro.h │ ├── ARM_CM55 │ │ ├── non_secure │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ ├── port.c │ │ │ ├── portasm.c │ │ │ ├── portasm.h │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ │ └── secure │ │ │ ├── secure_context.c │ │ │ ├── secure_context.h │ │ │ ├── secure_context_port.c │ │ │ ├── secure_heap.c │ │ │ ├── secure_heap.h │ │ │ ├── secure_init.c │ │ │ ├── secure_init.h │ │ │ └── secure_port_macros.h │ ├── ARM_CM55_NTZ │ │ └── non_secure │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ ├── port.c │ │ │ ├── portasm.c │ │ │ ├── portasm.h │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ ├── ARM_CM7 │ │ ├── ReadMe.txt │ │ └── r0p1 │ │ │ ├── port.c │ │ │ └── portmacro.h │ ├── ARM_CM85 │ │ ├── non_secure │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ ├── port.c │ │ │ ├── portasm.c │ │ │ ├── portasm.h │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ │ └── secure │ │ │ ├── secure_context.c │ │ │ ├── secure_context.h │ │ │ ├── secure_context_port.c │ │ │ ├── secure_heap.c │ │ │ ├── secure_heap.h │ │ │ ├── secure_init.c │ │ │ ├── secure_init.h │ │ │ └── secure_port_macros.h │ ├── ARM_CM85_NTZ │ │ └── non_secure │ │ │ ├── mpu_wrappers_v2_asm.c │ │ │ ├── port.c │ │ │ ├── portasm.c │ │ │ ├── portasm.h │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ ├── ARM_CR5 │ │ ├── port.c │ │ ├── portASM.S │ │ └── portmacro.h │ ├── ARM_CRx_MPU │ │ ├── mpu_wrappers_v2_asm.S │ │ ├── port.c │ │ ├── portASM.S │ │ ├── portmacro.h │ │ └── portmacro_asm.h │ ├── ARM_CRx_No_GIC │ │ ├── port.c │ │ ├── portASM.S │ │ └── portmacro.h │ ├── ATMega323 │ │ ├── port.c │ │ └── portmacro.h │ ├── AVR32_UC3 │ │ ├── exception.S │ │ ├── port.c │ │ └── portmacro.h │ ├── AVR_AVRDx │ │ └── README.md │ ├── AVR_Mega0 │ │ └── README.md │ ├── CORTUS_APS3 │ │ ├── port.c │ │ └── portmacro.h │ ├── ColdFire_V2 │ │ ├── port.c │ │ ├── portasm.S │ │ └── portmacro.h │ ├── H8S2329 │ │ ├── port.c │ │ └── portmacro.h │ ├── HCS12 │ │ ├── port.c │ │ └── portmacro.h │ ├── IA32_flat │ │ ├── ISR_Support.h │ │ ├── port.c │ │ ├── portASM.S │ │ └── portmacro.h │ ├── MCF5235 │ │ └── readme.md │ ├── MSP430F449 │ │ ├── port.c │ │ └── portmacro.h │ ├── MicroBlaze │ │ ├── port.c │ │ ├── portasm.s │ │ └── portmacro.h │ ├── MicroBlazeV8 │ │ ├── port.c │ │ ├── port_exceptions.c │ │ ├── portasm.S │ │ └── portmacro.h │ ├── MicroBlazeV9 │ │ ├── port.c │ │ ├── port_exceptions.c │ │ ├── portasm.S │ │ └── portmacro.h │ ├── NiosII │ │ ├── port.c │ │ ├── port_asm.S │ │ └── portmacro.h │ ├── PPC405_Xilinx │ │ ├── FPU_Macros.h │ │ ├── port.c │ │ ├── portasm.S │ │ └── portmacro.h │ ├── PPC440_Xilinx │ │ ├── FPU_Macros.h │ │ ├── port.c │ │ ├── portasm.S │ │ └── portmacro.h │ ├── RISC-V │ │ ├── Documentation.url │ │ ├── chip_extensions.cmake │ │ ├── chip_specific_extensions │ │ │ ├── Pulpino_Vega_RV32M1RM │ │ │ │ └── freertos_risc_v_chip_specific_extensions.h │ │ │ ├── RISCV_MTIME_CLINT_no_extensions │ │ │ │ └── freertos_risc_v_chip_specific_extensions.h │ │ │ ├── RISCV_no_extensions │ │ │ │ └── freertos_risc_v_chip_specific_extensions.h │ │ │ ├── RV32I_CLINT_no_extensions │ │ │ │ └── freertos_risc_v_chip_specific_extensions.h │ │ │ └── readme.txt │ │ ├── port.c │ │ ├── portASM.S │ │ ├── portContext.h │ │ ├── portmacro.h │ │ └── readme.txt │ ├── RL78 │ │ ├── isr_support.h │ │ ├── port.c │ │ ├── portasm.S │ │ └── portmacro.h │ ├── RX100 │ │ ├── port.c │ │ ├── portmacro.h │ │ └── readme.txt │ ├── RX200 │ │ ├── port.c │ │ └── portmacro.h │ ├── RX600 │ │ ├── port.c │ │ ├── portmacro.h │ │ └── readme.txt │ ├── RX600v2 │ │ ├── port.c │ │ ├── portmacro.h │ │ └── readme.txt │ ├── RX700v3_DPFPU │ │ ├── port.c │ │ ├── portmacro.h │ │ └── readme.txt │ ├── STR75x │ │ ├── port.c │ │ ├── portISR.c │ │ └── portmacro.h │ └── TriCore_1782 │ │ ├── port.c │ │ ├── portmacro.h │ │ └── porttrap.c ├── IAR │ ├── 78K0R │ │ ├── ISR_Support.h │ │ ├── port.c │ │ ├── portasm.s26 │ │ └── portmacro.h │ ├── ARM_CA5_No_GIC │ │ ├── port.c │ │ ├── portASM.h │ │ ├── portASM.s │ │ └── portmacro.h │ ├── ARM_CA9 │ │ ├── port.c │ │ ├── portASM.h │ │ ├── portASM.s │ │ └── portmacro.h │ ├── ARM_CM0 │ │ ├── port.c │ │ ├── portasm.s │ │ └── portmacro.h │ ├── ARM_CM23 │ │ ├── non_secure │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ ├── port.c │ │ │ ├── portasm.h │ │ │ ├── portasm.s │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ │ └── secure │ │ │ ├── secure_context.c │ │ │ ├── secure_context.h │ │ │ ├── secure_context_port_asm.s │ │ │ ├── secure_heap.c │ │ │ ├── secure_heap.h │ │ │ ├── secure_init.c │ │ │ ├── secure_init.h │ │ │ └── secure_port_macros.h │ ├── ARM_CM23_NTZ │ │ └── non_secure │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ ├── port.c │ │ │ ├── portasm.h │ │ │ ├── portasm.s │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ ├── ARM_CM3 │ │ ├── port.c │ │ ├── portasm.s │ │ └── portmacro.h │ ├── ARM_CM33 │ │ ├── non_secure │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ ├── port.c │ │ │ ├── portasm.h │ │ │ ├── portasm.s │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ │ └── secure │ │ │ ├── secure_context.c │ │ │ ├── secure_context.h │ │ │ ├── secure_context_port_asm.s │ │ │ ├── secure_heap.c │ │ │ ├── secure_heap.h │ │ │ ├── secure_init.c │ │ │ ├── secure_init.h │ │ │ └── secure_port_macros.h │ ├── ARM_CM33_NTZ │ │ └── non_secure │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ ├── port.c │ │ │ ├── portasm.h │ │ │ ├── portasm.s │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ ├── ARM_CM35P │ │ ├── non_secure │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ ├── port.c │ │ │ ├── portasm.h │ │ │ ├── portasm.s │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ │ └── secure │ │ │ ├── secure_context.c │ │ │ ├── secure_context.h │ │ │ ├── secure_context_port_asm.s │ │ │ ├── secure_heap.c │ │ │ ├── secure_heap.h │ │ │ ├── secure_init.c │ │ │ ├── secure_init.h │ │ │ └── secure_port_macros.h │ ├── ARM_CM35P_NTZ │ │ └── non_secure │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ ├── port.c │ │ │ ├── portasm.h │ │ │ ├── portasm.s │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ ├── ARM_CM4F │ │ ├── port.c │ │ ├── portasm.s │ │ └── portmacro.h │ ├── ARM_CM4F_MPU │ │ ├── mpu_wrappers_v2_asm.S │ │ ├── port.c │ │ ├── portasm.s │ │ └── portmacro.h │ ├── ARM_CM55 │ │ ├── non_secure │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ ├── port.c │ │ │ ├── portasm.h │ │ │ ├── portasm.s │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ │ └── secure │ │ │ ├── secure_context.c │ │ │ ├── secure_context.h │ │ │ ├── secure_context_port_asm.s │ │ │ ├── secure_heap.c │ │ │ ├── secure_heap.h │ │ │ ├── secure_init.c │ │ │ ├── secure_init.h │ │ │ └── secure_port_macros.h │ ├── ARM_CM55_NTZ │ │ └── non_secure │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ ├── port.c │ │ │ ├── portasm.h │ │ │ ├── portasm.s │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ ├── ARM_CM7 │ │ ├── ReadMe.txt │ │ └── r0p1 │ │ │ ├── port.c │ │ │ ├── portasm.s │ │ │ └── portmacro.h │ ├── ARM_CM85 │ │ ├── non_secure │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ ├── port.c │ │ │ ├── portasm.h │ │ │ ├── portasm.s │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ │ └── secure │ │ │ ├── secure_context.c │ │ │ ├── secure_context.h │ │ │ ├── secure_context_port_asm.s │ │ │ ├── secure_heap.c │ │ │ ├── secure_heap.h │ │ │ ├── secure_init.c │ │ │ ├── secure_init.h │ │ │ └── secure_port_macros.h │ ├── ARM_CM85_NTZ │ │ └── non_secure │ │ │ ├── mpu_wrappers_v2_asm.S │ │ │ ├── port.c │ │ │ ├── portasm.h │ │ │ ├── portasm.s │ │ │ ├── portmacro.h │ │ │ └── portmacrocommon.h │ ├── ARM_CRx_No_GIC │ │ ├── port.c │ │ ├── portASM.s │ │ └── portmacro.h │ ├── ATMega323 │ │ ├── port.c │ │ ├── portmacro.h │ │ └── portmacro.s90 │ ├── AVR32_UC3 │ │ ├── exception.s82 │ │ ├── port.c │ │ ├── portmacro.h │ │ ├── read.c │ │ └── write.c │ ├── AVR_AVRDx │ │ ├── port.c │ │ ├── porthardware.h │ │ ├── portmacro.h │ │ └── portmacro.s90 │ ├── AVR_Mega0 │ │ ├── port.c │ │ ├── porthardware.h │ │ ├── portmacro.h │ │ └── portmacro.s90 │ ├── AtmelSAM7S64 │ │ ├── AT91SAM7S64.h │ │ ├── AT91SAM7S64_inc.h │ │ ├── AT91SAM7X128.h │ │ ├── AT91SAM7X128_inc.h │ │ ├── AT91SAM7X256.h │ │ ├── AT91SAM7X256_inc.h │ │ ├── ISR_Support.h │ │ ├── lib_AT91SAM7S64.h │ │ ├── lib_AT91SAM7X128.h │ │ ├── lib_AT91SAM7X256.h │ │ ├── port.c │ │ ├── portasm.s79 │ │ └── portmacro.h │ ├── AtmelSAM9XE │ │ ├── ISR_Support.h │ │ ├── port.c │ │ ├── portasm.s79 │ │ └── portmacro.h │ ├── LPC2000 │ │ ├── ISR_Support.h │ │ ├── port.c │ │ ├── portasm.s79 │ │ └── portmacro.h │ ├── MSP430 │ │ ├── port.c │ │ ├── portasm.h │ │ ├── portext.s43 │ │ └── portmacro.h │ ├── MSP430X │ │ ├── data_model.h │ │ ├── port.c │ │ ├── portext.s43 │ │ └── portmacro.h │ ├── RISC-V │ │ ├── Documentation.url │ │ ├── chip_extensions.cmake │ │ ├── chip_specific_extensions │ │ │ ├── RV32I_CLINT_no_extensions │ │ │ │ └── freertos_risc_v_chip_specific_extensions.h │ │ │ └── readme.txt │ │ ├── port.c │ │ ├── portASM.s │ │ ├── portContext.h │ │ ├── portmacro.h │ │ └── readme.txt │ ├── RL78 │ │ ├── port.c │ │ ├── portasm.s │ │ └── portmacro.h │ ├── RX100 │ │ ├── port.c │ │ ├── port_asm.s │ │ ├── portmacro.h │ │ └── readme.txt │ ├── RX600 │ │ ├── port.c │ │ ├── port_asm.s │ │ ├── portmacro.h │ │ └── readme.txt │ ├── RX700v3_DPFPU │ │ ├── port.c │ │ ├── portmacro.h │ │ └── readme.txt │ ├── RXv2 │ │ ├── port.c │ │ ├── port_asm.s │ │ ├── portmacro.h │ │ └── readme.txt │ ├── STR71x │ │ ├── ISR_Support.h │ │ ├── port.c │ │ ├── portasm.s79 │ │ └── portmacro.h │ ├── STR75x │ │ ├── ISR_Support.h │ │ ├── port.c │ │ ├── portasm.s79 │ │ └── portmacro.h │ ├── STR91x │ │ ├── ISR_Support.h │ │ ├── port.c │ │ ├── portasm.s79 │ │ └── portmacro.h │ └── V850ES │ │ ├── ISR_Support.h │ │ ├── port.c │ │ ├── portasm.s85 │ │ ├── portasm_Fx3.s85 │ │ ├── portasm_Hx2.s85 │ │ └── portmacro.h ├── Keil │ └── See-also-the-RVDS-directory.txt ├── MPLAB │ ├── PIC18F │ │ ├── port.c │ │ ├── portmacro.h │ │ └── stdio.h │ ├── PIC24_dsPIC │ │ ├── port.c │ │ ├── portasm_PIC24.S │ │ ├── portasm_dsPIC.S │ │ └── portmacro.h │ ├── PIC32MEC14xx │ │ ├── ISR_Support.h │ │ ├── port.c │ │ ├── port_asm.S │ │ └── portmacro.h │ ├── PIC32MX │ │ ├── ISR_Support.h │ │ ├── port.c │ │ ├── port_asm.S │ │ └── portmacro.h │ └── PIC32MZ │ │ ├── ISR_Support.h │ │ ├── port.c │ │ ├── port_asm.S │ │ └── portmacro.h ├── MSVC-MingW │ ├── port.c │ └── portmacro.h ├── MemMang │ ├── ReadMe.url │ ├── heap_1.c │ ├── heap_2.c │ ├── heap_3.c │ ├── heap_4.c │ └── heap_5.c ├── MikroC │ └── ARM_CM4F │ │ ├── port.c │ │ └── portmacro.h ├── Paradigm │ └── Tern_EE │ │ ├── large_untested │ │ ├── port.c │ │ ├── portasm.h │ │ └── portmacro.h │ │ └── small │ │ ├── port.c │ │ ├── portasm.h │ │ └── portmacro.h ├── RVDS │ ├── ARM7_LPC21xx │ │ ├── port.c │ │ ├── portASM.s │ │ ├── portmacro.h │ │ └── portmacro.inc │ ├── ARM_CA9 │ │ ├── port.c │ │ ├── portASM.s │ │ ├── portmacro.h │ │ └── portmacro.inc │ ├── ARM_CM0 │ │ ├── port.c │ │ └── portmacro.h │ ├── ARM_CM3 │ │ ├── port.c │ │ └── portmacro.h │ ├── ARM_CM4F │ │ ├── port.c │ │ └── portmacro.h │ ├── ARM_CM4_MPU │ │ ├── mpu_wrappers_v2_asm.c │ │ ├── port.c │ │ └── portmacro.h │ └── ARM_CM7 │ │ ├── ReadMe.txt │ │ └── r0p1 │ │ ├── port.c │ │ └── portmacro.h ├── Renesas │ ├── RX100 │ │ ├── port.c │ │ ├── port_asm.src │ │ ├── portmacro.h │ │ └── readme.txt │ ├── RX200 │ │ ├── port.c │ │ ├── port_asm.src │ │ ├── portmacro.h │ │ └── readme.txt │ ├── RX600 │ │ ├── port.c │ │ ├── port_asm.src │ │ ├── portmacro.h │ │ └── readme.txt │ ├── RX600v2 │ │ ├── port.c │ │ ├── port_asm.src │ │ ├── portmacro.h │ │ └── readme.txt │ ├── RX700v3_DPFPU │ │ ├── port.c │ │ ├── port_asm.src │ │ ├── portmacro.h │ │ └── readme.txt │ └── SH2A_FPU │ │ ├── ISR_Support.inc │ │ ├── port.c │ │ ├── portasm.src │ │ └── portmacro.h ├── Rowley │ ├── ARM7 │ │ └── readme.txt │ └── MSP430F449 │ │ ├── port.c │ │ ├── portasm.h │ │ ├── portext.asm │ │ └── portmacro.h ├── SDCC │ └── Cygnal │ │ ├── port.c │ │ └── portmacro.h ├── Softune │ ├── MB91460 │ │ ├── __STD_LIB_sbrk.c │ │ ├── port.c │ │ └── portmacro.h │ └── MB96340 │ │ ├── __STD_LIB_sbrk.c │ │ ├── port.c │ │ └── portmacro.h ├── Tasking │ └── ARM_CM4F │ │ ├── port.c │ │ ├── port_asm.asm │ │ └── portmacro.h ├── ThirdParty │ ├── CDK │ │ └── T-HEAD_CK802 │ │ │ ├── port.c │ │ │ ├── portasm.S │ │ │ └── portmacro.h │ ├── GCC │ │ ├── ARC_EM_HS │ │ │ ├── arc_freertos_exceptions.c │ │ │ ├── arc_freertos_exceptions.h │ │ │ ├── arc_support.s │ │ │ ├── freertos_tls.c │ │ │ ├── port.c │ │ │ └── portmacro.h │ │ ├── ARC_v1 │ │ │ ├── arc_freertos_exceptions.c │ │ │ ├── arc_freertos_exceptions.h │ │ │ ├── arc_support.s │ │ │ ├── port.c │ │ │ └── portmacro.h │ │ ├── ARM_TFM │ │ │ ├── README.md │ │ │ └── os_wrapper_freertos.c │ │ ├── ATmega │ │ │ ├── port.c │ │ │ ├── portmacro.h │ │ │ └── readme.md │ │ ├── Posix │ │ │ ├── FreeRTOS-simulator-for-Linux.url │ │ │ ├── port.c │ │ │ ├── portmacro.h │ │ │ └── utils │ │ │ │ ├── wait_for_event.c │ │ │ │ └── wait_for_event.h │ │ ├── RISC-V │ │ │ └── README-for-info-on-official-MIT-license-port.txt │ │ ├── RP2040 │ │ │ ├── .gitignore │ │ │ ├── CMakeLists.txt │ │ │ ├── FreeRTOS_Kernel_import.cmake │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── include │ │ │ │ ├── freertos_sdk_config.h │ │ │ │ ├── portmacro.h │ │ │ │ └── rp2040_config.h │ │ │ ├── library.cmake │ │ │ ├── pico_sdk_import.cmake │ │ │ └── port.c │ │ └── Xtensa_ESP32 │ │ │ ├── FreeRTOS-openocd.c │ │ │ ├── include │ │ │ ├── FreeRTOSConfig_arch.h │ │ │ ├── port_systick.h │ │ │ ├── portbenchmark.h │ │ │ ├── portmacro.h │ │ │ ├── xt_asm_utils.h │ │ │ ├── xtensa_api.h │ │ │ ├── xtensa_config.h │ │ │ ├── xtensa_context.h │ │ │ ├── xtensa_rtos.h │ │ │ └── xtensa_timer.h │ │ │ ├── port.c │ │ │ ├── port_common.c │ │ │ ├── port_systick.c │ │ │ ├── portasm.S │ │ │ ├── portmux_impl.h │ │ │ ├── portmux_impl.inc.h │ │ │ ├── xtensa_context.S │ │ │ ├── xtensa_init.c │ │ │ ├── xtensa_loadstore_handler.S │ │ │ ├── xtensa_overlay_os_hook.c │ │ │ ├── xtensa_vector_defaults.S │ │ │ └── xtensa_vectors.S │ ├── KnownIssues.md │ ├── README.md │ ├── XCC │ │ └── Xtensa │ │ │ └── readme_xtensa.txt │ └── xClang │ │ └── XCOREAI │ │ ├── port.c │ │ ├── port.xc │ │ ├── portasm.S │ │ ├── portmacro.h │ │ └── rtos_support_rtos_config.h ├── WizC │ └── PIC18 │ │ ├── Drivers │ │ └── Tick │ │ │ ├── Tick.c │ │ │ └── isrTick.c │ │ ├── Install.bat │ │ ├── addFreeRTOS.h │ │ ├── port.c │ │ └── portmacro.h ├── oWatcom │ └── 16BitDOS │ │ ├── Flsh186 │ │ ├── port.c │ │ └── portmacro.h │ │ ├── PC │ │ ├── port.c │ │ └── portmacro.h │ │ └── common │ │ ├── portasm.h │ │ └── portcomn.c ├── readme.txt └── template │ ├── port.c │ └── portmacro.h ├── queue.c ├── stream_buffer.c ├── tasks.c └── timers.c /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Normalize line endings and whitespace 2 | ddd1e30018e74ad293cda0635018d636a6657f57 3 | 4 | # Convert tabs to spaces (4) 5 | 8c77117c32e49a5070cd85e8920c36723997e465 6 | 7 | # Apply uncrustify rules 8 | 587a83d647619bb0a508661c7bb4d6df89851582 9 | 2c530ba5c352fdf420d1b13709a3970f04e9e6c6 10 | 718178c68a1c863dd1a2eac7aea326a789d3bc52 11 | a5dbc2b1de17e5468420d5a928d7392d799780e2 12 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Each line is a file pattern followed by one or more owners. 2 | 3 | # These owners will be the default owners for everything in 4 | # the repo. Unless a later match takes precedence, 5 | # @global-owner1 and @global-owner2 will be requested for 6 | # review when someone opens a pull request. 7 | * @FreeRTOS/pr-bar-raisers 8 | 9 | # Order is important; the last matching pattern takes the most 10 | # precedence. When someone opens a pull request that only 11 | # modifies JS files, only @js-owner and not the global 12 | # owner(s) will be requested for a review. 13 | # *.c FreeRTOS/pr-bar-raiser 14 | 15 | # You can also use email addresses if you prefer. They'll be 16 | # used to look up users just like we do for commit author 17 | # emails. 18 | # *.go docs@example.com 19 | 20 | # In this example, @doctocat owns any files in the build/logs 21 | # directory at the root of the repository and any of its 22 | # subdirectories. 23 | # /build/logs/ @doctocat 24 | 25 | # The `docs/*` pattern will match files like 26 | # `docs/getting-started.md` but not further nested files like 27 | # `docs/build-app/troubleshooting.md`. 28 | # docs/* docs@example.com 29 | 30 | # In this example, @octocat owns any file in an apps directory 31 | # anywhere in your repository. 32 | # apps/ @octocat 33 | 34 | # In this example, @doctocat owns any file in the `/docs` 35 | # directory in the root of your repository and any of its 36 | # subdirectories. 37 | # /docs/ @doctocat 38 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve FreeRTOS. This should only be used for confirmed 4 | bugs. If you suspect something it is best to first discuss it on the FreeRTOS community 5 | support forums linked below. 6 | title: "[BUG]" 7 | labels: bug 8 | assignees: '' 9 | 10 | --- 11 | 12 | **Describe the bug** 13 | A concise description of what the bug is. 14 | 15 | **Target** 16 | - Development board: [e.g. HiFive11 RevB] 17 | - Instruction Set Architecture: [e.g. RV32IMAC] 18 | - IDE and version: [e.g. Freedom Studio 4.12.0.2019-08-2] 19 | - Toolchain and version: [e.g. riscv64-unknown-elf-gcc-8.3.0-2019.08.0] 20 | 21 | **Host** 22 | - Host OS: [e.g. MacOS] 23 | - Version: [e.g. Mojave 10.14.6] 24 | 25 | **To Reproduce** 26 | - Use project ... and configure with ... 27 | - Run on ... and could observe ... 28 | 29 | **Expected behavior** 30 | A concise description of what you expected to happen. 31 | 32 | **Screenshots** 33 | If applicable, add screenshots to help explain your problem. 34 | 35 | **Additional context** 36 | Add any other context about the problem here. 37 | e.g. code snippet to reproduce the issue. 38 | e.g. stack trace, memory dump, debugger log, and many etc. 39 | 40 | <!-- For general inquiries, please post in [FreeRTOS forum](https://forums.FreeRTOS.org) for community support. --> 41 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: FreeRTOS Community Support Forum 4 | url: https://forums.freertos.org/ 5 | about: Please ask and answer questions about FreeRTOS here. 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation issue 3 | about: Create a report to help us improve our documentation. 4 | title: "[DOC]" 5 | labels: documentation 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the issue** 11 | Please describe the issue and expected clarification in concise language. 12 | 13 | **Reference** 14 | Please attach the URL at which you are experiencing the issue. 15 | 16 | **Screenshot** 17 | If applicable, please attach screenshot. 18 | 19 | **Browser** 20 | - Browser: [e.g. Chrome] 21 | - Version: [e.g. 80.0.3987.132] 22 | 23 | <!-- For general inquiries, please post in [FreeRTOS forum](https://forums.FreeRTOS.org) for community support. --> 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest a new feature for this project 4 | title: "[Feature Request] <replace with your title>" 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **How many devices will this feature impact?** 20 | Expected volume for your product. 21 | 22 | **What are your project timelines?** 23 | Timeline for milestones such as design completion, testing and validation, and production. 24 | 25 | **Additional context** 26 | Add any other context or screenshots about the feature request here. 27 | 28 | 29 | If you have the same (or similar) feature request, please upvote this issue with thumbs up 👍 30 | and use the comments section to provide answers to the questions above. 31 | -------------------------------------------------------------------------------- /.github/SECURITY.md: -------------------------------------------------------------------------------- 1 | ## Reporting a Vulnerability 2 | 3 | If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security 4 | via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com. 5 | Please do **not** create a public github issue. 6 | -------------------------------------------------------------------------------- /.github/allowed_urls.txt: -------------------------------------------------------------------------------- 1 | https://www.renesas.com/us/en/document/mah/rh850f1k-group-users-manual-hardware?r=1170166 2 | https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rh850-automotive-mcus 3 | https://www.renesas.com/us/en/software-tool/c-compiler-package-rh850-family#downloads 4 | -------------------------------------------------------------------------------- /.github/media/pr_process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeRTOS/FreeRTOS-Kernel/e3a362b1d1e41bcc02c02f3ef05f4d3b30cbbc17/.github/media/pr_process.png -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | <!--- Title --> 2 | 3 | Description 4 | ----------- 5 | <!--- Describe your changes in detail. --> 6 | 7 | Test Steps 8 | ----------- 9 | <!-- Describe the steps to reproduce. --> 10 | 11 | Checklist: 12 | ---------- 13 | <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> 14 | <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> 15 | - [ ] I have tested my changes. No regression in existing tests. 16 | - [ ] I have modified and/or added unit-tests to cover the code changes in this Pull Request. 17 | 18 | Related Issue 19 | ----------- 20 | <!-- If any, please provide issue ID. --> 21 | 22 | 23 | By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. 24 | -------------------------------------------------------------------------------- /.github/scripts/find_replace.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | old_text=$1 3 | new_text=$2 4 | echo "Old text: ${old_text}" 5 | echo "New text: ${new_text}" 6 | grep -rl "${old_text}" . | xargs gsed -i -e '1h;2,$H;$!d;g' -e "s/${old_text}/${new_text}/g" 7 | -------------------------------------------------------------------------------- /.github/scripts/manifest_updater.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import argparse 4 | 5 | THIS_FILE_PATH = os.path.dirname(os.path.abspath(__file__)) 6 | MANIFEST_FILE = os.path.join(THIS_FILE_PATH, '..', '..', 'manifest.yml') 7 | 8 | def update_manifest_file(new_version_number): 9 | updated_lines = [] 10 | with open(MANIFEST_FILE, 'r') as f: 11 | for line in f: 12 | line = line.strip() 13 | if line.startswith('version'): 14 | updated_lines.append(f'version: "V{new_version_number}"\n') 15 | else: 16 | updated_lines.append(f'{line}\n') 17 | 18 | with open(MANIFEST_FILE, 'w') as f: 19 | f.writelines(updated_lines) 20 | 21 | def parse_args(): 22 | parser = argparse.ArgumentParser() 23 | parser.add_argument('-v', '--version', required=True, help='New version number.') 24 | args = parser.parse_args() 25 | return args 26 | 27 | def main(): 28 | args = parse_args() 29 | update_manifest_file(args.version) 30 | 31 | if __name__ == '__main__': 32 | main() 33 | -------------------------------------------------------------------------------- /.github/third_party_tools.md: -------------------------------------------------------------------------------- 1 | Note that these tools are provided by different vendors and not by the FreeRTOS 2 | team. 3 | 4 | ## Tracing Tools 5 | | Tool | Website | Getting Started | 6 | |------|---------|-----------------| 7 | | Tracelyzer | [Link](https://percepio.com/tracealyzer/freertostrace/) | [Link](https://percepio.com/getstarted/latest/html/freertos.html) | 8 | | SystemView | [Link](https://www.segger.com/products/development-tools/systemview/) | [Link](https://wiki.segger.com/FreeRTOS_with_SystemView) | 9 | 10 | ## Static Code Analysis Tools 11 | | Tool | Website | Getting Started | 12 | |------|---------|-----------------| 13 | | Code Sonar | [Link](https://codesecure.com/our-products/codesonar/) | [Link](https://github.com/CodeSecure-SE/FreeRTOS-Kernel/blob/main/examples/codesonar/README.md) | 14 | | Coverity | [Link](https://www.blackduck.com/static-analysis-tools-sast/coverity.html) | [Link](../examples/coverity/README.md) | 15 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI Checks 2 | on: 3 | push: 4 | branches: ["**"] 5 | pull_request: 6 | branches: [main] 7 | workflow_dispatch: 8 | jobs: 9 | formatting: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4.1.1 13 | - name: Check Formatting of FreeRTOS-Kernel Files 14 | uses: FreeRTOS/CI-CD-Github-Actions/formatting@main 15 | with: 16 | exclude-dirs: portable 17 | 18 | spell-check: 19 | runs-on: ubuntu-latest 20 | steps: 21 | - name: Clone This Repo 22 | uses: actions/checkout@v4.1.1 23 | - name: Run spellings check 24 | uses: FreeRTOS/CI-CD-Github-Actions/spellings@main 25 | with: 26 | path: ./ 27 | exclude-files: History.txt 28 | 29 | link-verifier: 30 | runs-on: ubuntu-latest 31 | steps: 32 | - name: Clone This Repo 33 | uses: actions/checkout@v4.1.1 34 | - name: Link Verification 35 | uses: FreeRTOS/CI-CD-Github-Actions/link-verifier@main 36 | with: 37 | allowlist-file: '.github/allowed_urls.txt' 38 | 39 | verify-manifest: 40 | runs-on: ubuntu-latest 41 | steps: 42 | - uses: actions/checkout@v4.1.1 43 | with: 44 | submodules: true 45 | fetch-depth: 0 46 | 47 | - name: Run manifest verifier 48 | uses: FreeRTOS/CI-CD-GitHub-Actions/manifest-verifier@main 49 | with: 50 | path: ./ 51 | fail-on-incorrect-version: true 52 | -------------------------------------------------------------------------------- /.github/workflows/git-secrets.yml: -------------------------------------------------------------------------------- 1 | name: git-secrets Check 2 | on: 3 | push: 4 | pull_request: 5 | workflow_dispatch: 6 | jobs: 7 | git-secrets: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v4.1.1 11 | with: 12 | submodules: recursive 13 | - name: Checkout awslabs/git-secrets 14 | uses: actions/checkout@v4.1.1 15 | with: 16 | repository: awslabs/git-secrets 17 | ref: master 18 | path: git-secrets 19 | - name: Install git-secrets 20 | run: cd git-secrets && sudo make install && cd .. 21 | - name: Run git-secrets 22 | run: | 23 | git-secrets --register-aws 24 | git-secrets --scan 25 | -------------------------------------------------------------------------------- /.github/workflows/kernel-checks.yml: -------------------------------------------------------------------------------- 1 | name: Kernel-Checker 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | kernel-checker: 7 | name: FreeRTOS Kernel Header Checks 8 | runs-on: ubuntu-latest 9 | steps: 10 | # Install python 3 11 | - name: Tool Setup 12 | uses: actions/setup-python@v3 13 | env: 14 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 15 | 16 | # There is shared code, hosted by FreeRTOS/FreeRTOS, with deps needed by header checker 17 | - name: Checkout FreeRTOS Tools 18 | uses: actions/checkout@v4.1.1 19 | with: 20 | repository: FreeRTOS/FreeRTOS 21 | sparse-checkout: '.github' 22 | ref: main 23 | path: tools 24 | 25 | # Checkout user pull request changes 26 | - name: Checkout Pull Request 27 | uses: actions/checkout@v4.1.1 28 | with: 29 | path: inspect 30 | 31 | # Collect all affected files 32 | - name: Collecting changed files 33 | uses: lots0logs/gh-action-get-changed-files@2.2.2 34 | with: 35 | token: ${{ secrets.GITHUB_TOKEN }} 36 | 37 | # Run checks 38 | - env: 39 | bashPass: \033[32;1mPASSED - 40 | bashInfo: \033[33;1mINFO - 41 | bashFail: \033[31;1mFAILED - 42 | bashEnd: \033[0m 43 | stepName: Check File Headers 44 | name: ${{ env.stepName }} 45 | shell: bash 46 | run: | 47 | # ${{ env.stepName }} 48 | echo -e "::group::${{ env.bashInfo }} Install Dependencies ${{ env.bashEnd }}" 49 | 50 | # Copy the common tools from the FreeRTOS/FreeRTOS repo. 51 | mv tools/.github/scripts/common inspect/.github/scripts 52 | 53 | # Install the necessary python dependencies 54 | pip install -r inspect/.github/scripts/common/requirements.txt 55 | cd inspect 56 | 57 | echo -e "::group::${{ env.bashInfo }} ${{ env.stepName }} ${{ env.bashEnd }}" 58 | 59 | # Use the python script to check the copyright header of modified files. 60 | .github/scripts/kernel_checker.py --json ${HOME}/files_modified.json ${HOME}/files_added.json ${HOME}/files_renamed.json 61 | exitStatus=$? 62 | echo -e "::endgroup::" 63 | 64 | if [ $exitStatus -eq 0 ]; then 65 | echo -e "${{ env.bashPass }} ${{ env.stepName }} ${{ env.bashEnd }}" 66 | else 67 | echo -e "${{ env.bashFail }} ${{ env.stepName }} ${{ env.bashEnd }}" 68 | fi 69 | exit $exitStatus 70 | -------------------------------------------------------------------------------- /.github/workflows/unit-tests.yml: -------------------------------------------------------------------------------- 1 | name: CMock Unit Tests 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | run: 6 | runs-on: ubuntu-latest 7 | steps: 8 | - name: Checkout Parent Repository 9 | uses: actions/checkout@v4.1.1 10 | with: 11 | ref: main 12 | repository: FreeRTOS/FreeRTOS 13 | submodules: 'recursive' 14 | fetch-depth: 1 15 | 16 | # Checkout user pull request changes 17 | - name: Checkout Pull Request 18 | uses: actions/checkout@v4.1.1 19 | with: 20 | path: ./FreeRTOS/Source 21 | 22 | - name: Setup Python 23 | uses: actions/setup-python@master 24 | with: 25 | python-version: 3.8 26 | 27 | - name: Install packages 28 | run: | 29 | sudo apt-get install lcov cflow ruby doxygen build-essential unifdef 30 | - name: Run Unit Tests with ENABLE_SANITIZER=1 31 | run: | 32 | make -C FreeRTOS/Test/CMock clean 33 | make -C FreeRTOS/Test/CMock ENABLE_SANITIZER=1 run_col_formatted 34 | - name: Run Unit Tests for coverage 35 | run: | 36 | make -C FreeRTOS/Test/CMock clean 37 | make -C FreeRTOS/Test/CMock lcovhtml 38 | lcov --config-file FreeRTOS/Test/CMock/lcovrc --summary FreeRTOS/Test/CMock/build/cmock_test.info > FreeRTOS/Test/CMock/build/cmock_test_summary.txt 39 | - name: Upload coverage to Codecov 40 | uses: codecov/codecov-action@v3.1.0 41 | with: 42 | files: ${{ github.workspace }}/FreeRTOS/Test/CMock/build/cmock_test.info 43 | root_dir: ${{ github.workspace }}/FreeRTOS/Source 44 | flags: unittests 45 | fail_ci_if_error: false 46 | verbose: false 47 | - name: Archive code coverage data 48 | uses: actions/upload-artifact@v4 49 | with: 50 | name: coverage-data 51 | path: FreeRTOS/Test/CMock/build/cmock_test* 52 | - name: Archive code coverage html report 53 | uses: actions/upload-artifact@v4 54 | with: 55 | name: coverage-report 56 | path: FreeRTOS/Test/CMock/build/coverage 57 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ThirdParty/FreeRTOS-Kernel-Partner-Supported-Ports"] 2 | path = portable/ThirdParty/Partner-Supported-Ports 3 | url = https://github.com/FreeRTOS/FreeRTOS-Kernel-Partner-Supported-Ports 4 | [submodule "ThirdParty/FreeRTOS-Kernel-Community-Supported-Ports"] 5 | path = portable/ThirdParty/Community-Supported-Ports 6 | url = https://github.com/FreeRTOS/FreeRTOS-Kernel-Community-Supported-Ports 7 | -------------------------------------------------------------------------------- /GitHub-FreeRTOS-Kernel-Home.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,2 3 | [InternetShortcut] 4 | URL=https://github.com/FreeRTOS/FreeRTOS-Kernel 5 | IconIndex=0 6 | IDList= 7 | HotKey=0 8 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /Quick_Start_Guide.url: -------------------------------------------------------------------------------- 1 | [InternetShortcut] 2 | URL=https://www.FreeRTOS.org/FreeRTOS-quick-start-guide.html 3 | IDList= 4 | [{000214A0-0000-0000-C000-000000000046}] 5 | Prop3=19,2 6 | -------------------------------------------------------------------------------- /cspell.config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | $schema: https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json 3 | version: '0.2' 4 | # Allows things like stringLength 5 | allowCompoundWords: true 6 | 7 | # Read files not to spell check from the git ignore 8 | useGitignore: true 9 | 10 | # Language settings for C 11 | languageSettings: 12 | - caseSensitive: false 13 | enabled: true 14 | languageId: c 15 | locale: "*" 16 | 17 | # Add a dictionary, and the path to the word list 18 | dictionaryDefinitions: 19 | - name: freertos-words 20 | path: '.github/.cSpellWords.txt' 21 | addWords: true 22 | 23 | dictionaries: 24 | - freertos-words 25 | 26 | # Paths and files to ignore 27 | ignorePaths: 28 | - 'dependency' 29 | - 'docs' 30 | - 'ThirdParty' 31 | - 'History.txt' 32 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | # README for FreeRTOS-Kernel/examples 2 | 3 | The easiest way to use FreeRTOS is to start with one of the pre-configured demo application projects. 4 | See [FreeRTOS/FreeRTOS/Demo](https://github.com/FreeRTOS/FreeRTOS/tree/main/FreeRTOS/Demo) to find a list of pre-configured demos on multiple platforms which demonstrate the working of the FreeRTOS-Kernel. 5 | This directory aims to further facilitate the beginners in building their first FreeRTOS project. 6 | 7 | 8 | ## Directory Structure: 9 | 10 | * The [cmake_example](./cmake_example) directory contains a minimal FreeRTOS example project, which uses the configuration file in the template_configuration directory listed below. This will provide you with a starting point for building your applications using FreeRTOS-Kernel. 11 | * The [coverity](./coverity) directory contains a project to run [Synopsys Coverity](https://www.synopsys.com/software-integrity/static-analysis-tools-sast/coverity.html) for checking MISRA compliance. This directory contains further readme files and links to documentation. 12 | * The [template_configuration](./template_configuration) directory contains a sample configuration file FreeRTOSConfig.h which helps you in preparing your application configuration 13 | 14 | 15 | ## Additional examples 16 | 17 | Additional examples of the kernel being used in real life applications in tandem with many other libraries (i.e. FreeRTOS+TCP, coreMQTT, coreHTTP etc.) can be found [here](https://github.com/FreeRTOS/FreeRTOS/tree/main/FreeRTOS-Plus/Demo). 18 | -------------------------------------------------------------------------------- /examples/cmake_example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | project(example) 3 | 4 | set(FREERTOS_KERNEL_PATH "../../") 5 | 6 | # Add the freertos_config for FreeRTOS-Kernel 7 | add_library(freertos_config INTERFACE) 8 | 9 | target_include_directories(freertos_config 10 | INTERFACE 11 | "../template_configuration" 12 | ) 13 | 14 | if (DEFINED FREERTOS_SMP_EXAMPLE AND FREERTOS_SMP_EXAMPLE STREQUAL "1") 15 | message(STATUS "Build FreeRTOS SMP example") 16 | # Adding the following configurations to build SMP template port 17 | add_compile_options( -DconfigNUMBER_OF_CORES=2 -DconfigUSE_PASSIVE_IDLE_HOOK=0 ) 18 | endif() 19 | 20 | # Select the heap port. values between 1-4 will pick a heap. 21 | set(FREERTOS_HEAP "4" CACHE STRING "" FORCE) 22 | 23 | # Select the native compile PORT 24 | set(FREERTOS_PORT "TEMPLATE" CACHE STRING "" FORCE) 25 | 26 | # Adding the FreeRTOS-Kernel subdirectory 27 | add_subdirectory(${FREERTOS_KERNEL_PATH} FreeRTOS-Kernel) 28 | 29 | ######################################################################## 30 | # Overall Compile Options 31 | # Note the compile option strategy is to error on everything and then 32 | # Per library opt-out of things that are warnings/errors. 33 | # This ensures that no matter what strategy for compilation you take, the 34 | # builds will still occur. 35 | # 36 | # Only tested with GNU and Clang. 37 | # Other options are https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html#variable:CMAKE_%3CLANG%3E_COMPILER_ID 38 | # Naming of compilers translation map: 39 | # 40 | # FreeRTOS | CMake 41 | # ------------------- 42 | # CCS | ?TBD? 43 | # GCC | GNU, Clang, *Clang Others? 44 | # IAR | IAR 45 | # Keil | ARMCC 46 | # MSVC | MSVC # Note only for MinGW? 47 | # Renesas | ?TBD? 48 | 49 | target_compile_options(freertos_kernel PRIVATE 50 | ### Gnu/Clang C Options 51 | lt;lt;COMPILE_LANG_AND_ID:C,GNU>:-fdiagnostics-color=always> 52 | lt;lt;COMPILE_LANG_AND_ID:C,Clang>:-fcolor-diagnostics> 53 | 54 | lt;lt;COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wall> 55 | lt;lt;COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wextra> 56 | lt;lt;COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wpedantic> 57 | lt;lt;COMPILE_LANG_AND_ID:C,Clang,GNU>:-Werror> 58 | lt;lt;COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wconversion> 59 | lt;lt;COMPILE_LANG_AND_ID:C,Clang>:-Weverything> 60 | 61 | # Suppressions required to build clean with clang. 62 | lt;lt;COMPILE_LANG_AND_ID:C,Clang>:-Wno-unused-macros> 63 | lt;lt;COMPILE_LANG_AND_ID:C,Clang>:-Wno-padded> 64 | lt;lt;COMPILE_LANG_AND_ID:C,Clang>:-Wno-missing-variable-declarations> 65 | lt;lt;COMPILE_LANG_AND_ID:C,Clang>:-Wno-covered-switch-default> 66 | lt;lt;COMPILE_LANG_AND_ID:C,Clang>:-Wno-cast-align> ) 67 | 68 | add_executable(${PROJECT_NAME} 69 | main.c 70 | ) 71 | 72 | target_link_libraries(${PROJECT_NAME} freertos_kernel freertos_config) 73 | 74 | set_property(TARGET freertos_kernel PROPERTY C_STANDARD 90) -------------------------------------------------------------------------------- /examples/coverity/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | 3 | project(coverity) 4 | 5 | set(FREERTOS_KERNEL_PATH "../..") 6 | FILE(GLOB FREERTOS_KERNEL_SOURCE ${FREERTOS_KERNEL_PATH}/*.c) 7 | FILE(GLOB FREERTOS_PORT_CODE ${FREERTOS_KERNEL_PATH}/portable/template/*.c) 8 | 9 | # Coverity incorrectly infers the type of pdTRUE and pdFALSE as boolean because 10 | # of their names. This generates multiple false positive warnings about type 11 | # mismatch. Replace pdTRUE with pdPASS and pdFALSE with pdFAIL to avoid these 12 | # false positive warnings. This workaround will not be needed after Coverity 13 | # fixes the issue of incorrectly inferring the type of pdTRUE and pdFALSE as 14 | # boolean. 15 | add_custom_target(fix_source ALL 16 | COMMAND sed -i -b -e 's/pdFALSE/pdFAIL/g' -e 's/pdTRUE/pdPASS/g' ${FREERTOS_KERNEL_SOURCE} ${FREERTOS_PORT_CODE} 17 | DEPENDS ${FREERTOS_KERNEL_SOURCE} ${FREERTOS_PORT_CODE}) 18 | 19 | # Add the freertos_config for FreeRTOS-Kernel. 20 | add_library(freertos_config INTERFACE) 21 | 22 | target_include_directories(freertos_config 23 | INTERFACE 24 | ./) 25 | 26 | if (DEFINED FREERTOS_SMP_EXAMPLE AND FREERTOS_SMP_EXAMPLE STREQUAL "1") 27 | message(STATUS "Build FreeRTOS SMP example") 28 | # Adding the following configurations to build SMP template port 29 | add_compile_options( -DconfigNUMBER_OF_CORES=2 -DconfigUSE_PASSIVE_IDLE_HOOK=0 ) 30 | endif() 31 | 32 | # Select the heap. Values between 1-5 will pick a heap. 33 | set(FREERTOS_HEAP "3" CACHE STRING "" FORCE) 34 | 35 | # Select the FreeRTOS port. 36 | set(FREERTOS_PORT "TEMPLATE" CACHE STRING "" FORCE) 37 | 38 | # Add the FreeRTOS-Kernel subdirectory. 39 | add_subdirectory(${FREERTOS_KERNEL_PATH} FreeRTOS-Kernel) 40 | 41 | add_executable(${PROJECT_NAME} 42 | ../cmake_example/main.c) 43 | 44 | add_dependencies(${PROJECT_NAME} fix_source) 45 | 46 | target_link_libraries(${PROJECT_NAME} freertos_kernel freertos_config) 47 | -------------------------------------------------------------------------------- /examples/coverity/README.md: -------------------------------------------------------------------------------- 1 | # MISRA Compliance for FreeRTOS-Kernel 2 | FreeRTOS-Kernel is MISRA C:2012 compliant. This directory contains a project to 3 | run [Synopsys Coverity](https://www.blackduck.com/static-analysis-tools-sast/coverity.html) 4 | for checking MISRA compliance. 5 | 6 | > **Note** 7 | Coverity version 2023.6.1 incorrectly infers the type of `pdTRUE` and `pdFALSE` 8 | as boolean because of their names, resulting in multiple false positive warnings 9 | about type mismatch. We replace `pdTRUE` with `pdPASS` and `pdFALSE` with 10 | `pdFAIL` to avoid these false positive warnings. This workaround will not be 11 | needed after Coverity fixes the issue of incorrectly inferring the type of 12 | `pdTRUE` and `pdFALSE` as boolean. 13 | 14 | Deviations from the MISRA C:2012 guidelines are documented in 15 | [MISRA.md](../../MISRA.md) and [coverity_misra.config](coverity_misra.config) 16 | files. 17 | 18 | ## Getting Started 19 | ### Prerequisites 20 | Coverity can be run on any platform mentioned [here](https://documentation.blackduck.com/bundle/coverity-docs/page/deploy-install-guide/topics/supported_platforms_for_coverity_analysis.html). 21 | The following are the prerequisites to generate coverity report: 22 | 23 | 1. CMake version > 3.13.0 (You can check whether you have this by typing `cmake --version`). 24 | 2. GCC compiler. 25 | - See download and installation instructions [here](https://gcc.gnu.org/install/). 26 | 3. Clone the repo using the following command: 27 | - `git clone https://github.com/FreeRTOS/FreeRTOS-Kernel.git ./FreeRTOS-Kernel` 28 | 29 | ### Generating Report 30 | Go to the root directory of the FreeRTOS-Kernel repo and run the following 31 | commands in a terminal: 32 | 1. Update the compiler configuration in Coverity: 33 | ~~~ 34 | cov-configure --force --compiler cc --comptype gcc 35 | ~~~ 36 | 2. Create the build files using CMake in a `build` directory: 37 | 38 | Single core FreeRTOS: 39 | ~~~ 40 | cmake -B build -S examples/coverity 41 | ~~~ 42 | 43 | SMP FreeRTOS: 44 | ~~~ 45 | cmake -B build -S examples/coverity -DFREERTOS_SMP_EXAMPLE=1 46 | ~~~ 47 | 3. Build the (pseudo) application: 48 | ~~~ 49 | cd build/ 50 | cov-build --emit-complementary-info --dir cov-out make coverity 51 | ~~~ 52 | 4. Go to the Coverity output directory (`cov-out`) and begin Coverity static 53 | analysis: 54 | ~~~ 55 | cov-analyze --dir ./cov-out \ 56 | --coding-standard-config ../examples/coverity/coverity_misra.config \ 57 | --tu-pattern "file('[A-Za-z_]+\.c') && ( ! file('main.c') ) && ( ! file('port.c') )" 58 | ~~~ 59 | 5. Generate the HTML report: 60 | ~~~ 61 | cov-format-errors --dir ./cov-out --html-output html-output 62 | ~~~ 63 | 64 | HTML report should now be generated in a directory named `html-output`. 65 | -------------------------------------------------------------------------------- /examples/template_configuration/readme.md: -------------------------------------------------------------------------------- 1 | # Configuration support for FreeRTOS 2 | 3 | ## Overview 4 | 5 | Every FreeRTOS project requires FreeRTOSConfig.h located in their include path. In this folder you will find a sample FreeRTOSConfig.h that will assist you in preparing the configuration for your application. 6 | 7 | The FreeRTOSConfig.h in this folder is used in the minimal_freertos_example project provided and it not guaranteed to have the same configuration between updates. -------------------------------------------------------------------------------- /include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRTOS internal cmake file. Do not use it in user top-level project 2 | 3 | add_library(freertos_kernel_include INTERFACE) 4 | 5 | target_include_directories(freertos_kernel_include 6 | INTERFACE 7 | . 8 | # Note: DEPRECATED but still supported, may be removed in a future release. 9 | lt;lt;NOT:lt;TARGET_EXISTS:freertos_config>>:${FREERTOS_CONFIG_FILE_DIRECTORY}> 10 | ) 11 | 12 | target_link_libraries(freertos_kernel_include 13 | INTERFACE 14 | lt;lt;TARGET_EXISTS:freertos_config>:freertos_config> 15 | ) 16 | -------------------------------------------------------------------------------- /include/StackMacros.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | 30 | #ifndef _MSC_VER /* Visual Studio doesn't support #warning. */ 31 | #warning The name of this file has changed to stack_macros.h. Please update your code accordingly. This source file (which has the original name) will be removed in a future release. 32 | #endif 33 | 34 | #include "stack_macros.h" 35 | -------------------------------------------------------------------------------- /include/newlib-freertos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef INC_NEWLIB_FREERTOS_H 30 | #define INC_NEWLIB_FREERTOS_H 31 | 32 | /* Note Newlib support has been included by popular demand, but is not 33 | * used by the FreeRTOS maintainers themselves. FreeRTOS is not 34 | * responsible for resulting newlib operation. User must be familiar with 35 | * newlib and must provide system-wide implementations of the necessary 36 | * stubs. Be warned that (at the time of writing) the current newlib design 37 | * implements a system-wide malloc() that must be provided with locks. 38 | * 39 | * See the third party link http://www.nadler.com/embedded/newlibAndFreeRTOS.html 40 | * for additional information. */ 41 | 42 | #include <reent.h> 43 | 44 | #define configUSE_C_RUNTIME_TLS_SUPPORT 1 45 | 46 | #ifndef configTLS_BLOCK_TYPE 47 | #define configTLS_BLOCK_TYPE struct _reent 48 | #endif 49 | 50 | #ifndef configINIT_TLS_BLOCK 51 | #define configINIT_TLS_BLOCK( xTLSBlock, pxTopOfStack ) _REENT_INIT_PTR( &( xTLSBlock ) ) 52 | #endif 53 | 54 | #ifndef configSET_TLS_BLOCK 55 | #define configSET_TLS_BLOCK( xTLSBlock ) ( _impure_ptr = &( xTLSBlock ) ) 56 | #endif 57 | 58 | #ifndef configDEINIT_TLS_BLOCK 59 | #define configDEINIT_TLS_BLOCK( xTLSBlock ) _reclaim_reent( &( xTLSBlock ) ) 60 | #endif 61 | 62 | #endif /* INC_NEWLIB_FREERTOS_H */ 63 | -------------------------------------------------------------------------------- /include/stdint.readme: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef FREERTOS_STDINT 30 | #define FREERTOS_STDINT 31 | 32 | /******************************************************************************* 33 | * THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions 34 | * necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be 35 | * built using compilers that do not provide their own stdint.h definition. 36 | * 37 | * To use this file: 38 | * 39 | * 1) Copy this file into the directory that contains your FreeRTOSConfig.h 40 | * header file, as that directory will already be in the compiler's include 41 | * path. 42 | * 43 | * 2) Rename the copied file stdint.h. 44 | * 45 | */ 46 | 47 | typedef signed char int8_t; 48 | typedef unsigned char uint8_t; 49 | typedef short int16_t; 50 | typedef unsigned short uint16_t; 51 | typedef long int32_t; 52 | typedef unsigned long uint32_t; 53 | 54 | #ifndef SIZE_MAX 55 | #define SIZE_MAX ( ( size_t ) -1 ) 56 | #endif 57 | 58 | #endif /* FREERTOS_STDINT */ 59 | -------------------------------------------------------------------------------- /manifest.yml: -------------------------------------------------------------------------------- 1 | name : "FreeRTOS-Kernel" 2 | version: "V11.0.1+" 3 | description: "FreeRTOS Kernel." 4 | license: "MIT" 5 | -------------------------------------------------------------------------------- /portable/ARMClang/Use-the-GCC-ports.txt: -------------------------------------------------------------------------------- 1 | The FreeRTOS GCC port layer also builds and works with the ARMClang compiler. 2 | To use the ARMClang compiler build the port files from FreeRTOS/Source/portable/GCC. 3 | -------------------------------------------------------------------------------- /portable/ARMv8M/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This directory tree contains the master copy of the FreeRTOS Armv8-M and 2 | Armv8.1-M ports. 3 | Do not use the files located here! These file are copied into separate 4 | FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|55|85]_NNN directories prior to each 5 | FreeRTOS release. 6 | 7 | If your Armv8-M and Armv8.1-M application uses TrustZone then use the files from the 8 | FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|55|85] directories. 9 | 10 | If your Armv8-M and Armv8.1-M application does not use TrustZone then use the files from 11 | the FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|55|85]_NTZ directories. 12 | -------------------------------------------------------------------------------- /portable/ARMv8M/non_secure/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This directory tree contains the master copy of the FreeRTOS Armv8-M and 2 | Armv8.1-M ports. 3 | Do not use the files located here! These file are copied into separate 4 | FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|55|85]_NNN directories prior to 5 | each FreeRTOS release. 6 | 7 | If your Armv8-M/Armv8.1-M application uses TrustZone then use the files from the 8 | FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|55|85] directories. 9 | 10 | If your Armv8-M/Armv8.1-M application does not use TrustZone then use the files from 11 | the FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|55|85]_NTZ directories. 12 | -------------------------------------------------------------------------------- /portable/ARMv8M/secure/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This directory tree contains the master copy of the FreeRTOS Armv8-M and 2 | Armv8.1-M ports. 3 | Do not use the files located here! These file are copied into separate 4 | FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|55|85]_NNN directories prior to 5 | each FreeRTOS release. 6 | 7 | If your Armv8-M/Armv8.1-M application uses TrustZone then use the files from the 8 | FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|55|85] directories. 9 | 10 | If your Armv8-M/Armv8.1-M application does not use TrustZone then use the files from 11 | the FreeRTOS/Source/portable/[compiler]/ARM_CM[23|33|55|85]_NTZ directories. 12 | -------------------------------------------------------------------------------- /portable/ARMv8M/secure/heap/secure_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_HEAP_H__ 30 | #define __SECURE_HEAP_H__ 31 | 32 | /* Standard includes. */ 33 | #include <stdlib.h> 34 | 35 | /** 36 | * @brief Allocates memory from heap. 37 | * 38 | * @param[in] xWantedSize The size of the memory to be allocated. 39 | * 40 | * @return Pointer to the memory region if the allocation is successful, NULL 41 | * otherwise. 42 | */ 43 | void * pvPortMalloc( size_t xWantedSize ); 44 | 45 | /** 46 | * @brief Frees the previously allocated memory. 47 | * 48 | * @param[in] pv Pointer to the memory to be freed. 49 | */ 50 | void vPortFree( void * pv ); 51 | 52 | /** 53 | * @brief Get the free heap size. 54 | * 55 | * @return Free heap size. 56 | */ 57 | size_t xPortGetFreeHeapSize( void ); 58 | 59 | /** 60 | * @brief Get the minimum ever free heap size. 61 | * 62 | * @return Minimum ever free heap size. 63 | */ 64 | size_t xPortGetMinimumEverFreeHeapSize( void ); 65 | 66 | #endif /* __SECURE_HEAP_H__ */ 67 | -------------------------------------------------------------------------------- /portable/ARMv8M/secure/init/secure_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_INIT_H__ 30 | #define __SECURE_INIT_H__ 31 | 32 | /** 33 | * @brief De-prioritizes the non-secure exceptions. 34 | * 35 | * This is needed to ensure that the non-secure PendSV runs at the lowest 36 | * priority. Context switch is done in the non-secure PendSV handler. 37 | * 38 | * @note This function must be called in the handler mode. It is no-op if called 39 | * in the thread mode. 40 | */ 41 | void SecureInit_DePrioritizeNSExceptions( void ); 42 | 43 | /** 44 | * @brief Sets up the Floating Point Unit (FPU) for Non-Secure access. 45 | * 46 | * Also sets FPCCR.TS=1 to ensure that the content of the Floating Point 47 | * Registers are not leaked to the non-secure side. 48 | * 49 | * @note This function must be called in the handler mode. It is no-op if called 50 | * in the thread mode. 51 | */ 52 | void SecureInit_EnableNSFPUAccess( void ); 53 | 54 | #endif /* __SECURE_INIT_H__ */ 55 | -------------------------------------------------------------------------------- /portable/CCS/MSP430X/data_model.h: -------------------------------------------------------------------------------- 1 | ;/* 2 | ; * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | ; * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | ; * 5 | ; * SPDX-License-Identifier: MIT 6 | ; * 7 | ; * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | ; * this software and associated documentation files (the "Software"), to deal in 9 | ; * the Software without restriction, including without limitation the rights to 10 | ; * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | ; * the Software, and to permit persons to whom the Software is furnished to do so, 12 | ; * subject to the following conditions: 13 | ; * 14 | ; * The above copyright notice and this permission notice shall be included in all 15 | ; * copies or substantial portions of the Software. 16 | ; * 17 | ; * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | ; * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | ; * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | ; * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | ; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | ; * 24 | ; * https://www.FreeRTOS.org 25 | ; * https://github.com/FreeRTOS 26 | ; * 27 | ; */ 28 | 29 | .if $DEFINED( __LARGE_DATA_MODEL__ ) 30 | .define "pushm.a", pushm_x 31 | .define "popm.a", popm_x 32 | .define "push.a", push_x 33 | .define "pop.a", pop_x 34 | .define "mov.a", mov_x 35 | .else 36 | .define "pushm.w", pushm_x 37 | .define "popm.w", popm_x 38 | .define "push.w", push_x 39 | .define "pop.w", pop_x 40 | .define "mov.w", mov_x 41 | .endif 42 | 43 | .if $DEFINED( __LARGE_CODE_MODEL__ ) 44 | .define "calla", call_x 45 | .define "reta", ret_x 46 | .else 47 | .define "call", call_x 48 | .define "ret", ret_x 49 | .endif 50 | -------------------------------------------------------------------------------- /portable/GCC/ARM_AARCH64/README.md: -------------------------------------------------------------------------------- 1 | # Armv8-A architecture support 2 | 3 | The Armv8-A architecture introduces the ability to use 64-bit and 32-bit 4 | Execution states, known as AArch64 and AArch32 respectively. The AArch64 5 | Execution state supports the A64 instruction set. It holds addresses in 64-bit 6 | registers and allows instructions in the base instruction set to use 64-bit 7 | registers for their processing. 8 | 9 | The AArch32 Execution state is a 32-bit Execution state that preserves 10 | backwards compatibility with the Armv7-A architecture, enhancing that profile 11 | so that it can support some features included in the AArch64 state. It supports 12 | the T32 and A32 instruction sets. Follow the 13 | [link](https://developer.arm.com/Architectures/A-Profile%20Architecture) 14 | for more information. 15 | 16 | ## ARM_AARCH64 port 17 | 18 | This port adds support for Armv8-A architecture AArch64 execution state. 19 | This port is generic and can be used as a starting point for Armv8-A 20 | application processors. 21 | 22 | * ARM_AARCH64 23 | * Memory mapped interface to access Arm GIC registers 24 | -------------------------------------------------------------------------------- /portable/GCC/ARM_AARCH64_SRE/README.md: -------------------------------------------------------------------------------- 1 | # Armv8-A architecture support 2 | 3 | The Armv8-A architecture introduces the ability to use 64-bit and 32-bit 4 | Execution states, known as AArch64 and AArch32 respectively. The AArch64 5 | Execution state supports the A64 instruction set. It holds addresses in 64-bit 6 | registers and allows instructions in the base instruction set to use 64-bit 7 | registers for their processing. 8 | 9 | The AArch32 Execution state is a 32-bit Execution state that preserves 10 | backwards compatibility with the Armv7-A architecture, enhancing that profile 11 | so that it can support some features included in the AArch64 state. It supports 12 | the T32 and A32 instruction sets. Follow the 13 | [link](https://developer.arm.com/Architectures/A-Profile%20Architecture) 14 | for more information. 15 | 16 | ## ARM_AARCH64_SRE port 17 | 18 | This port adds support for Armv8-A architecture AArch64 execution state. 19 | This port is generic and can be used as a starting point for Armv8-A 20 | application processors. 21 | 22 | * ARM_AARCH64_SRE 23 | * System Register interface to access Arm GIC registers 24 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CA53_64_BIT/README.md: -------------------------------------------------------------------------------- 1 | # ARM_CA53_64_BIT port 2 | 3 | Initial port to support Armv8-A architecture in FreeRTOS kernel was written for 4 | Arm Cortex-A53 processor. 5 | 6 | * ARM_CA53_64_BIT 7 | * Memory mapped interface to access Arm GIC registers 8 | 9 | This port is generic and can be used as a starting point for other Armv8-A 10 | application processors. Therefore, the port `ARM_CA53_64_BIT` is renamed as 11 | `ARM_AARCH64`. The existing projects that use old port `ARM_CA53_64_BIT`, 12 | should migrate to renamed port `ARM_AARCH64`. 13 | 14 | **NOTE** 15 | 16 | This port uses memory mapped interface to access Arm GIC registers. 17 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CA53_64_BIT_SRE/README.md: -------------------------------------------------------------------------------- 1 | # ARM_CA53_64_BIT_SRE port 2 | 3 | Initial port to support Armv8-A architecture in FreeRTOS kernel was written for 4 | Arm Cortex-A53 processor. 5 | 6 | * ARM_CA53_64_BIT_SRE 7 | * System Register interface to access Arm GIC registers 8 | 9 | This port is generic and can be used as a starting point for other Armv8-A 10 | application processors. Therefore, the port `ARM_AARCH64_SRE` is renamed as 11 | `ARM_AARCH64_SRE`. The existing projects that use old port `ARM_AARCH64_SRE`, 12 | should migrate to renamed port `ARM_AARCH64_SRE`. 13 | 14 | **NOTE** 15 | 16 | This port uses System Register interface to access Arm GIC registers. 17 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM23/secure/secure_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_HEAP_H__ 30 | #define __SECURE_HEAP_H__ 31 | 32 | /* Standard includes. */ 33 | #include <stdlib.h> 34 | 35 | /** 36 | * @brief Allocates memory from heap. 37 | * 38 | * @param[in] xWantedSize The size of the memory to be allocated. 39 | * 40 | * @return Pointer to the memory region if the allocation is successful, NULL 41 | * otherwise. 42 | */ 43 | void * pvPortMalloc( size_t xWantedSize ); 44 | 45 | /** 46 | * @brief Frees the previously allocated memory. 47 | * 48 | * @param[in] pv Pointer to the memory to be freed. 49 | */ 50 | void vPortFree( void * pv ); 51 | 52 | /** 53 | * @brief Get the free heap size. 54 | * 55 | * @return Free heap size. 56 | */ 57 | size_t xPortGetFreeHeapSize( void ); 58 | 59 | /** 60 | * @brief Get the minimum ever free heap size. 61 | * 62 | * @return Minimum ever free heap size. 63 | */ 64 | size_t xPortGetMinimumEverFreeHeapSize( void ); 65 | 66 | #endif /* __SECURE_HEAP_H__ */ 67 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM23/secure/secure_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_INIT_H__ 30 | #define __SECURE_INIT_H__ 31 | 32 | /** 33 | * @brief De-prioritizes the non-secure exceptions. 34 | * 35 | * This is needed to ensure that the non-secure PendSV runs at the lowest 36 | * priority. Context switch is done in the non-secure PendSV handler. 37 | * 38 | * @note This function must be called in the handler mode. It is no-op if called 39 | * in the thread mode. 40 | */ 41 | void SecureInit_DePrioritizeNSExceptions( void ); 42 | 43 | /** 44 | * @brief Sets up the Floating Point Unit (FPU) for Non-Secure access. 45 | * 46 | * Also sets FPCCR.TS=1 to ensure that the content of the Floating Point 47 | * Registers are not leaked to the non-secure side. 48 | * 49 | * @note This function must be called in the handler mode. It is no-op if called 50 | * in the thread mode. 51 | */ 52 | void SecureInit_EnableNSFPUAccess( void ); 53 | 54 | #endif /* __SECURE_INIT_H__ */ 55 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM33/non_secure/portmacro.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef PORTMACRO_H 30 | #define PORTMACRO_H 31 | 32 | /* *INDENT-OFF* */ 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | /* *INDENT-ON* */ 37 | 38 | /*------------------------------------------------------------------------------ 39 | * Port specific definitions. 40 | * 41 | * The settings in this file configure FreeRTOS correctly for the given hardware 42 | * and compiler. 43 | * 44 | * These settings should not be altered. 45 | *------------------------------------------------------------------------------ 46 | */ 47 | 48 | /** 49 | * Architecture specifics. 50 | */ 51 | #define portARCH_NAME "Cortex-M33" 52 | #define portHAS_ARMV8M_MAIN_EXTENSION 1 53 | #define portARMV8M_MINOR_VERSION 0 54 | #define portDONT_DISCARD __attribute__( ( used ) ) 55 | /*-----------------------------------------------------------*/ 56 | 57 | /* ARMv8-M common port configurations. */ 58 | #include "portmacrocommon.h" 59 | /*-----------------------------------------------------------*/ 60 | 61 | #ifndef configENABLE_MVE 62 | #define configENABLE_MVE 0 63 | #elif ( configENABLE_MVE != 0 ) 64 | #error configENABLE_MVE must be left undefined, or defined to 0 for the Cortex-M33. 65 | #endif 66 | /*-----------------------------------------------------------*/ 67 | 68 | /** 69 | * @brief Critical section management. 70 | */ 71 | #define portDISABLE_INTERRUPTS() ulSetInterruptMask() 72 | #define portENABLE_INTERRUPTS() vClearInterruptMask( 0 ) 73 | /*-----------------------------------------------------------*/ 74 | 75 | /* *INDENT-OFF* */ 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | /* *INDENT-ON* */ 80 | 81 | #endif /* PORTMACRO_H */ 82 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM33/secure/secure_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_HEAP_H__ 30 | #define __SECURE_HEAP_H__ 31 | 32 | /* Standard includes. */ 33 | #include <stdlib.h> 34 | 35 | /** 36 | * @brief Allocates memory from heap. 37 | * 38 | * @param[in] xWantedSize The size of the memory to be allocated. 39 | * 40 | * @return Pointer to the memory region if the allocation is successful, NULL 41 | * otherwise. 42 | */ 43 | void * pvPortMalloc( size_t xWantedSize ); 44 | 45 | /** 46 | * @brief Frees the previously allocated memory. 47 | * 48 | * @param[in] pv Pointer to the memory to be freed. 49 | */ 50 | void vPortFree( void * pv ); 51 | 52 | /** 53 | * @brief Get the free heap size. 54 | * 55 | * @return Free heap size. 56 | */ 57 | size_t xPortGetFreeHeapSize( void ); 58 | 59 | /** 60 | * @brief Get the minimum ever free heap size. 61 | * 62 | * @return Minimum ever free heap size. 63 | */ 64 | size_t xPortGetMinimumEverFreeHeapSize( void ); 65 | 66 | #endif /* __SECURE_HEAP_H__ */ 67 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM33/secure/secure_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_INIT_H__ 30 | #define __SECURE_INIT_H__ 31 | 32 | /** 33 | * @brief De-prioritizes the non-secure exceptions. 34 | * 35 | * This is needed to ensure that the non-secure PendSV runs at the lowest 36 | * priority. Context switch is done in the non-secure PendSV handler. 37 | * 38 | * @note This function must be called in the handler mode. It is no-op if called 39 | * in the thread mode. 40 | */ 41 | void SecureInit_DePrioritizeNSExceptions( void ); 42 | 43 | /** 44 | * @brief Sets up the Floating Point Unit (FPU) for Non-Secure access. 45 | * 46 | * Also sets FPCCR.TS=1 to ensure that the content of the Floating Point 47 | * Registers are not leaked to the non-secure side. 48 | * 49 | * @note This function must be called in the handler mode. It is no-op if called 50 | * in the thread mode. 51 | */ 52 | void SecureInit_EnableNSFPUAccess( void ); 53 | 54 | #endif /* __SECURE_INIT_H__ */ 55 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef PORTMACRO_H 30 | #define PORTMACRO_H 31 | 32 | /* *INDENT-OFF* */ 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | /* *INDENT-ON* */ 37 | 38 | /*------------------------------------------------------------------------------ 39 | * Port specific definitions. 40 | * 41 | * The settings in this file configure FreeRTOS correctly for the given hardware 42 | * and compiler. 43 | * 44 | * These settings should not be altered. 45 | *------------------------------------------------------------------------------ 46 | */ 47 | 48 | /** 49 | * Architecture specifics. 50 | */ 51 | #define portARCH_NAME "Cortex-M33" 52 | #define portHAS_ARMV8M_MAIN_EXTENSION 1 53 | #define portARMV8M_MINOR_VERSION 0 54 | #define portDONT_DISCARD __attribute__( ( used ) ) 55 | /*-----------------------------------------------------------*/ 56 | 57 | /* ARMv8-M common port configurations. */ 58 | #include "portmacrocommon.h" 59 | /*-----------------------------------------------------------*/ 60 | 61 | #ifndef configENABLE_MVE 62 | #define configENABLE_MVE 0 63 | #elif ( configENABLE_MVE != 0 ) 64 | #error configENABLE_MVE must be left undefined, or defined to 0 for the Cortex-M33. 65 | #endif 66 | /*-----------------------------------------------------------*/ 67 | 68 | /** 69 | * @brief Critical section management. 70 | */ 71 | #define portDISABLE_INTERRUPTS() ulSetInterruptMask() 72 | #define portENABLE_INTERRUPTS() vClearInterruptMask( 0 ) 73 | /*-----------------------------------------------------------*/ 74 | 75 | /* *INDENT-OFF* */ 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | /* *INDENT-ON* */ 80 | 81 | #endif /* PORTMACRO_H */ 82 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM35P/non_secure/portmacro.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef PORTMACRO_H 30 | #define PORTMACRO_H 31 | 32 | /* *INDENT-OFF* */ 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | /* *INDENT-ON* */ 37 | 38 | /*------------------------------------------------------------------------------ 39 | * Port specific definitions. 40 | * 41 | * The settings in this file configure FreeRTOS correctly for the given hardware 42 | * and compiler. 43 | * 44 | * These settings should not be altered. 45 | *------------------------------------------------------------------------------ 46 | */ 47 | 48 | /** 49 | * Architecture specifics. 50 | */ 51 | #define portARCH_NAME "Cortex-M35P" 52 | #define portHAS_ARMV8M_MAIN_EXTENSION 1 53 | #define portARMV8M_MINOR_VERSION 0 54 | #define portDONT_DISCARD __attribute__( ( used ) ) 55 | /*-----------------------------------------------------------*/ 56 | 57 | /* ARMv8-M common port configurations. */ 58 | #include "portmacrocommon.h" 59 | /*-----------------------------------------------------------*/ 60 | 61 | #ifndef configENABLE_MVE 62 | #define configENABLE_MVE 0 63 | #elif ( configENABLE_MVE != 0 ) 64 | #error configENABLE_MVE must be left undefined, or defined to 0 for the Cortex-M35. 65 | #endif 66 | /*-----------------------------------------------------------*/ 67 | 68 | /** 69 | * @brief Critical section management. 70 | */ 71 | #define portDISABLE_INTERRUPTS() ulSetInterruptMask() 72 | #define portENABLE_INTERRUPTS() vClearInterruptMask( 0 ) 73 | /*-----------------------------------------------------------*/ 74 | 75 | /* *INDENT-OFF* */ 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | /* *INDENT-ON* */ 80 | 81 | #endif /* PORTMACRO_H */ 82 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM35P/secure/secure_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_HEAP_H__ 30 | #define __SECURE_HEAP_H__ 31 | 32 | /* Standard includes. */ 33 | #include <stdlib.h> 34 | 35 | /** 36 | * @brief Allocates memory from heap. 37 | * 38 | * @param[in] xWantedSize The size of the memory to be allocated. 39 | * 40 | * @return Pointer to the memory region if the allocation is successful, NULL 41 | * otherwise. 42 | */ 43 | void * pvPortMalloc( size_t xWantedSize ); 44 | 45 | /** 46 | * @brief Frees the previously allocated memory. 47 | * 48 | * @param[in] pv Pointer to the memory to be freed. 49 | */ 50 | void vPortFree( void * pv ); 51 | 52 | /** 53 | * @brief Get the free heap size. 54 | * 55 | * @return Free heap size. 56 | */ 57 | size_t xPortGetFreeHeapSize( void ); 58 | 59 | /** 60 | * @brief Get the minimum ever free heap size. 61 | * 62 | * @return Minimum ever free heap size. 63 | */ 64 | size_t xPortGetMinimumEverFreeHeapSize( void ); 65 | 66 | #endif /* __SECURE_HEAP_H__ */ 67 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM35P/secure/secure_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_INIT_H__ 30 | #define __SECURE_INIT_H__ 31 | 32 | /** 33 | * @brief De-prioritizes the non-secure exceptions. 34 | * 35 | * This is needed to ensure that the non-secure PendSV runs at the lowest 36 | * priority. Context switch is done in the non-secure PendSV handler. 37 | * 38 | * @note This function must be called in the handler mode. It is no-op if called 39 | * in the thread mode. 40 | */ 41 | void SecureInit_DePrioritizeNSExceptions( void ); 42 | 43 | /** 44 | * @brief Sets up the Floating Point Unit (FPU) for Non-Secure access. 45 | * 46 | * Also sets FPCCR.TS=1 to ensure that the content of the Floating Point 47 | * Registers are not leaked to the non-secure side. 48 | * 49 | * @note This function must be called in the handler mode. It is no-op if called 50 | * in the thread mode. 51 | */ 52 | void SecureInit_EnableNSFPUAccess( void ); 53 | 54 | #endif /* __SECURE_INIT_H__ */ 55 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM55/non_secure/portmacro.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef PORTMACRO_H 30 | #define PORTMACRO_H 31 | 32 | /* *INDENT-OFF* */ 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | /* *INDENT-ON* */ 37 | 38 | /*------------------------------------------------------------------------------ 39 | * Port specific definitions. 40 | * 41 | * The settings in this file configure FreeRTOS correctly for the given hardware 42 | * and compiler. 43 | * 44 | * These settings should not be altered. 45 | *------------------------------------------------------------------------------ 46 | */ 47 | 48 | #ifndef configENABLE_MVE 49 | #error configENABLE_MVE must be defined in FreeRTOSConfig.h. Set configENABLE_MVE to 1 to enable the MVE or 0 to disable the MVE. 50 | #endif /* configENABLE_MVE */ 51 | /*-----------------------------------------------------------*/ 52 | 53 | /** 54 | * Architecture specifics. 55 | */ 56 | #define portARCH_NAME "Cortex-M55" 57 | #define portHAS_ARMV8M_MAIN_EXTENSION 1 58 | #define portARMV8M_MINOR_VERSION 1 59 | #define portDONT_DISCARD __attribute__( ( used ) ) 60 | /*-----------------------------------------------------------*/ 61 | 62 | /* ARMv8-M common port configurations. */ 63 | #include "portmacrocommon.h" 64 | /*-----------------------------------------------------------*/ 65 | 66 | /** 67 | * @brief Critical section management. 68 | */ 69 | #define portDISABLE_INTERRUPTS() ulSetInterruptMask() 70 | #define portENABLE_INTERRUPTS() vClearInterruptMask( 0 ) 71 | /*-----------------------------------------------------------*/ 72 | 73 | /* *INDENT-OFF* */ 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | /* *INDENT-ON* */ 78 | 79 | #endif /* PORTMACRO_H */ 80 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM55/secure/secure_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_HEAP_H__ 30 | #define __SECURE_HEAP_H__ 31 | 32 | /* Standard includes. */ 33 | #include <stdlib.h> 34 | 35 | /** 36 | * @brief Allocates memory from heap. 37 | * 38 | * @param[in] xWantedSize The size of the memory to be allocated. 39 | * 40 | * @return Pointer to the memory region if the allocation is successful, NULL 41 | * otherwise. 42 | */ 43 | void * pvPortMalloc( size_t xWantedSize ); 44 | 45 | /** 46 | * @brief Frees the previously allocated memory. 47 | * 48 | * @param[in] pv Pointer to the memory to be freed. 49 | */ 50 | void vPortFree( void * pv ); 51 | 52 | /** 53 | * @brief Get the free heap size. 54 | * 55 | * @return Free heap size. 56 | */ 57 | size_t xPortGetFreeHeapSize( void ); 58 | 59 | /** 60 | * @brief Get the minimum ever free heap size. 61 | * 62 | * @return Minimum ever free heap size. 63 | */ 64 | size_t xPortGetMinimumEverFreeHeapSize( void ); 65 | 66 | #endif /* __SECURE_HEAP_H__ */ 67 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM55/secure/secure_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_INIT_H__ 30 | #define __SECURE_INIT_H__ 31 | 32 | /** 33 | * @brief De-prioritizes the non-secure exceptions. 34 | * 35 | * This is needed to ensure that the non-secure PendSV runs at the lowest 36 | * priority. Context switch is done in the non-secure PendSV handler. 37 | * 38 | * @note This function must be called in the handler mode. It is no-op if called 39 | * in the thread mode. 40 | */ 41 | void SecureInit_DePrioritizeNSExceptions( void ); 42 | 43 | /** 44 | * @brief Sets up the Floating Point Unit (FPU) for Non-Secure access. 45 | * 46 | * Also sets FPCCR.TS=1 to ensure that the content of the Floating Point 47 | * Registers are not leaked to the non-secure side. 48 | * 49 | * @note This function must be called in the handler mode. It is no-op if called 50 | * in the thread mode. 51 | */ 52 | void SecureInit_EnableNSFPUAccess( void ); 53 | 54 | #endif /* __SECURE_INIT_H__ */ 55 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM55_NTZ/non_secure/portmacro.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef PORTMACRO_H 30 | #define PORTMACRO_H 31 | 32 | /* *INDENT-OFF* */ 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | /* *INDENT-ON* */ 37 | 38 | /*------------------------------------------------------------------------------ 39 | * Port specific definitions. 40 | * 41 | * The settings in this file configure FreeRTOS correctly for the given hardware 42 | * and compiler. 43 | * 44 | * These settings should not be altered. 45 | *------------------------------------------------------------------------------ 46 | */ 47 | 48 | #ifndef configENABLE_MVE 49 | #error configENABLE_MVE must be defined in FreeRTOSConfig.h. Set configENABLE_MVE to 1 to enable the MVE or 0 to disable the MVE. 50 | #endif /* configENABLE_MVE */ 51 | /*-----------------------------------------------------------*/ 52 | 53 | /** 54 | * Architecture specifics. 55 | */ 56 | #define portARCH_NAME "Cortex-M55" 57 | #define portHAS_ARMV8M_MAIN_EXTENSION 1 58 | #define portARMV8M_MINOR_VERSION 1 59 | #define portDONT_DISCARD __attribute__( ( used ) ) 60 | /*-----------------------------------------------------------*/ 61 | 62 | /* ARMv8-M common port configurations. */ 63 | #include "portmacrocommon.h" 64 | /*-----------------------------------------------------------*/ 65 | 66 | /** 67 | * @brief Critical section management. 68 | */ 69 | #define portDISABLE_INTERRUPTS() ulSetInterruptMask() 70 | #define portENABLE_INTERRUPTS() vClearInterruptMask( 0 ) 71 | /*-----------------------------------------------------------*/ 72 | 73 | /* *INDENT-OFF* */ 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | /* *INDENT-ON* */ 78 | 79 | #endif /* PORTMACRO_H */ 80 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM7/ReadMe.txt: -------------------------------------------------------------------------------- 1 | There are two options for running FreeRTOS on ARM Cortex-M7 microcontrollers. 2 | The best option depends on the revision of the ARM Cortex-M7 core in use. The 3 | revision is specified by an 'r' number, and a 'p' number, so will look something 4 | like 'r0p1'. Check the documentation for the microcontroller in use to find the 5 | revision of the Cortex-M7 core used in that microcontroller. If in doubt, use 6 | the FreeRTOS port provided specifically for r0p1 revisions, as that can be used 7 | with all core revisions. 8 | 9 | The first option is to use the ARM Cortex-M4F port, and the second option is to 10 | use the Cortex-M7 r0p1 port - the latter containing a minor errata workaround. 11 | 12 | If the revision of the ARM Cortex-M7 core is not r0p1 then either option can be 13 | used, but it is recommended to use the FreeRTOS ARM Cortex-M4F port located in 14 | the /FreeRTOS/Source/portable/GCC/ARM_CM4F directory. 15 | 16 | If the revision of the ARM Cortex-M7 core is r0p1 then use the FreeRTOS ARM 17 | Cortex-M7 r0p1 port located in the /FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1 18 | directory. 19 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM85/non_secure/portmacro.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef PORTMACRO_H 30 | #define PORTMACRO_H 31 | 32 | /* *INDENT-OFF* */ 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | /* *INDENT-ON* */ 37 | 38 | /*------------------------------------------------------------------------------ 39 | * Port specific definitions. 40 | * 41 | * The settings in this file configure FreeRTOS correctly for the given hardware 42 | * and compiler. 43 | * 44 | * These settings should not be altered. 45 | *------------------------------------------------------------------------------ 46 | */ 47 | 48 | #ifndef configENABLE_MVE 49 | #error configENABLE_MVE must be defined in FreeRTOSConfig.h. Set configENABLE_MVE to 1 to enable the MVE or 0 to disable the MVE. 50 | #endif /* configENABLE_MVE */ 51 | /*-----------------------------------------------------------*/ 52 | 53 | /** 54 | * Architecture specifics. 55 | */ 56 | #define portARCH_NAME "Cortex-M85" 57 | #define portHAS_ARMV8M_MAIN_EXTENSION 1 58 | #define portARMV8M_MINOR_VERSION 1 59 | #define portDONT_DISCARD __attribute__( ( used ) ) 60 | /*-----------------------------------------------------------*/ 61 | 62 | /* ARMv8-M common port configurations. */ 63 | #include "portmacrocommon.h" 64 | /*-----------------------------------------------------------*/ 65 | 66 | /** 67 | * @brief Critical section management. 68 | */ 69 | #define portDISABLE_INTERRUPTS() ulSetInterruptMask() 70 | #define portENABLE_INTERRUPTS() vClearInterruptMask( 0 ) 71 | /*-----------------------------------------------------------*/ 72 | 73 | /* *INDENT-OFF* */ 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | /* *INDENT-ON* */ 78 | 79 | #endif /* PORTMACRO_H */ 80 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM85/secure/secure_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_HEAP_H__ 30 | #define __SECURE_HEAP_H__ 31 | 32 | /* Standard includes. */ 33 | #include <stdlib.h> 34 | 35 | /** 36 | * @brief Allocates memory from heap. 37 | * 38 | * @param[in] xWantedSize The size of the memory to be allocated. 39 | * 40 | * @return Pointer to the memory region if the allocation is successful, NULL 41 | * otherwise. 42 | */ 43 | void * pvPortMalloc( size_t xWantedSize ); 44 | 45 | /** 46 | * @brief Frees the previously allocated memory. 47 | * 48 | * @param[in] pv Pointer to the memory to be freed. 49 | */ 50 | void vPortFree( void * pv ); 51 | 52 | /** 53 | * @brief Get the free heap size. 54 | * 55 | * @return Free heap size. 56 | */ 57 | size_t xPortGetFreeHeapSize( void ); 58 | 59 | /** 60 | * @brief Get the minimum ever free heap size. 61 | * 62 | * @return Minimum ever free heap size. 63 | */ 64 | size_t xPortGetMinimumEverFreeHeapSize( void ); 65 | 66 | #endif /* __SECURE_HEAP_H__ */ 67 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM85/secure/secure_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_INIT_H__ 30 | #define __SECURE_INIT_H__ 31 | 32 | /** 33 | * @brief De-prioritizes the non-secure exceptions. 34 | * 35 | * This is needed to ensure that the non-secure PendSV runs at the lowest 36 | * priority. Context switch is done in the non-secure PendSV handler. 37 | * 38 | * @note This function must be called in the handler mode. It is no-op if called 39 | * in the thread mode. 40 | */ 41 | void SecureInit_DePrioritizeNSExceptions( void ); 42 | 43 | /** 44 | * @brief Sets up the Floating Point Unit (FPU) for Non-Secure access. 45 | * 46 | * Also sets FPCCR.TS=1 to ensure that the content of the Floating Point 47 | * Registers are not leaked to the non-secure side. 48 | * 49 | * @note This function must be called in the handler mode. It is no-op if called 50 | * in the thread mode. 51 | */ 52 | void SecureInit_EnableNSFPUAccess( void ); 53 | 54 | #endif /* __SECURE_INIT_H__ */ 55 | -------------------------------------------------------------------------------- /portable/GCC/ARM_CM85_NTZ/non_secure/portmacro.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef PORTMACRO_H 30 | #define PORTMACRO_H 31 | 32 | /* *INDENT-OFF* */ 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | /* *INDENT-ON* */ 37 | 38 | /*------------------------------------------------------------------------------ 39 | * Port specific definitions. 40 | * 41 | * The settings in this file configure FreeRTOS correctly for the given hardware 42 | * and compiler. 43 | * 44 | * These settings should not be altered. 45 | *------------------------------------------------------------------------------ 46 | */ 47 | 48 | #ifndef configENABLE_MVE 49 | #error configENABLE_MVE must be defined in FreeRTOSConfig.h. Set configENABLE_MVE to 1 to enable the MVE or 0 to disable the MVE. 50 | #endif /* configENABLE_MVE */ 51 | /*-----------------------------------------------------------*/ 52 | 53 | /** 54 | * Architecture specifics. 55 | */ 56 | #define portARCH_NAME "Cortex-M85" 57 | #define portHAS_ARMV8M_MAIN_EXTENSION 1 58 | #define portARMV8M_MINOR_VERSION 1 59 | #define portDONT_DISCARD __attribute__( ( used ) ) 60 | /*-----------------------------------------------------------*/ 61 | 62 | /* ARMv8-M common port configurations. */ 63 | #include "portmacrocommon.h" 64 | /*-----------------------------------------------------------*/ 65 | 66 | /** 67 | * @brief Critical section management. 68 | */ 69 | #define portDISABLE_INTERRUPTS() ulSetInterruptMask() 70 | #define portENABLE_INTERRUPTS() vClearInterruptMask( 0 ) 71 | /*-----------------------------------------------------------*/ 72 | 73 | /* *INDENT-OFF* */ 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | /* *INDENT-ON* */ 78 | 79 | #endif /* PORTMACRO_H */ 80 | -------------------------------------------------------------------------------- /portable/GCC/AVR_AVRDx/README.md: -------------------------------------------------------------------------------- 1 | This port has been moved to `portable/ThirdParty/Partner-Supported-Ports/GCC/AVR_AVRDx` directory. 2 | -------------------------------------------------------------------------------- /portable/GCC/AVR_Mega0/README.md: -------------------------------------------------------------------------------- 1 | This port has been moved to `portable/ThirdParty/Partner-Supported-Ports/GCC/AVR_Mega0` directory. 2 | -------------------------------------------------------------------------------- /portable/GCC/MCF5235/readme.md: -------------------------------------------------------------------------------- 1 | The MCF5235 port is deprecated. The last FreeRTOS version that includes this port is 10.4.3. 2 | 3 | -------------------------------------------------------------------------------- /portable/GCC/PPC405_Xilinx/FPU_Macros.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | /* When switching out a task, if the task tag contains a buffer address then 30 | * save the flop context into the buffer. */ 31 | #define traceTASK_SWITCHED_OUT() \ 32 | if( pxCurrentTCB->pxTaskTag != NULL ) \ 33 | { \ 34 | extern void vPortSaveFPURegisters( void * ); \ 35 | vPortSaveFPURegisters( ( void * ) ( pxCurrentTCB->pxTaskTag ) ); \ 36 | } 37 | 38 | /* When switching in a task, if the task tag contains a buffer address then 39 | * load the flop context from the buffer. */ 40 | #define traceTASK_SWITCHED_IN() \ 41 | if( pxCurrentTCB->pxTaskTag != NULL ) \ 42 | { \ 43 | extern void vPortRestoreFPURegisters( void * ); \ 44 | vPortRestoreFPURegisters( ( void * ) ( pxCurrentTCB->pxTaskTag ) ); \ 45 | } 46 | -------------------------------------------------------------------------------- /portable/GCC/PPC440_Xilinx/FPU_Macros.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | /* When switching out a task, if the task tag contains a buffer address then 30 | * save the flop context into the buffer. */ 31 | #define traceTASK_SWITCHED_OUT() \ 32 | if( pxCurrentTCB->pxTaskTag != NULL ) \ 33 | { \ 34 | extern void vPortSaveFPURegisters( void * ); \ 35 | vPortSaveFPURegisters( ( void * ) ( pxCurrentTCB->pxTaskTag ) ); \ 36 | } 37 | 38 | /* When switching in a task, if the task tag contains a buffer address then 39 | * load the flop context from the buffer. */ 40 | #define traceTASK_SWITCHED_IN() \ 41 | if( pxCurrentTCB->pxTaskTag != NULL ) \ 42 | { \ 43 | extern void vPortRestoreFPURegisters( void * ); \ 44 | vPortRestoreFPURegisters( ( void * ) ( pxCurrentTCB->pxTaskTag ) ); \ 45 | } 46 | -------------------------------------------------------------------------------- /portable/GCC/RISC-V/Documentation.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,11 3 | [InternetShortcut] 4 | IDList= 5 | URL=https://www.FreeRTOS.org/Using-FreeRTOS-on-RISC-V.html 6 | -------------------------------------------------------------------------------- /portable/GCC/RISC-V/chip_extensions.cmake: -------------------------------------------------------------------------------- 1 | if( FREERTOS_PORT STREQUAL "GCC_RISC_V_GENERIC" ) 2 | set( VALID_CHIP_EXTENSIONS 3 | "Pulpino_Vega_RV32M1RM" 4 | "RISCV_MTIME_CLINT_no_extensions" 5 | "RISCV_no_extensions" 6 | "RV32I_CLINT_no_extensions" ) 7 | 8 | if( ( NOT FREERTOS_RISCV_EXTENSION ) OR ( NOT ( ${FREERTOS_RISCV_EXTENSION} IN_LIST VALID_CHIP_EXTENSIONS ) ) ) 9 | message(FATAL_ERROR 10 | "FREERTOS_RISCV_EXTENSION \"${FREERTOS_RISCV_EXTENSION}\" is not set or unsupported.\n" 11 | "Please specify it from top-level CMake file (example):\n" 12 | " set(FREERTOS_RISCV_EXTENSION RISCV_MTIME_CLINT_no_extensions CACHE STRING \"\")\n" 13 | " or from CMake command line option:\n" 14 | " -DFREERTOS_RISCV_EXTENSION=RISCV_MTIME_CLINT_no_extensions\n" 15 | "\n" 16 | " Available extension options:\n" 17 | " ${VALID_CHIP_EXTENSIONS} \n") 18 | endif() 19 | endif() 20 | -------------------------------------------------------------------------------- /portable/GCC/RISC-V/chip_specific_extensions/readme.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * The FreeRTOS kernel's RISC-V port is split between the the code that is 3 | * common across all currently supported RISC-V chips (implementations of the 4 | * RISC-V ISA), and code that tailors the port to a specific RISC-V chip: 5 | * 6 | * + FreeRTOS\Source\portable\GCC\RISC-V\portASM.S contains the code that 7 | * is common to all currently supported RISC-V chips. There is only one 8 | * portASM.S file because the same file is built for all RISC-V target chips. 9 | * 10 | * + Header files called freertos_risc_v_chip_specific_extensions.h contain the 11 | * code that tailors the FreeRTOS kernel's RISC-V port to a specific RISC-V 12 | * chip. There are multiple freertos_risc_v_chip_specific_extensions.h files 13 | * as there are multiple RISC-V chip implementations. 14 | * 15 | * !!!NOTE!!! 16 | * TAKE CARE TO INCLUDE THE CORRECT freertos_risc_v_chip_specific_extensions.h 17 | * HEADER FILE FOR THE CHIP IN USE. This is done using the assembler's (not the 18 | * compiler's!) include path. For example, if the chip in use includes a core 19 | * local interrupter (CLINT) and does not include any chip specific register 20 | * extensions then add the path below to the assembler's include path: 21 | * FreeRTOS\Source\portable\GCC\RISC-V\chip_specific_extensions\RV32I_CLINT_no_extensions 22 | * 23 | */ 24 | -------------------------------------------------------------------------------- /portable/GCC/RISC-V/readme.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * The FreeRTOS kernel's RISC-V port is split between the the code that is 3 | * common across all currently supported RISC-V chips (implementations of the 4 | * RISC-V ISA), and code that tailors the port to a specific RISC-V chip: 5 | * 6 | * + FreeRTOS\Source\portable\GCC\RISC-V\portASM.S contains the code that 7 | * is common to all currently supported RISC-V chips. There is only one 8 | * portASM.S file because the same file is built for all RISC-V target chips. 9 | * 10 | * + Header files called freertos_risc_v_chip_specific_extensions.h contain the 11 | * code that tailors the FreeRTOS kernel's RISC-V port to a specific RISC-V 12 | * chip. There are multiple freertos_risc_v_chip_specific_extensions.h files 13 | * as there are multiple RISC-V chip implementations. 14 | * 15 | * !!!NOTE!!! 16 | * TAKE CARE TO INCLUDE THE CORRECT freertos_risc_v_chip_specific_extensions.h 17 | * HEADER FILE FOR THE CHIP IN USE. This is done using the assembler's (not the 18 | * compiler's!) include path. For example, if the chip in use includes a core 19 | * local interrupter (CLINT) and does not include any chip specific register 20 | * extensions then add the path below to the assembler's include path: 21 | * FreeRTOS\Source\portable\GCC\RISC-V\chip_specific_extensions\RV32I_CLINT_no_extensions 22 | * 23 | */ 24 | -------------------------------------------------------------------------------- /portable/GCC/RL78/portasm.S: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #include "FreeRTOSConfig.h" 30 | #include "ISR_Support.h" 31 | 32 | .global _vPortYield 33 | .global _vPortStartFirstTask 34 | .global _vPortTickISR 35 | 36 | .extern _vTaskSwitchContext 37 | .extern _xTaskIncrementTick 38 | 39 | .text 40 | .align 2 41 | 42 | /* FreeRTOS yield handler. This is installed as the BRK software interrupt 43 | handler. */ 44 | _vPortYield: 45 | /* Save the context of the current task. */ 46 | portSAVE_CONTEXT 47 | /* Call the scheduler to select the next task. */ 48 | call !!_vTaskSwitchContext 49 | /* Restore the context of the next task to run. */ 50 | portRESTORE_CONTEXT 51 | retb 52 | 53 | 54 | /* Starts the scheduler by restoring the context of the task that will execute 55 | first. */ 56 | .align 2 57 | _vPortStartFirstTask: 58 | /* Restore the context of whichever task will execute first. */ 59 | portRESTORE_CONTEXT 60 | /* An interrupt stack frame is used so the task is started using RETI. */ 61 | reti 62 | 63 | /* FreeRTOS tick handler. This is installed as the interval timer interrupt 64 | handler. */ 65 | .align 2 66 | _vPortTickISR: 67 | 68 | /* Save the context of the currently executing task. */ 69 | portSAVE_CONTEXT 70 | /* Call the RTOS tick function. */ 71 | call !!_xTaskIncrementTick 72 | #if configUSE_PREEMPTION == 1 73 | /* Select the next task to run. */ 74 | call !!_vTaskSwitchContext 75 | #endif 76 | /* Retore the context of whichever task will run next. */ 77 | portRESTORE_CONTEXT 78 | reti 79 | 80 | .end 81 | -------------------------------------------------------------------------------- /portable/IAR/ARM_CM23/secure/secure_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_HEAP_H__ 30 | #define __SECURE_HEAP_H__ 31 | 32 | /* Standard includes. */ 33 | #include <stdlib.h> 34 | 35 | /** 36 | * @brief Allocates memory from heap. 37 | * 38 | * @param[in] xWantedSize The size of the memory to be allocated. 39 | * 40 | * @return Pointer to the memory region if the allocation is successful, NULL 41 | * otherwise. 42 | */ 43 | void * pvPortMalloc( size_t xWantedSize ); 44 | 45 | /** 46 | * @brief Frees the previously allocated memory. 47 | * 48 | * @param[in] pv Pointer to the memory to be freed. 49 | */ 50 | void vPortFree( void * pv ); 51 | 52 | /** 53 | * @brief Get the free heap size. 54 | * 55 | * @return Free heap size. 56 | */ 57 | size_t xPortGetFreeHeapSize( void ); 58 | 59 | /** 60 | * @brief Get the minimum ever free heap size. 61 | * 62 | * @return Minimum ever free heap size. 63 | */ 64 | size_t xPortGetMinimumEverFreeHeapSize( void ); 65 | 66 | #endif /* __SECURE_HEAP_H__ */ 67 | -------------------------------------------------------------------------------- /portable/IAR/ARM_CM23/secure/secure_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_INIT_H__ 30 | #define __SECURE_INIT_H__ 31 | 32 | /** 33 | * @brief De-prioritizes the non-secure exceptions. 34 | * 35 | * This is needed to ensure that the non-secure PendSV runs at the lowest 36 | * priority. Context switch is done in the non-secure PendSV handler. 37 | * 38 | * @note This function must be called in the handler mode. It is no-op if called 39 | * in the thread mode. 40 | */ 41 | void SecureInit_DePrioritizeNSExceptions( void ); 42 | 43 | /** 44 | * @brief Sets up the Floating Point Unit (FPU) for Non-Secure access. 45 | * 46 | * Also sets FPCCR.TS=1 to ensure that the content of the Floating Point 47 | * Registers are not leaked to the non-secure side. 48 | * 49 | * @note This function must be called in the handler mode. It is no-op if called 50 | * in the thread mode. 51 | */ 52 | void SecureInit_EnableNSFPUAccess( void ); 53 | 54 | #endif /* __SECURE_INIT_H__ */ 55 | -------------------------------------------------------------------------------- /portable/IAR/ARM_CM33/secure/secure_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_HEAP_H__ 30 | #define __SECURE_HEAP_H__ 31 | 32 | /* Standard includes. */ 33 | #include <stdlib.h> 34 | 35 | /** 36 | * @brief Allocates memory from heap. 37 | * 38 | * @param[in] xWantedSize The size of the memory to be allocated. 39 | * 40 | * @return Pointer to the memory region if the allocation is successful, NULL 41 | * otherwise. 42 | */ 43 | void * pvPortMalloc( size_t xWantedSize ); 44 | 45 | /** 46 | * @brief Frees the previously allocated memory. 47 | * 48 | * @param[in] pv Pointer to the memory to be freed. 49 | */ 50 | void vPortFree( void * pv ); 51 | 52 | /** 53 | * @brief Get the free heap size. 54 | * 55 | * @return Free heap size. 56 | */ 57 | size_t xPortGetFreeHeapSize( void ); 58 | 59 | /** 60 | * @brief Get the minimum ever free heap size. 61 | * 62 | * @return Minimum ever free heap size. 63 | */ 64 | size_t xPortGetMinimumEverFreeHeapSize( void ); 65 | 66 | #endif /* __SECURE_HEAP_H__ */ 67 | -------------------------------------------------------------------------------- /portable/IAR/ARM_CM33/secure/secure_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_INIT_H__ 30 | #define __SECURE_INIT_H__ 31 | 32 | /** 33 | * @brief De-prioritizes the non-secure exceptions. 34 | * 35 | * This is needed to ensure that the non-secure PendSV runs at the lowest 36 | * priority. Context switch is done in the non-secure PendSV handler. 37 | * 38 | * @note This function must be called in the handler mode. It is no-op if called 39 | * in the thread mode. 40 | */ 41 | void SecureInit_DePrioritizeNSExceptions( void ); 42 | 43 | /** 44 | * @brief Sets up the Floating Point Unit (FPU) for Non-Secure access. 45 | * 46 | * Also sets FPCCR.TS=1 to ensure that the content of the Floating Point 47 | * Registers are not leaked to the non-secure side. 48 | * 49 | * @note This function must be called in the handler mode. It is no-op if called 50 | * in the thread mode. 51 | */ 52 | void SecureInit_EnableNSFPUAccess( void ); 53 | 54 | #endif /* __SECURE_INIT_H__ */ 55 | -------------------------------------------------------------------------------- /portable/IAR/ARM_CM35P/secure/secure_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_HEAP_H__ 30 | #define __SECURE_HEAP_H__ 31 | 32 | /* Standard includes. */ 33 | #include <stdlib.h> 34 | 35 | /** 36 | * @brief Allocates memory from heap. 37 | * 38 | * @param[in] xWantedSize The size of the memory to be allocated. 39 | * 40 | * @return Pointer to the memory region if the allocation is successful, NULL 41 | * otherwise. 42 | */ 43 | void * pvPortMalloc( size_t xWantedSize ); 44 | 45 | /** 46 | * @brief Frees the previously allocated memory. 47 | * 48 | * @param[in] pv Pointer to the memory to be freed. 49 | */ 50 | void vPortFree( void * pv ); 51 | 52 | /** 53 | * @brief Get the free heap size. 54 | * 55 | * @return Free heap size. 56 | */ 57 | size_t xPortGetFreeHeapSize( void ); 58 | 59 | /** 60 | * @brief Get the minimum ever free heap size. 61 | * 62 | * @return Minimum ever free heap size. 63 | */ 64 | size_t xPortGetMinimumEverFreeHeapSize( void ); 65 | 66 | #endif /* __SECURE_HEAP_H__ */ 67 | -------------------------------------------------------------------------------- /portable/IAR/ARM_CM35P/secure/secure_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_INIT_H__ 30 | #define __SECURE_INIT_H__ 31 | 32 | /** 33 | * @brief De-prioritizes the non-secure exceptions. 34 | * 35 | * This is needed to ensure that the non-secure PendSV runs at the lowest 36 | * priority. Context switch is done in the non-secure PendSV handler. 37 | * 38 | * @note This function must be called in the handler mode. It is no-op if called 39 | * in the thread mode. 40 | */ 41 | void SecureInit_DePrioritizeNSExceptions( void ); 42 | 43 | /** 44 | * @brief Sets up the Floating Point Unit (FPU) for Non-Secure access. 45 | * 46 | * Also sets FPCCR.TS=1 to ensure that the content of the Floating Point 47 | * Registers are not leaked to the non-secure side. 48 | * 49 | * @note This function must be called in the handler mode. It is no-op if called 50 | * in the thread mode. 51 | */ 52 | void SecureInit_EnableNSFPUAccess( void ); 53 | 54 | #endif /* __SECURE_INIT_H__ */ 55 | -------------------------------------------------------------------------------- /portable/IAR/ARM_CM55/secure/secure_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_HEAP_H__ 30 | #define __SECURE_HEAP_H__ 31 | 32 | /* Standard includes. */ 33 | #include <stdlib.h> 34 | 35 | /** 36 | * @brief Allocates memory from heap. 37 | * 38 | * @param[in] xWantedSize The size of the memory to be allocated. 39 | * 40 | * @return Pointer to the memory region if the allocation is successful, NULL 41 | * otherwise. 42 | */ 43 | void * pvPortMalloc( size_t xWantedSize ); 44 | 45 | /** 46 | * @brief Frees the previously allocated memory. 47 | * 48 | * @param[in] pv Pointer to the memory to be freed. 49 | */ 50 | void vPortFree( void * pv ); 51 | 52 | /** 53 | * @brief Get the free heap size. 54 | * 55 | * @return Free heap size. 56 | */ 57 | size_t xPortGetFreeHeapSize( void ); 58 | 59 | /** 60 | * @brief Get the minimum ever free heap size. 61 | * 62 | * @return Minimum ever free heap size. 63 | */ 64 | size_t xPortGetMinimumEverFreeHeapSize( void ); 65 | 66 | #endif /* __SECURE_HEAP_H__ */ 67 | -------------------------------------------------------------------------------- /portable/IAR/ARM_CM55/secure/secure_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_INIT_H__ 30 | #define __SECURE_INIT_H__ 31 | 32 | /** 33 | * @brief De-prioritizes the non-secure exceptions. 34 | * 35 | * This is needed to ensure that the non-secure PendSV runs at the lowest 36 | * priority. Context switch is done in the non-secure PendSV handler. 37 | * 38 | * @note This function must be called in the handler mode. It is no-op if called 39 | * in the thread mode. 40 | */ 41 | void SecureInit_DePrioritizeNSExceptions( void ); 42 | 43 | /** 44 | * @brief Sets up the Floating Point Unit (FPU) for Non-Secure access. 45 | * 46 | * Also sets FPCCR.TS=1 to ensure that the content of the Floating Point 47 | * Registers are not leaked to the non-secure side. 48 | * 49 | * @note This function must be called in the handler mode. It is no-op if called 50 | * in the thread mode. 51 | */ 52 | void SecureInit_EnableNSFPUAccess( void ); 53 | 54 | #endif /* __SECURE_INIT_H__ */ 55 | -------------------------------------------------------------------------------- /portable/IAR/ARM_CM7/ReadMe.txt: -------------------------------------------------------------------------------- 1 | There are two options for running FreeRTOS on ARM Cortex-M7 microcontrollers. 2 | The best option depends on the revision of the ARM Cortex-M7 core in use. The 3 | revision is specified by an 'r' number, and a 'p' number, so will look something 4 | like 'r0p1'. Check the documentation for the microcontroller in use to find the 5 | revision of the Cortex-M7 core used in that microcontroller. If in doubt, use 6 | the FreeRTOS port provided specifically for r0p1 revisions, as that can be used 7 | with all core revisions. 8 | 9 | The first option is to use the ARM Cortex-M4F port, and the second option is to 10 | use the Cortex-M7 r0p1 port - the latter containing a minor errata workaround. 11 | 12 | If the revision of the ARM Cortex-M7 core is not r0p1 then either option can be 13 | used, but it is recommended to use the FreeRTOS ARM Cortex-M4F port located in 14 | the /FreeRTOS/Source/portable/IAR/ARM_CM4F directory. 15 | 16 | If the revision of the ARM Cortex-M7 core is r0p1 then use the FreeRTOS ARM 17 | Cortex-M7 r0p1 port located in the /FreeRTOS/Source/portable/IAR/ARM_CM7/r0p1 18 | directory. 19 | -------------------------------------------------------------------------------- /portable/IAR/ARM_CM85/secure/secure_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_HEAP_H__ 30 | #define __SECURE_HEAP_H__ 31 | 32 | /* Standard includes. */ 33 | #include <stdlib.h> 34 | 35 | /** 36 | * @brief Allocates memory from heap. 37 | * 38 | * @param[in] xWantedSize The size of the memory to be allocated. 39 | * 40 | * @return Pointer to the memory region if the allocation is successful, NULL 41 | * otherwise. 42 | */ 43 | void * pvPortMalloc( size_t xWantedSize ); 44 | 45 | /** 46 | * @brief Frees the previously allocated memory. 47 | * 48 | * @param[in] pv Pointer to the memory to be freed. 49 | */ 50 | void vPortFree( void * pv ); 51 | 52 | /** 53 | * @brief Get the free heap size. 54 | * 55 | * @return Free heap size. 56 | */ 57 | size_t xPortGetFreeHeapSize( void ); 58 | 59 | /** 60 | * @brief Get the minimum ever free heap size. 61 | * 62 | * @return Minimum ever free heap size. 63 | */ 64 | size_t xPortGetMinimumEverFreeHeapSize( void ); 65 | 66 | #endif /* __SECURE_HEAP_H__ */ 67 | -------------------------------------------------------------------------------- /portable/IAR/ARM_CM85/secure/secure_init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef __SECURE_INIT_H__ 30 | #define __SECURE_INIT_H__ 31 | 32 | /** 33 | * @brief De-prioritizes the non-secure exceptions. 34 | * 35 | * This is needed to ensure that the non-secure PendSV runs at the lowest 36 | * priority. Context switch is done in the non-secure PendSV handler. 37 | * 38 | * @note This function must be called in the handler mode. It is no-op if called 39 | * in the thread mode. 40 | */ 41 | void SecureInit_DePrioritizeNSExceptions( void ); 42 | 43 | /** 44 | * @brief Sets up the Floating Point Unit (FPU) for Non-Secure access. 45 | * 46 | * Also sets FPCCR.TS=1 to ensure that the content of the Floating Point 47 | * Registers are not leaked to the non-secure side. 48 | * 49 | * @note This function must be called in the handler mode. It is no-op if called 50 | * in the thread mode. 51 | */ 52 | void SecureInit_EnableNSFPUAccess( void ); 53 | 54 | #endif /* __SECURE_INIT_H__ */ 55 | -------------------------------------------------------------------------------- /portable/IAR/AtmelSAM9XE/portasm.s79: -------------------------------------------------------------------------------- 1 | ;/* 2 | ; * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | ; * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | ; * 5 | ; * SPDX-License-Identifier: MIT 6 | ; * 7 | ; * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | ; * this software and associated documentation files (the "Software"), to deal in 9 | ; * the Software without restriction, including without limitation the rights to 10 | ; * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | ; * the Software, and to permit persons to whom the Software is furnished to do so, 12 | ; * subject to the following conditions: 13 | ; * 14 | ; * The above copyright notice and this permission notice shall be included in all 15 | ; * copies or substantial portions of the Software. 16 | ; * 17 | ; * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | ; * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | ; * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | ; * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | ; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | ; * 24 | ; * https://www.FreeRTOS.org 25 | ; * https://github.com/FreeRTOS 26 | ; * 27 | ; */ 28 | RSEG ICODE:CODE 29 | CODE32 30 | 31 | EXTERN vTaskSwitchContext 32 | 33 | PUBLIC vPortYieldProcessor 34 | PUBLIC vPortStartFirstTask 35 | 36 | #include "ISR_Support.h" 37 | 38 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 39 | ; Starting the first task is just a matter of restoring the context that 40 | ; was created by pxPortInitialiseStack(). 41 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 42 | vPortStartFirstTask: 43 | portRESTORE_CONTEXT 44 | 45 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 46 | ; Manual context switch function. This is the SWI hander. 47 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 48 | vPortYieldProcessor: 49 | ADD LR, LR, #4 ; Add 4 to the LR to make the LR appear exactly 50 | ; as if the context was saved during and IRQ 51 | ; handler. 52 | 53 | portSAVE_CONTEXT ; Save the context of the current task... 54 | LDR R0, =vTaskSwitchContext ; before selecting the next task to execute. 55 | mov lr, pc 56 | BX R0 57 | portRESTORE_CONTEXT ; Restore the context of the selected task. 58 | 59 | 60 | END 61 | -------------------------------------------------------------------------------- /portable/IAR/MSP430/portasm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef PORTASM_H 30 | #define PORTASM_H 31 | 32 | portSAVE_CONTEXT macro 33 | 34 | IMPORT pxCurrentTCB 35 | IMPORT usCriticalNesting 36 | 37 | /* Save the remaining registers. */ 38 | push r4 39 | push r5 40 | push r6 41 | push r7 42 | push r8 43 | push r9 44 | push r10 45 | push r11 46 | push r12 47 | push r13 48 | push r14 49 | push r15 50 | mov.w &usCriticalNesting, r14 51 | push r14 52 | mov.w &pxCurrentTCB, r12 53 | mov.w r1, 0(r12) 54 | endm 55 | /*-----------------------------------------------------------*/ 56 | 57 | portRESTORE_CONTEXT macro 58 | mov.w &pxCurrentTCB, r12 59 | mov.w @r12, r1 60 | pop r15 61 | mov.w r15, &usCriticalNesting 62 | pop r15 63 | pop r14 64 | pop r13 65 | pop r12 66 | pop r11 67 | pop r10 68 | pop r9 69 | pop r8 70 | pop r7 71 | pop r6 72 | pop r5 73 | pop r4 74 | 75 | /* The last thing on the stack will be the status register. 76 | * Ensure the power down bits are clear ready for the next 77 | * time this power down register is popped from the stack. */ 78 | bic.w #0xf0, 0(SP) 79 | 80 | reti 81 | endm 82 | /*-----------------------------------------------------------*/ 83 | 84 | #endif /* ifndef PORTASM_H */ 85 | -------------------------------------------------------------------------------- /portable/IAR/MSP430X/data_model.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef DATA_MODEL_H 30 | #define DATA_MODEL_H 31 | 32 | #if __DATA_MODEL__ == __DATA_MODEL_SMALL__ 33 | #define pushm_x pushm.w 34 | #define popm_x popm.w 35 | #define push_x push.w 36 | #define pop_x pop.w 37 | #define mov_x mov.w 38 | #define cmp_x cmp.w 39 | #endif 40 | 41 | #if __DATA_MODEL__ == __DATA_MODEL_MEDIUM__ 42 | #define pushm_x pushm.a 43 | #define popm_x popm.a 44 | #define push_x pushx.a 45 | #define pop_x popx.a 46 | #define mov_x mov.w 47 | #define cmp_x cmp.w 48 | #endif 49 | 50 | #if __DATA_MODEL__ == __DATA_MODEL_LARGE__ 51 | #define pushm_x pushm.a 52 | #define popm_x popm.a 53 | #define push_x pushx.a 54 | #define pop_x popx.a 55 | #define mov_x movx.a 56 | #define cmp_x cmpx.a 57 | #endif 58 | 59 | #ifndef pushm_x 60 | #error The assembler options must define one of the following symbols: __DATA_MODEL_SMALL__, __DATA_MODEL_MEDIUM__, or __DATA_MODEL_LARGE__ 61 | #endif 62 | 63 | #endif /* DATA_MODEL_H */ 64 | -------------------------------------------------------------------------------- /portable/IAR/RISC-V/Documentation.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,11 3 | [InternetShortcut] 4 | IDList= 5 | URL=https://www.FreeRTOS.org/Using-FreeRTOS-on-RISC-V.html 6 | -------------------------------------------------------------------------------- /portable/IAR/RISC-V/chip_extensions.cmake: -------------------------------------------------------------------------------- 1 | if( FREERTOS_PORT STREQUAL "IAR_RISC_V_GENERIC" ) 2 | set( VALID_CHIP_EXTENSIONS 3 | "RV32I_CLINT_no_extensions" ) 4 | 5 | if( ( NOT FREERTOS_RISCV_EXTENSION ) OR ( NOT ( ${FREERTOS_RISCV_EXTENSION} IN_LIST VALID_CHIP_EXTENSIONS ) ) ) 6 | message(FATAL_ERROR 7 | "FREERTOS_RISCV_EXTENSION \"${FREERTOS_RISCV_EXTENSION}\" is not set or unsupported.\n" 8 | "Please specify it from top-level CMake file (example):\n" 9 | " set(FREERTOS_RISCV_EXTENSION RISCV_MTIME_CLINT_no_extensions CACHE STRING \"\")\n" 10 | " or from CMake command line option:\n" 11 | " -DFREERTOS_RISCV_EXTENSION=RISCV_MTIME_CLINT_no_extensions\n" 12 | "\n" 13 | " Available extension options:\n" 14 | " ${VALID_CHIP_EXTENSIONS} \n") 15 | endif() 16 | endif() 17 | -------------------------------------------------------------------------------- /portable/IAR/RISC-V/chip_specific_extensions/readme.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * The FreeRTOS kernel's RISC-V port is split between the the code that is 3 | * common across all currently supported RISC-V chips (implementations of the 4 | * RISC-V ISA), and code that tailors the port to a specific RISC-V chip: 5 | * 6 | * + FreeRTOS\Source\portable\GCC\RISC-V-RV32\portASM.S contains the code that 7 | * is common to all currently supported RISC-V chips. There is only one 8 | * portASM.S file because the same file is built for all RISC-V target chips. 9 | * 10 | * + Header files called freertos_risc_v_chip_specific_extensions.h contain the 11 | * code that tailors the FreeRTOS kernel's RISC-V port to a specific RISC-V 12 | * chip. There are multiple freertos_risc_v_chip_specific_extensions.h files 13 | * as there are multiple RISC-V chip implementations. 14 | * 15 | * !!!NOTE!!! 16 | * TAKE CARE TO INCLUDE THE CORRECT freertos_risc_v_chip_specific_extensions.h 17 | * HEADER FILE FOR THE CHIP IN USE. This is done using the assembler's (not the 18 | * compiler's!) include path. For example, if the chip in use includes a core 19 | * local interrupter (CLINT) and does not include any chip specific register 20 | * extensions then add the path below to the assembler's include path: 21 | * FreeRTOS\Source\portable\GCC\RISC-V-RV32\chip_specific_extensions\RV32I_CLINT_no_extensions 22 | * 23 | */ 24 | -------------------------------------------------------------------------------- /portable/IAR/RISC-V/readme.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * The FreeRTOS kernel's RISC-V port is split between the the code that is 3 | * common across all currently supported RISC-V chips (implementations of the 4 | * RISC-V ISA), and code that tailors the port to a specific RISC-V chip: 5 | * 6 | * + FreeRTOS\Source\portable\GCC\RISC-V-RV32\portASM.S contains the code that 7 | * is common to all currently supported RISC-V chips. There is only one 8 | * portASM.S file because the same file is built for all RISC-V target chips. 9 | * 10 | * + Header files called freertos_risc_v_chip_specific_extensions.h contain the 11 | * code that tailors the FreeRTOS kernel's RISC-V port to a specific RISC-V 12 | * chip. There are multiple freertos_risc_v_chip_specific_extensions.h files 13 | * as there are multiple RISC-V chip implementations. 14 | * 15 | * !!!NOTE!!! 16 | * TAKE CARE TO INCLUDE THE CORRECT freertos_risc_v_chip_specific_extensions.h 17 | * HEADER FILE FOR THE CHIP IN USE. This is done using the assembler's (not the 18 | * compiler's!) include path. For example, if the chip in use includes a core 19 | * local interrupter (CLINT) and does not include any chip specific register 20 | * extensions then add the path below to the assembler's include path: 21 | * FreeRTOS\Source\portable\GCC\RISC-V-RV32\chip_specific_extensions\RV32I_CLINT_no_extensions 22 | * 23 | */ 24 | -------------------------------------------------------------------------------- /portable/IAR/STR75x/portasm.s79: -------------------------------------------------------------------------------- 1 | ;/* 2 | ; * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | ; * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | ; * 5 | ; * SPDX-License-Identifier: MIT 6 | ; * 7 | ; * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | ; * this software and associated documentation files (the "Software"), to deal in 9 | ; * the Software without restriction, including without limitation the rights to 10 | ; * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | ; * the Software, and to permit persons to whom the Software is furnished to do so, 12 | ; * subject to the following conditions: 13 | ; * 14 | ; * The above copyright notice and this permission notice shall be included in all 15 | ; * copies or substantial portions of the Software. 16 | ; * 17 | ; * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | ; * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | ; * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | ; * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | ; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | ; * 24 | ; * https://www.FreeRTOS.org 25 | ; * https://github.com/FreeRTOS 26 | ; * 27 | ; */ 28 | 29 | RSEG ICODE:CODE 30 | CODE32 31 | 32 | EXTERN vPortPreemptiveTick 33 | EXTERN vTaskSwitchContext 34 | 35 | PUBLIC vPortYieldProcessor 36 | PUBLIC vPortStartFirstTask 37 | 38 | #include "ISR_Support.h" 39 | 40 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 41 | ; Starting the first task is just a matter of restoring the context that 42 | ; was created by pxPortInitialiseStack(). 43 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 44 | vPortStartFirstTask: 45 | portRESTORE_CONTEXT 46 | 47 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 48 | ; Manual context switch function. This is the SWI hander. 49 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 50 | vPortYieldProcessor: 51 | ADD LR, LR, #4 ; Add 4 to the LR to make the LR appear exactly 52 | ; as if the context was saved during and IRQ 53 | ; handler. 54 | 55 | portSAVE_CONTEXT ; Save the context of the current task... 56 | LDR R0, =vTaskSwitchContext ; before selecting the next task to execute. 57 | mov lr, pc 58 | BX R0 59 | portRESTORE_CONTEXT ; Restore the context of the selected task. 60 | 61 | 62 | 63 | END 64 | -------------------------------------------------------------------------------- /portable/IAR/STR91x/portasm.s79: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | RSEG ICODE:CODE 30 | CODE32 31 | 32 | EXTERN vTaskSwitchContext 33 | 34 | PUBLIC vPortYieldProcessor 35 | PUBLIC vPortStartFirstTask 36 | 37 | #include "ISR_Support.h" 38 | 39 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 40 | ; Starting the first task is just a matter of restoring the context that 41 | ; was created by pxPortInitialiseStack(). 42 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 43 | vPortStartFirstTask: 44 | portRESTORE_CONTEXT 45 | 46 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 47 | ; Manual context switch function. This is the SWI hander. 48 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 49 | vPortYieldProcessor: 50 | ADD LR, LR, #4 ; Add 4 to the LR to make the LR appear exactly 51 | ; as if the context was saved during and IRQ 52 | ; handler. 53 | 54 | portSAVE_CONTEXT ; Save the context of the current task... 55 | LDR R0, =vTaskSwitchContext ; before selecting the next task to execute. 56 | MOV lr, pc 57 | BX R0 58 | portRESTORE_CONTEXT ; Restore the context of the selected task. 59 | 60 | END 61 | -------------------------------------------------------------------------------- /portable/Keil/See-also-the-RVDS-directory.txt: -------------------------------------------------------------------------------- 1 | Nothing to see here. 2 | -------------------------------------------------------------------------------- /portable/MPLAB/PIC18F/stdio.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FreeRTOS/FreeRTOS-Kernel/e3a362b1d1e41bcc02c02f3ef05f4d3b30cbbc17/portable/MPLAB/PIC18F/stdio.h -------------------------------------------------------------------------------- /portable/MemMang/ReadMe.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,2 3 | [InternetShortcut] 4 | URL=https://www.FreeRTOS.org/a00111.html 5 | IDList= 6 | -------------------------------------------------------------------------------- /portable/RVDS/ARM_CM7/ReadMe.txt: -------------------------------------------------------------------------------- 1 | There are two options for running FreeRTOS on ARM Cortex-M7 microcontrollers. 2 | The best option depends on the revision of the ARM Cortex-M7 core in use. The 3 | revision is specified by an 'r' number, and a 'p' number, so will look something 4 | like 'r0p1'. Check the documentation for the microcontroller in use to find the 5 | revision of the Cortex-M7 core used in that microcontroller. If in doubt, use 6 | the FreeRTOS port provided specifically for r0p1 revisions, as that can be used 7 | with all core revisions. 8 | 9 | The first option is to use the ARM Cortex-M4F port, and the second option is to 10 | use the Cortex-M7 r0p1 port - the latter containing a minor errata workaround. 11 | 12 | If the revision of the ARM Cortex-M7 core is not r0p1 then either option can be 13 | used, but it is recommended to use the FreeRTOS ARM Cortex-M4F port located in 14 | the /FreeRTOS/Source/portable/RVDS/ARM_CM4F directory. 15 | 16 | If the revision of the ARM Cortex-M7 core is r0p1 then use the FreeRTOS ARM 17 | Cortex-M7 r0p1 port located in the /FreeRTOS/Source/portable/RVDS/ARM_CM7/r0p1 18 | directory. 19 | -------------------------------------------------------------------------------- /portable/Renesas/RX100/port_asm.src: -------------------------------------------------------------------------------- 1 | ;/* 2 | ; * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | ; * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | ; * 5 | ; * SPDX-License-Identifier: MIT 6 | ; * 7 | ; * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | ; * this software and associated documentation files (the "Software"), to deal in 9 | ; * the Software without restriction, including without limitation the rights to 10 | ; * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | ; * the Software, and to permit persons to whom the Software is furnished to do so, 12 | ; * subject to the following conditions: 13 | ; * 14 | ; * The above copyright notice and this permission notice shall be included in all 15 | ; * copies or substantial portions of the Software. 16 | ; * 17 | ; * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | ; * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | ; * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | ; * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | ; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | ; * 24 | ; * https://www.FreeRTOS.org 25 | ; * https://github.com/FreeRTOS 26 | ; * 27 | ; */ 28 | .GLB _vSoftwareInterruptISR 29 | .GLB _vSoftwareInterruptEntry 30 | 31 | .SECTION P,CODE 32 | 33 | _vSoftwareInterruptEntry: 34 | 35 | BRA _vSoftwareInterruptISR 36 | 37 | .RVECTOR 27, _vSoftwareInterruptEntry 38 | 39 | .END 40 | -------------------------------------------------------------------------------- /portable/Renesas/RX200/port_asm.src: -------------------------------------------------------------------------------- 1 | ;/* 2 | ; * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | ; * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | ; * 5 | ; * SPDX-License-Identifier: MIT 6 | ; * 7 | ; * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | ; * this software and associated documentation files (the "Software"), to deal in 9 | ; * the Software without restriction, including without limitation the rights to 10 | ; * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | ; * the Software, and to permit persons to whom the Software is furnished to do so, 12 | ; * subject to the following conditions: 13 | ; * 14 | ; * The above copyright notice and this permission notice shall be included in all 15 | ; * copies or substantial portions of the Software. 16 | ; * 17 | ; * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | ; * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | ; * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | ; * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | ; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | ; * 24 | ; * https://www.FreeRTOS.org 25 | ; * https://github.com/FreeRTOS 26 | ; * 27 | ; */ 28 | .GLB _vSoftwareInterruptISR 29 | .GLB _vSoftwareInterruptEntry 30 | 31 | .SECTION P,CODE 32 | 33 | _vSoftwareInterruptEntry: 34 | 35 | BRA _vSoftwareInterruptISR 36 | 37 | .RVECTOR 27, _vSoftwareInterruptEntry 38 | 39 | .END 40 | -------------------------------------------------------------------------------- /portable/Renesas/RX600/port_asm.src: -------------------------------------------------------------------------------- 1 | ;/* 2 | ; * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | ; * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | ; * 5 | ; * SPDX-License-Identifier: MIT 6 | ; * 7 | ; * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | ; * this software and associated documentation files (the "Software"), to deal in 9 | ; * the Software without restriction, including without limitation the rights to 10 | ; * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | ; * the Software, and to permit persons to whom the Software is furnished to do so, 12 | ; * subject to the following conditions: 13 | ; * 14 | ; * The above copyright notice and this permission notice shall be included in all 15 | ; * copies or substantial portions of the Software. 16 | ; * 17 | ; * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | ; * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | ; * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | ; * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | ; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | ; * 24 | ; * https://www.FreeRTOS.org 25 | ; * https://github.com/FreeRTOS 26 | ; * 27 | ; */ 28 | .GLB _vSoftwareInterruptISR 29 | .GLB _vSoftwareInterruptEntry 30 | 31 | .SECTION P,CODE 32 | 33 | _vSoftwareInterruptEntry: 34 | 35 | BRA _vSoftwareInterruptISR 36 | 37 | .RVECTOR 27, _vSoftwareInterruptEntry 38 | 39 | .END 40 | -------------------------------------------------------------------------------- /portable/Renesas/RX600v2/port_asm.src: -------------------------------------------------------------------------------- 1 | ;/* 2 | ; * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | ; * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | ; * 5 | ; * SPDX-License-Identifier: MIT 6 | ; * 7 | ; * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | ; * this software and associated documentation files (the "Software"), to deal in 9 | ; * the Software without restriction, including without limitation the rights to 10 | ; * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | ; * the Software, and to permit persons to whom the Software is furnished to do so, 12 | ; * subject to the following conditions: 13 | ; * 14 | ; * The above copyright notice and this permission notice shall be included in all 15 | ; * copies or substantial portions of the Software. 16 | ; * 17 | ; * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | ; * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | ; * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | ; * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | ; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | ; * 24 | ; * https://www.FreeRTOS.org 25 | ; * https://github.com/FreeRTOS 26 | ; * 27 | ; */ 28 | .GLB _vSoftwareInterruptISR 29 | .GLB _vSoftwareInterruptEntry 30 | 31 | .SECTION P,CODE 32 | 33 | _vSoftwareInterruptEntry: 34 | 35 | BRA _vSoftwareInterruptISR 36 | 37 | .RVECTOR 27, _vSoftwareInterruptEntry 38 | 39 | .END 40 | -------------------------------------------------------------------------------- /portable/Renesas/RX700v3_DPFPU/port_asm.src: -------------------------------------------------------------------------------- 1 | ;/* 2 | ; * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | ; * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | ; * 5 | ; * SPDX-License-Identifier: MIT 6 | ; * 7 | ; * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | ; * this software and associated documentation files (the "Software"), to deal in 9 | ; * the Software without restriction, including without limitation the rights to 10 | ; * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | ; * the Software, and to permit persons to whom the Software is furnished to do so, 12 | ; * subject to the following conditions: 13 | ; * 14 | ; * The above copyright notice and this permission notice shall be included in all 15 | ; * copies or substantial portions of the Software. 16 | ; * 17 | ; * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | ; * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | ; * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | ; * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | ; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | ; * 24 | ; * https://www.FreeRTOS.org 25 | ; * https://github.com/FreeRTOS 26 | ; * 27 | ; */ 28 | .GLB _vSoftwareInterruptISR 29 | .GLB _vSoftwareInterruptEntry 30 | 31 | .SECTION P,CODE 32 | 33 | _vSoftwareInterruptEntry: 34 | 35 | BRA _vSoftwareInterruptISR 36 | 37 | .RVECTOR 27, _vSoftwareInterruptEntry 38 | 39 | .END 40 | -------------------------------------------------------------------------------- /portable/Renesas/SH2A_FPU/ISR_Support.inc: -------------------------------------------------------------------------------- 1 | ;/* 2 | ; * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | ; * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | ; * 5 | ; * SPDX-License-Identifier: MIT 6 | ; * 7 | ; * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | ; * this software and associated documentation files (the "Software"), to deal in 9 | ; * the Software without restriction, including without limitation the rights to 10 | ; * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | ; * the Software, and to permit persons to whom the Software is furnished to do so, 12 | ; * subject to the following conditions: 13 | ; * 14 | ; * The above copyright notice and this permission notice shall be included in all 15 | ; * copies or substantial portions of the Software. 16 | ; * 17 | ; * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | ; * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | ; * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | ; * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | ; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | ; * 24 | ; * https://www.FreeRTOS.org 25 | ; * https://github.com/FreeRTOS 26 | ; * 27 | ; */ 28 | .macro portSAVE_CONTEXT 29 | 30 | ; Save r0 to r14 and pr. 31 | movml.l r15, @-r15 32 | 33 | ; Save mac1, mach and gbr 34 | sts.l macl, @-r15 35 | sts.l mach, @-r15 36 | stc.l gbr, @-r15 37 | 38 | ; Get the address of pxCurrentTCB 39 | mov.l #_pxCurrentTCB, r0 40 | 41 | ; Get the address of pxTopOfStack from the TCB. 42 | mov.l @r0, r0 43 | 44 | ; Save the stack pointer in pxTopOfStack. 45 | mov.l r15, @r0 46 | 47 | .endm 48 | 49 | ;----------------------------------------------------------- 50 | 51 | .macro portRESTORE_CONTEXT 52 | 53 | ; Get the address of the pxCurrentTCB variable. 54 | mov.l #_pxCurrentTCB, r0 55 | 56 | ; Get the address of the task stack from pxCurrentTCB. 57 | mov.l @r0, r0 58 | 59 | ; Get the task stack itself into the stack pointer. 60 | mov.l @r0, r15 61 | 62 | ; Restore system registers. 63 | ldc.l @r15+, gbr 64 | lds.l @r15+, mach 65 | lds.l @r15+, macl 66 | 67 | ; Restore r0 to r14 and PR 68 | movml.l @r15+, r15 69 | 70 | ; Pop the SR and PC to jump to the start of the task. 71 | rte 72 | nop 73 | 74 | .endm 75 | ;----------------------------------------------------------- 76 | -------------------------------------------------------------------------------- /portable/Rowley/ARM7/readme.txt: -------------------------------------------------------------------------------- 1 | The Rowley ARM7 demo uses the GCC ARM7 port files. 2 | -------------------------------------------------------------------------------- /portable/Rowley/MSP430F449/portasm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef PORT_ASM_H 30 | #define PORT_ASM_H 31 | 32 | portSAVE_CONTEXT macro 33 | /* Save the remaining registers. */ 34 | push r4 35 | push r5 36 | push r6 37 | push r7 38 | push r8 39 | push r9 40 | push r10 41 | push r11 42 | push r12 43 | push r13 44 | push r14 45 | push r15 46 | mov.w &_usCriticalNesting, r14 47 | push r14 48 | mov.w &_pxCurrentTCB, r12 49 | mov.w r1, @r12 50 | endm 51 | /*-----------------------------------------------------------*/ 52 | 53 | portRESTORE_CONTEXT macro 54 | mov.w &_pxCurrentTCB, r12 55 | mov.w @r12, r1 56 | pop r15 57 | mov.w r15, &_usCriticalNesting 58 | pop r15 59 | pop r14 60 | pop r13 61 | pop r12 62 | pop r11 63 | pop r10 64 | pop r9 65 | pop r8 66 | pop r7 67 | pop r6 68 | pop r5 69 | pop r4 70 | 71 | /* The last thing on the stack will be the status register. 72 | Ensure the power down bits are clear ready for the next 73 | time this power down register is popped from the stack. */ 74 | bic.w #0xf0,0(SP) 75 | 76 | reti 77 | endm 78 | /*-----------------------------------------------------------*/ 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /portable/Softune/MB91460/__STD_LIB_sbrk.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | /* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */ 30 | /* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */ 31 | /* ELIGIBILITY FOR ANY PURPOSES. */ 32 | /* (C) Fujitsu Microelectronics Europe GmbH */ 33 | /*--------------------------------------------------------------------------- 34 | __STD_LIB_sbrk.C 35 | - Used by heap_3.c for memory allocation and deletion. 36 | 37 | /*---------------------------------------------------------------------------*/ 38 | 39 | #include "FreeRTOSConfig.h" 40 | #include <stdlib.h> 41 | 42 | static long brk_siz = 0; 43 | typedef int _heep_t; 44 | #define ROUNDUP(s) (((s)+sizeof(_heep_t)-1)&~(sizeof(_heep_t)-1)) 45 | static _heep_t _heep[ROUNDUP(configTOTAL_HEAP_SIZE)/sizeof(_heep_t)]; 46 | #define _heep_size ROUNDUP(configTOTAL_HEAP_SIZE) 47 | 48 | extern char *sbrk(int size) 49 | { 50 | if (brk_siz + size > _heep_size || brk_siz + size < 0) 51 | 52 | return((char*)-1); 53 | brk_siz += size; 54 | return( (char*)_heep + brk_siz - size); 55 | } 56 | -------------------------------------------------------------------------------- /portable/Softune/MB96340/__STD_LIB_sbrk.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | /* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */ 30 | /* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */ 31 | /* ELIGIBILITY FOR ANY PURPOSES. */ 32 | /* (C) Fujitsu Microelectronics Europe GmbH */ 33 | /*--------------------------------------------------------------------------- 34 | __STD_LIB_sbrk.C 35 | - Used by heap_3.c for memory allocation and deletion. 36 | 37 | /*---------------------------------------------------------------------------*/ 38 | 39 | #include "FreeRTOSConfig.h" 40 | #include <stdlib.h> 41 | 42 | static long brk_siz = 0; 43 | typedef int _heep_t; 44 | #define ROUNDUP(s) (((s)+sizeof(_heep_t)-1)&~(sizeof(_heep_t)-1)) 45 | static _heep_t _heep[ROUNDUP(configTOTAL_HEAP_SIZE)/sizeof(_heep_t)]; 46 | #define _heep_size ROUNDUP(configTOTAL_HEAP_SIZE) 47 | 48 | extern char *sbrk(int size) 49 | { 50 | if (brk_siz + size > _heep_size || brk_siz + size < 0) 51 | 52 | return((char*)-1); 53 | brk_siz += size; 54 | return( (char*)_heep + brk_siz - size); 55 | } 56 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/ARC_EM_HS/arc_freertos_exceptions.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2020 Synopsys, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | /** 30 | * \file 31 | * \brief exception processing for freertos 32 | */ 33 | 34 | /* #include "embARC.h" */ 35 | 36 | #include "arc_freertos_exceptions.h" 37 | 38 | #ifdef __GNU__ 39 | extern void gnu_printf_setup( void ); 40 | #endif 41 | 42 | /** 43 | * \brief freertos related cpu exception initialization, all the interrupts handled by freertos must be not 44 | * fast irqs. If fiq is needed, please install the default firq_exc_entry or your own fast irq entry into 45 | * the specific interrupt exception. 46 | */ 47 | void freertos_exc_init( void ) 48 | { 49 | #ifdef __GNU__ 50 | gnu_printf_setup(); 51 | #endif 52 | } 53 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/ARC_EM_HS/arc_freertos_exceptions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2020 Synopsys, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef ARC_FREERTOS_EXCEPTIONS_H 30 | #define ARC_FREERTOS_EXCEPTIONS_H 31 | 32 | /* 33 | * here, all arc cpu exceptions share the same entry, also for all interrupt 34 | * exceptions 35 | */ 36 | extern void exc_entry_cpu( void ); /* cpu exception entry for freertos */ 37 | extern void exc_entry_int( void ); /* int exception entry for freertos */ 38 | 39 | /* task dispatch functions in .s */ 40 | extern void start_r( void ); 41 | extern void start_dispatch(); 42 | extern void dispatch(); 43 | 44 | extern void freertos_exc_init( void ); 45 | 46 | #endif /* ARC_FREERTOS_EXCEPTIONS_H */ 47 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/ARC_v1/arc_freertos_exceptions.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2020 Synopsys, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | /** 30 | * \file 31 | * \brief exception processing for freertos 32 | */ 33 | 34 | /* #include "embARC.h" */ 35 | 36 | #include "arc_freertos_exceptions.h" 37 | 38 | #ifdef __GNU__ 39 | extern void gnu_printf_setup( void ); 40 | #endif 41 | 42 | /** 43 | * \brief freertos related cpu exception initialization, all the interrupts handled by freertos must be not 44 | * fast irqs. If fiq is needed, please install the default firq_exc_entry or your own fast irq entry into 45 | * the specific interrupt exception. 46 | */ 47 | void freertos_exc_init( void ) 48 | { 49 | #ifdef __GNU__ 50 | gnu_printf_setup(); 51 | #endif 52 | } 53 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/ARC_v1/arc_freertos_exceptions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2020 Synopsys, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef ARC_FREERTOS_EXCEPTIONS_H 30 | #define ARC_FREERTOS_EXCEPTIONS_H 31 | 32 | /* 33 | * here, all arc cpu exceptions share the same entry, also for all interrupt 34 | * exceptions 35 | */ 36 | extern void exc_entry_cpu( void ); /* cpu exception entry for freertos */ 37 | extern void exc_entry_int( void ); /* int exception entry for freertos */ 38 | 39 | /* task dispatch functions in .s */ 40 | extern void start_r( void ); 41 | extern void start_dispatch(); 42 | extern void dispatch(); 43 | 44 | extern void freertos_exc_init( void ); 45 | 46 | #endif /* ARC_FREERTOS_EXCEPTIONS_H */ 47 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/Posix/FreeRTOS-simulator-for-Linux.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,11 3 | [InternetShortcut] 4 | IDList= 5 | URL=https://www.freertos.org/FreeRTOS-simulator-for-Linux.html 6 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/Posix/utils/wait_for_event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | #ifndef WAIT_FOR_EVENT_H_ 30 | #define WAIT_FOR_EVENT_H_ 31 | 32 | #include <stdbool.h> 33 | #include <time.h> 34 | 35 | struct event; 36 | 37 | struct event * event_create( void ); 38 | void event_delete( struct event * ); 39 | bool event_wait( struct event * ev ); 40 | bool event_wait_timed( struct event * ev, 41 | time_t ms ); 42 | void event_signal( struct event * ev ); 43 | 44 | 45 | 46 | #endif /* ifndef WAIT_FOR_EVENT_H_ */ 47 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/RISC-V/README-for-info-on-official-MIT-license-port.txt: -------------------------------------------------------------------------------- 1 | The official and MIT licensed FreeRTOS ports for RISC-V are located in the following directories: 2 | \FreeRTOS\Source\portable\GCC\RISC-V 3 | \FreeRTOS\Source\portable\IAR\RISC-V 4 | 5 | Also so https://www.FreeRTOS.org/Using-FreeRTOS-on-RISC-V.html 6 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/RP2040/.gitignore: -------------------------------------------------------------------------------- 1 | **/cmake-* 2 | .idea 3 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/RP2040/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | 3 | if (NOT TARGET _FreeRTOS_kernel_inclusion_marker) 4 | add_library(_FreeRTOS_kernel_inclusion_marker INTERFACE) 5 | 6 | # Pull in PICO SDK (must be before project) 7 | include(pico_sdk_import.cmake) 8 | if (PICO_SDK_VERSION_STRING VERSION_LESS "1.2.0") 9 | message(FATAL_ERROR "Require at least Raspberry Pi Pico SDK version 1.2.0") 10 | endif() 11 | 12 | if (NOT FREERTOS_KERNEL_PATH) 13 | get_filename_component(FREERTOS_KERNEL_PATH ${CMAKE_CURRENT_LIST_DIR}/../../../.. REALPATH) 14 | endif () 15 | 16 | message(DEBUG "FREERTOS_KERNEL_PATH is ${FREERTOS_KERNEL_PATH}") 17 | project(FreeRTOS-Kernel C CXX) 18 | 19 | set(CMAKE_C_STANDARD 11) 20 | set(CMAKE_CXX_STANDARD 17) 21 | 22 | pico_is_top_level_project(FREERTOS_KERNEL_TOP_LEVEL_PROJECT) 23 | 24 | # if the SDK has already been initialized, then just add our libraries now - this allows 25 | # this FreeRTOS port to just be added as a sub-directory or include within another project, rather than 26 | # having to include it at the top level before pico_sdk_init() 27 | if (TARGET _pico_sdk_inclusion_marker) 28 | if (PICO_SDK_VERSION_STRING VERSION_LESS "1.3.2") 29 | message(FATAL_ERROR "Require at least Raspberry Pi Pico SDK version 1.3.2 to include FreeRTOS after pico_sdk_init()") 30 | endif() 31 | include(${CMAKE_CURRENT_LIST_DIR}/library.cmake) 32 | else() 33 | # The real work gets done in library.cmake which is called at the end of pico_sdk_init 34 | list(APPEND PICO_SDK_POST_LIST_FILES ${CMAKE_CURRENT_LIST_DIR}/library.cmake) 35 | if (PICO_SDK_VERSION_STRING VERSION_LESS "1.3.2") 36 | # We need to inject the following header file into ALL SDK files (which we do via the config header) 37 | list(APPEND PICO_CONFIG_HEADER_FILES ${CMAKE_CURRENT_LIST_DIR}/include/freertos_sdk_config.h) 38 | endif() 39 | 40 | if (FREERTOS_KERNEL_TOP_LEVEL_PROJECT) 41 | message("FreeRTOS: initialize SDK since we're the top-level") 42 | # Initialize the SDK 43 | pico_sdk_init() 44 | else() 45 | set(FREERTOS_KERNEL_PATH ${FREERTOS_KERNEL_PATH} PARENT_SCOPE) 46 | set(PICO_CONFIG_HEADER_FILES ${PICO_CONFIG_HEADER_FILES} PARENT_SCOPE) 47 | set(PICO_SDK_POST_LIST_FILES ${PICO_SDK_POST_LIST_FILES} PARENT_SCOPE) 48 | endif() 49 | endif() 50 | endif() 51 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/RP2040/LICENSE.md: -------------------------------------------------------------------------------- 1 | BSD-3-Clause License 2 | 3 | Copyright (c) 2020-2021 Raspberry Pi (Trading) Ltd. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the 6 | following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following 9 | disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following 12 | disclaimer in the documentation and/or other materials provided with the distribution. 13 | 14 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products 15 | derived from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 18 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/RP2040/README.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | 3 | This directory provides an SMP FreeRTOS-Kernel port that can be used with the Raspberry Pi Pico SDK. It supports: 4 | 5 | * Simple CMake INTERFACE libraries, to provide the FreeRTOS-Kernel and also the individual allocator types, without copying code into the user's project. 6 | * Running the FreeRTOS-Kernel and tasks on either core 0 or core 1, or both. 7 | * Use of SDK synchronization primitives (such as mutexes, semaphores, queues from pico_sync) between FreeRTOS tasks and code executing on a non FreeRTOS core, or in IRQ handlers. 8 | 9 | Note that whilst this SMP version can be run on just a single (either) core, it is probably 10 | more efficient to use the non SMP version in the main FreeRTOS-Kernel branch in that case. 11 | 12 | ## Using this port 13 | 14 | You can copy [FreeRTOS_Kernel_import.cmake](FreeRTOS_Kernel_import.cmake) into your project, and 15 | add the following in your `CMakeLists.txt`: 16 | 17 | ```cmake 18 | include(FreeRTOS_Kernel_import.cmake) 19 | ``` 20 | 21 | This will locate the FreeRTOS kernel if it is a direct sub-module of your project, or if you provide the 22 | `FREERTOS_KERNEL_PATH` variable in your environment or via `-DFREERTOS_KERNEL_PATH=/path/to/FreeRTOS-Kernel` on the CMake command line. 23 | 24 | **NOTE:** If you are using version 1.3.1 or older of the Raspberry Pi Pico SDK then this line must appear before the 25 | `pico_sdk_init()` and will cause FreeRTOS to be included/required in all RP2040 targets in your project. After this SDK 26 | version, you can include the FreeRTOS-Kernel support later in your CMake build (possibly in a subdirectory) and the 27 | FreeRTOS-Kernel support will only apply to those targets which explicitly include FreeRTOS support. 28 | 29 | As an alternative to the `import` statement above, you can just add this directory directly via the following (with 30 | the same placement restrictions related to the Raspberry Pi Pico SDK version above): 31 | 32 | ```cmake 33 | add_subdirectory(path/to/this/directory FreeRTOS-Kernel) 34 | ``` 35 | 36 | 37 | ## Advanced Configuration 38 | 39 | Some additional `config` options are defined [here](include/rp2040_config.h) which control some low level implementation details. 40 | 41 | ## Known Limitations 42 | 43 | - Tickless idle has not currently been tested, and is likely non-functional 44 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/RP2040/library.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 Raspberry Pi (Trading) Ltd. 2 | # 3 | # SPDX-License-Identifier: BSD-3-Clause 4 | 5 | # Called after the Raspberry Pi Pico SDK has been initialized to add our libraries 6 | 7 | add_library(FreeRTOS-Kernel-Core INTERFACE) 8 | target_sources(FreeRTOS-Kernel-Core INTERFACE 9 | ${FREERTOS_KERNEL_PATH}/croutine.c 10 | ${FREERTOS_KERNEL_PATH}/event_groups.c 11 | ${FREERTOS_KERNEL_PATH}/list.c 12 | ${FREERTOS_KERNEL_PATH}/queue.c 13 | ${FREERTOS_KERNEL_PATH}/stream_buffer.c 14 | ${FREERTOS_KERNEL_PATH}/tasks.c 15 | ${FREERTOS_KERNEL_PATH}/timers.c 16 | ) 17 | target_include_directories(FreeRTOS-Kernel-Core INTERFACE ${FREERTOS_KERNEL_PATH}/include) 18 | 19 | if (PICO_SDK_VERSION_STRING VERSION_GREATER_EQUAL "1.3.2") 20 | target_compile_definitions(FreeRTOS-Kernel-Core INTERFACE 21 | PICO_CONFIG_RTOS_ADAPTER_HEADER=${CMAKE_CURRENT_LIST_DIR}/include/freertos_sdk_config.h) 22 | endif() 23 | 24 | add_library(FreeRTOS-Kernel INTERFACE) 25 | target_sources(FreeRTOS-Kernel INTERFACE 26 | ${CMAKE_CURRENT_LIST_DIR}/port.c 27 | ) 28 | 29 | target_include_directories(FreeRTOS-Kernel INTERFACE 30 | ${CMAKE_CURRENT_LIST_DIR}/include 31 | ${FREERTOS_CONFIG_FILE_DIRECTORY}) 32 | 33 | target_link_libraries(FreeRTOS-Kernel INTERFACE 34 | FreeRTOS-Kernel-Core 35 | pico_base_headers 36 | hardware_clocks 37 | hardware_exception 38 | pico_multicore 39 | ) 40 | 41 | target_compile_definitions(FreeRTOS-Kernel INTERFACE 42 | LIB_FREERTOS_KERNEL=1 43 | FREE_RTOS_KERNEL_SMP=1 44 | ) 45 | 46 | add_library(FreeRTOS-Kernel-Static INTERFACE) 47 | target_compile_definitions(FreeRTOS-Kernel-Static INTERFACE 48 | configSUPPORT_STATIC_ALLOCATION=1 49 | configKERNEL_PROVIDED_STATIC_MEMORY=1 50 | ) 51 | 52 | target_link_libraries(FreeRTOS-Kernel-Static INTERFACE FreeRTOS-Kernel) 53 | 54 | add_library(FreeRTOS-Kernel-Heap1 INTERFACE) 55 | target_sources(FreeRTOS-Kernel-Heap1 INTERFACE ${FREERTOS_KERNEL_PATH}/portable/MemMang/heap_1.c) 56 | target_link_libraries(FreeRTOS-Kernel-Heap1 INTERFACE FreeRTOS-Kernel) 57 | 58 | add_library(FreeRTOS-Kernel-Heap2 INTERFACE) 59 | target_sources(FreeRTOS-Kernel-Heap2 INTERFACE ${FREERTOS_KERNEL_PATH}/portable/MemMang/heap_2.c) 60 | target_link_libraries(FreeRTOS-Kernel-Heap2 INTERFACE FreeRTOS-Kernel) 61 | 62 | add_library(FreeRTOS-Kernel-Heap3 INTERFACE) 63 | target_sources(FreeRTOS-Kernel-Heap3 INTERFACE ${FREERTOS_KERNEL_PATH}/portable/MemMang/heap_3.c) 64 | target_link_libraries(FreeRTOS-Kernel-Heap3 INTERFACE FreeRTOS-Kernel) 65 | 66 | add_library(FreeRTOS-Kernel-Heap4 INTERFACE) 67 | target_sources(FreeRTOS-Kernel-Heap4 INTERFACE ${FREERTOS_KERNEL_PATH}/portable/MemMang/heap_4.c) 68 | target_link_libraries(FreeRTOS-Kernel-Heap4 INTERFACE FreeRTOS-Kernel) 69 | 70 | add_library(FreeRTOS-Kernel-Heap5 INTERFACE) 71 | target_sources(FreeRTOS-Kernel-Heap5 INTERFACE ${FREERTOS_KERNEL_PATH}/portable/MemMang/heap_5.c) 72 | target_link_libraries(FreeRTOS-Kernel-Heap5 INTERFACE FreeRTOS-Kernel) 73 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/Xtensa_ESP32/FreeRTOS-openocd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Since at least FreeRTOS V7.5.3 uxTopUsedPriority is no longer 3 | * present in the kernel, so it has to be supplied by other means for 4 | * OpenOCD's threads awareness. 5 | * 6 | * Add this file to your project, and, if you're using --gc-sections, 7 | * ``--undefined=uxTopUsedPriority'' (or 8 | * ``-Wl,--undefined=uxTopUsedPriority'' when using gcc for final 9 | * linking) to your LDFLAGS; same with all the other symbols you need. 10 | */ 11 | 12 | #include "FreeRTOS.h" 13 | #include "esp_attr.h" 14 | #include "sdkconfig.h" 15 | 16 | #ifdef __GNUC__ 17 | #define USED __attribute__( ( used ) ) 18 | #else 19 | #define USED 20 | #endif 21 | 22 | /* 23 | * This file is no longer needed as AFTER FreeRTOS V10.14.1 OpenOCD is fixed in the kernel. 24 | * #ifdef CONFIG_ESP32_DEBUG_OCDAWARE 25 | * const int USED DRAM_ATTR uxTopUsedPriority = configMAX_PRIORITIES - 1; 26 | * #endif 27 | */ 28 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/Xtensa_ESP32/include/port_systick.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #pragma once 8 | 9 | /* *INDENT-OFF* */ 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | /* *INDENT-ON* */ 14 | 15 | /** 16 | * @brief Set up the SysTick interrupt 17 | */ 18 | void vPortSetupTimer( void ); 19 | 20 | /* *INDENT-OFF* */ 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | /* *INDENT-ON* */ 25 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/Xtensa_ESP32/include/portbenchmark.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2015-2019 Cadence Design Systems, Inc. 3 | * 4 | * SPDX-License-Identifier: MIT 5 | * 6 | * SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD 7 | */ 8 | 9 | /* 10 | * Copyright (c) 2015-2019 Cadence Design Systems, Inc. 11 | * 12 | * Permission is hereby granted, free of charge, to any person obtaining 13 | * a copy of this software and associated documentation files (the 14 | * "Software"), to deal in the Software without restriction, including 15 | * without limitation the rights to use, copy, modify, merge, publish, 16 | * distribute, sublicense, and/or sell copies of the Software, and to 17 | * permit persons to whom the Software is furnished to do so, subject to 18 | * the following conditions: 19 | * 20 | * The above copyright notice and this permission notice shall be included 21 | * in all copies or substantial portions of the Software. 22 | * 23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 26 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 27 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 28 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 29 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | */ 31 | 32 | /* 33 | * This utility helps benchmarking interrupt latency and context switches. 34 | * In order to enable it, set configBENCHMARK to 1 in FreeRTOSConfig.h. 35 | * You will also need to download the FreeRTOS_trace patch that contains 36 | * portbenchmark.c and the complete version of portbenchmark.h 37 | */ 38 | 39 | #ifndef PORTBENCHMARK_H 40 | #define PORTBENCHMARK_H 41 | 42 | #if configBENCHMARK 43 | #error "You need to download the FreeRTOS_trace patch that overwrites this file" 44 | #endif 45 | 46 | #define portbenchmarkINTERRUPT_DISABLE() 47 | #define portbenchmarkINTERRUPT_RESTORE( newstate ) 48 | #define portbenchmarkIntLatency() 49 | #define portbenchmarkIntWait() 50 | #define portbenchmarkReset() 51 | #define portbenchmarkPrint() 52 | 53 | #endif /* PORTBENCHMARK */ 54 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/Xtensa_ESP32/include/xt_asm_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2017, Intel Corporation 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | * 6 | * SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD 7 | */ 8 | 9 | /* File adapted to use on IDF FreeRTOS component, extracted 10 | * originally from zephyr RTOS code base: 11 | * https://github.com/zephyrproject-rtos/zephyr/blob/dafd3485bf67880e667b6e9a758b0b64fb688d63/arch/xtensa/include/xtensa-asm2-s.h 12 | */ 13 | 14 | #ifndef __XT_ASM_UTILS_H 15 | #define __XT_ASM_UTILS_H 16 | 17 | /* 18 | * SPILL_ALL_WINDOWS 19 | * 20 | * Spills all windowed registers (i.e. registers not visible as 21 | * A0-A15) to their ABI-defined spill regions on the stack. 22 | * 23 | * Unlike the Xtensa HAL implementation, this code requires that the 24 | * EXCM and WOE bit be enabled in PS, and relies on repeated hardware 25 | * exception handling to do the register spills. The trick is to do a 26 | * noop write to the high registers, which the hardware will trap 27 | * (into an overflow exception) in the case where those registers are 28 | * already used by an existing call frame. Then it rotates the window 29 | * and repeats until all but the A0-A3 registers of the original frame 30 | * are guaranteed to be spilled, eventually rotating back around into 31 | * the original frame. Advantages: 32 | * 33 | * - Vastly smaller code size 34 | * 35 | * - More easily maintained if changes are needed to window over/underflow 36 | * exception handling. 37 | * 38 | * - Requires no scratch registers to do its work, so can be used safely in any 39 | * context. 40 | * 41 | * - If the WOE bit is not enabled (for example, in code written for 42 | * the CALL0 ABI), this becomes a silent noop and operates compatbily. 43 | * 44 | * - Hilariously it's ACTUALLY FASTER than the HAL routine. And not 45 | * just a little bit, it's MUCH faster. With a mostly full register 46 | * file on an LX6 core (ESP-32) I'm measuring 145 cycles to spill 47 | * registers with this vs. 279 (!) to do it with 48 | * xthal_spill_windows(). 49 | */ 50 | 51 | .macro SPILL_ALL_WINDOWS 52 | #if XCHAL_NUM_AREGS == 64 53 | and a12, a12, a12 54 | rotw 3 55 | and a12, a12, a12 56 | rotw 3 57 | and a12, a12, a12 58 | rotw 3 59 | and a12, a12, a12 60 | rotw 3 61 | and a12, a12, a12 62 | rotw 4 63 | #elif XCHAL_NUM_AREGS == 32 64 | and a12, a12, a12 65 | rotw 3 66 | and a12, a12, a12 67 | rotw 3 68 | and a4, a4, a4 69 | rotw 2 70 | #else /* if XCHAL_NUM_AREGS == 64 */ 71 | #error Unrecognized XCHAL_NUM_AREGS 72 | #endif /* if XCHAL_NUM_AREGS == 64 */ 73 | .endm 74 | 75 | #endif /* ifndef __XT_ASM_UTILS_H */ 76 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2015-2019 Cadence Design Systems, Inc. 3 | * 4 | * SPDX-License-Identifier: MIT 5 | * 6 | * SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD 7 | */ 8 | 9 | /* 10 | * Copyright (c) 2015-2019 Cadence Design Systems, Inc. 11 | * 12 | * Permission is hereby granted, free of charge, to any person obtaining 13 | * a copy of this software and associated documentation files (the 14 | * "Software"), to deal in the Software without restriction, including 15 | * without limitation the rights to use, copy, modify, merge, publish, 16 | * distribute, sublicense, and/or sell copies of the Software, and to 17 | * permit persons to whom the Software is furnished to do so, subject to 18 | * the following conditions: 19 | * 20 | * The above copyright notice and this permission notice shall be included 21 | * in all copies or substantial portions of the Software. 22 | * 23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 26 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 27 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 28 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 29 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | */ 31 | #include <xtensa/xtensa_api.h> 32 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/Xtensa_ESP32/include/xtensa_context.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2015-2019 Cadence Design Systems, Inc. 3 | * 4 | * SPDX-License-Identifier: MIT 5 | * 6 | * SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD 7 | */ 8 | 9 | /* 10 | * Copyright (c) 2015-2019 Cadence Design Systems, Inc. 11 | * 12 | * Permission is hereby granted, free of charge, to any person obtaining 13 | * a copy of this software and associated documentation files (the 14 | * "Software"), to deal in the Software without restriction, including 15 | * without limitation the rights to use, copy, modify, merge, publish, 16 | * distribute, sublicense, and/or sell copies of the Software, and to 17 | * permit persons to whom the Software is furnished to do so, subject to 18 | * the following conditions: 19 | * 20 | * The above copyright notice and this permission notice shall be included 21 | * in all copies or substantial portions of the Software. 22 | * 23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 26 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 27 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 28 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 29 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | */ 31 | #include <xtensa/xtensa_context.h> 32 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2015-2019 Cadence Design Systems, Inc. 3 | * 4 | * SPDX-License-Identifier: MIT 5 | * 6 | * SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD 7 | */ 8 | 9 | /* 10 | * Copyright (c) 2015-2019 Cadence Design Systems, Inc. 11 | * 12 | * Permission is hereby granted, free of charge, to any person obtaining 13 | * a copy of this software and associated documentation files (the 14 | * "Software"), to deal in the Software without restriction, including 15 | * without limitation the rights to use, copy, modify, merge, publish, 16 | * distribute, sublicense, and/or sell copies of the Software, and to 17 | * permit persons to whom the Software is furnished to do so, subject to 18 | * the following conditions: 19 | * 20 | * The above copyright notice and this permission notice shall be included 21 | * in all copies or substantial portions of the Software. 22 | * 23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 26 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 27 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 28 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 29 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | */ 31 | 32 | /******************************************************************************* 33 | * 34 | * XTENSA INITIALIZATION ROUTINES CODED IN C 35 | * 36 | * This file contains miscellaneous Xtensa RTOS-generic initialization functions 37 | * that are implemented in C. 38 | * 39 | *******************************************************************************/ 40 | 41 | 42 | #ifdef XT_BOARD 43 | #include "xtensa/xtbsp.h" 44 | #endif 45 | 46 | #include "xtensa_rtos.h" 47 | #include "sdkconfig.h" 48 | #include "esp_idf_version.h" 49 | #if ( ESP_IDF_VERSION < ESP_IDF_VERSION_VAL( 4, 2, 0 ) ) 50 | #include "esp_clk.h" 51 | #else 52 | #if CONFIG_IDF_TARGET_ESP32 53 | #include "esp32/clk.h" 54 | #elif CONFIG_IDF_TARGET_ESP32S2 55 | #include "esp32s2/clk.h" 56 | #elif CONFIG_IDF_TARGET_ESP32S3 57 | #include "esp32s3/clk.h" 58 | #endif 59 | #endif /* ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 2, 0) */ 60 | 61 | #ifdef XT_RTOS_TIMER_INT 62 | 63 | unsigned _xt_tick_divisor = 0; /* cached number of cycles per tick */ 64 | 65 | void _xt_tick_divisor_init( void ) 66 | { 67 | _xt_tick_divisor = esp_clk_cpu_freq() / XT_TICK_PER_SEC; 68 | } 69 | 70 | /* Deprecated, to be removed */ 71 | int xt_clock_freq( void ) 72 | { 73 | return esp_clk_cpu_freq(); 74 | } 75 | 76 | #endif /* XT_RTOS_TIMER_INT */ 77 | -------------------------------------------------------------------------------- /portable/ThirdParty/GCC/Xtensa_ESP32/xtensa_overlay_os_hook.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2015-2019 Cadence Design Systems, Inc. 3 | * 4 | * SPDX-License-Identifier: MIT 5 | * 6 | * SPDX-FileContributor: 2016-2022 Espressif Systems (Shanghai) CO LTD 7 | */ 8 | 9 | /* 10 | * Copyright (c) 2015-2019 Cadence Design Systems, Inc. 11 | * 12 | * Permission is hereby granted, free of charge, to any person obtaining 13 | * a copy of this software and associated documentation files (the 14 | * "Software"), to deal in the Software without restriction, including 15 | * without limitation the rights to use, copy, modify, merge, publish, 16 | * distribute, sublicense, and/or sell copies of the Software, and to 17 | * permit persons to whom the Software is furnished to do so, subject to 18 | * the following conditions: 19 | * 20 | * The above copyright notice and this permission notice shall be included 21 | * in all copies or substantial portions of the Software. 22 | * 23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 26 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 27 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 28 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 29 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | */ 31 | 32 | /* xtensa_overlay_os_hook.c -- Overlay manager OS hooks for FreeRTOS. */ 33 | 34 | #include "FreeRTOS.h" 35 | #include "semphr.h" 36 | 37 | #if configUSE_MUTEX 38 | 39 | /* Mutex object that controls access to the overlay. Currently only one 40 | * overlay region is supported so one mutex suffices. 41 | */ 42 | static SemaphoreHandle_t xt_overlay_mutex; 43 | 44 | 45 | /* This function should be overridden to provide OS specific init such 46 | * as the creation of a mutex lock that can be used for overlay locking. 47 | * Typically this mutex would be set up with priority inheritance. See 48 | * overlay manager documentation for more details. 49 | */ 50 | void xt_overlay_init_os( void ) 51 | { 52 | /* Create the mutex for overlay access. Priority inheritance is 53 | * required. 54 | */ 55 | xt_overlay_mutex = xSemaphoreCreateMutex(); 56 | } 57 | 58 | 59 | /* This function locks access to shared overlay resources, typically 60 | * by acquiring a mutex. 61 | */ 62 | void xt_overlay_lock( void ) 63 | { 64 | xSemaphoreTake( xt_overlay_mutex, 0 ); 65 | } 66 | 67 | 68 | /* This function releases access to shared overlay resources, typically 69 | * by unlocking a mutex. 70 | */ 71 | void xt_overlay_unlock( void ) 72 | { 73 | xSemaphoreGive( xt_overlay_mutex ); 74 | } 75 | 76 | #endif /* if configUSE_MUTEX */ 77 | -------------------------------------------------------------------------------- /portable/ThirdParty/KnownIssues.md: -------------------------------------------------------------------------------- 1 | # Known Issues 2 | This document lists the known issues in various FreeRTOS third 3 | party ports. 4 | 5 | ## ThirdParty/GCC/ARC_EM_HS 6 | * [Memory Read Protection Violation from Secure MPU on exit from 7 | interrupt](https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/331) 8 | -------------------------------------------------------------------------------- /portable/ThirdParty/README.md: -------------------------------------------------------------------------------- 1 | # FreeRTOS Third Party Ports 2 | 3 | FreeRTOS third party ports can be supported by the FreeRTOS team, a FreeRTOS 4 | partner or FreeRTOS community members. Depending on who supports it, the support 5 | provided will differ as follows: 6 | 7 | ## FreeRTOS Team Supported Third Party FreeRTOS Ports 8 | 9 | Location: https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/main/portable/ThirdParty 10 | 11 | These third party FreeRTOS ports are supported by the FreeRTOS team. For a 12 | FreeRTOS team supported third party FreeRTOS port: 13 | 14 | * The code has been reviewed by the FreeRTOS team. 15 | * FreeRTOS team has access to the hardware and the test results have been 16 | verified by the FreeRTOS team. 17 | * Customer queries as well as bugs are addressed by the FreeRTOS team. 18 | * The code can be included in Long Term Support (LTS) releases. 19 | 20 | A new FreeRTOS port cannot be directly contributed to this location. Instead, 21 | the FreeRTOS team will decide to take ownership of a partner supported or a 22 | community supported FreeRTOS port based on the community interest. 23 | 24 | ## Partner Supported FreeRTOS Ports 25 | 26 | Location: https://github.com/FreeRTOS/FreeRTOS-Kernel-Partner-Supported-Ports/tree/main 27 | 28 | These FreeRTOS ports are supported by a FreeRTOS partner. For a partner 29 | supported FreeRTOS port: 30 | 31 | * The code has not been reviewed by the FreeRTOS team. 32 | * FreeRTOS team has not verified the tests results but tests exist and are 33 | reported to be successful by the partner. 34 | * Customer queries as well as bugs are addressed by the partner. 35 | 36 | A new FreeRTOS port can be directly contributed by a partner. The process to 37 | contribute a FreeRTOS port is documented [here](https://github.com/FreeRTOS/FreeRTOS-Kernel-Partner-Supported-Ports/blob/main/README.md). 38 | 39 | ## Community Supported FreeRTOS Ports 40 | 41 | Location: https://github.com/FreeRTOS/FreeRTOS-Kernel-Community-Supported-Ports/tree/main 42 | 43 | These FreeRTOS ports are supported by the FreeRTOS community members. For a 44 | community supported FreeRTOS port: 45 | 46 | * The code has not been reviewed by the FreeRTOS team. 47 | * Tests may or may not exist for the FreeRTOS port. 48 | * Customer queries as well as bugs are addressed by the community. 49 | 50 | A new FreeRTOS port can be directly contributed by anyone. The process to 51 | contribute a FreeRTOS port is documented [here](https://github.com/FreeRTOS/FreeRTOS-Kernel-Community-Supported-Ports/blob/main/README.md). 52 | -------------------------------------------------------------------------------- /portable/ThirdParty/XCC/Xtensa/readme_xtensa.txt: -------------------------------------------------------------------------------- 1 | FreeRTOS Port for Xtensa Configurable Processors 2 | ================================================ 3 | 4 | The Xtensa FreeRTOS port has moved and can be found in the 5 | "FreeRTOS-Kernel-Partner-Supported-Ports" submodule of FreeRTOS-Kernel: 6 | 7 | FreeRTOS/Source/portable/ThirdParty/Partner-Supported-Ports/Cadence/Xtensa 8 | 9 | Please see the Xtensa-specific README in this location for more details. 10 | 11 | -End- 12 | -------------------------------------------------------------------------------- /portable/ThirdParty/xClang/XCOREAI/port.xc: -------------------------------------------------------------------------------- 1 | /* 2 | * port.xc 3 | * 4 | * Created on: Jul 31, 2019 5 | * Author: mbruno 6 | */ 7 | 8 | //#include "rtos_support.h" 9 | 10 | extern "C" { 11 | 12 | #include "FreeRTOSConfig.h" /* to get configNUMBER_OF_CORES */ 13 | #ifndef configNUMBER_OF_CORES 14 | #define configNUMBER_OF_CORES 1 15 | #endif 16 | 17 | void __xcore_interrupt_permitted_ugs_vPortStartSchedulerOnCore(void); 18 | 19 | } /* extern "C" */ 20 | 21 | void vPortStartSMPScheduler( void ) 22 | { 23 | par (int i = 0; i < configNUMBER_OF_CORES; i++) { 24 | __xcore_interrupt_permitted_ugs_vPortStartSchedulerOnCore(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /portable/WizC/PIC18/Drivers/Tick/isrTick.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | /* 30 | Changes from V3.0.0 31 | + ISRcode pulled inline to reduce stack-usage. 32 | 33 | + Added functionality to only call vTaskSwitchContext() once 34 | when handling multiple interruptsources in a single interruptcall. 35 | 36 | + Filename changed to a .c extension to allow stepping through code 37 | using F7. 38 | 39 | Changes from V3.0.1 40 | */ 41 | 42 | /* 43 | * ISR for the tick. 44 | * This increments the tick count and, if using the preemptive scheduler, 45 | * performs a context switch. This must be identical to the manual 46 | * context switch in how it stores the context of a task. 47 | */ 48 | 49 | #ifndef _FREERTOS_DRIVERS_TICK_ISRTICK_C 50 | #define _FREERTOS_DRIVERS_TICK_ISRTICK_C 51 | 52 | { 53 | /* 54 | * Was the interrupt the SystemClock? 55 | */ 56 | if( bCCP1IF && bCCP1IE ) 57 | { 58 | /* 59 | * Reset the interrupt flag 60 | */ 61 | bCCP1IF = 0; 62 | 63 | /* 64 | * Maintain the tick count. 65 | */ 66 | if( xTaskIncrementTick() != pdFALSE ) 67 | { 68 | /* 69 | * Ask for a switch to the highest priority task 70 | * that is ready to run. 71 | */ 72 | uxSwitchRequested = pdTRUE; 73 | } 74 | } 75 | } 76 | 77 | #pragma wizcpp uselib "$__PATHNAME__/Tick.c" 78 | 79 | #endif /* _FREERTOS_DRIVERS_TICK_ISRTICK_C */ 80 | -------------------------------------------------------------------------------- /portable/WizC/PIC18/addFreeRTOS.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | * 5 | * SPDX-License-Identifier: MIT 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | * this software and associated documentation files (the "Software"), to deal in 9 | * the Software without restriction, including without limitation the rights to 10 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | * the Software, and to permit persons to whom the Software is furnished to do so, 12 | * subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | * 24 | * https://www.FreeRTOS.org 25 | * https://github.com/FreeRTOS 26 | * 27 | */ 28 | 29 | /* 30 | Changes from V3.0.0 31 | 32 | Changes from V3.0.1 33 | 34 | Changes from V4.0.1 35 | Uselib pragma added for Croutine.c 36 | */ 37 | 38 | /* 39 | * The installation script will automatically prepend this file to the default FreeRTOS.h. 40 | */ 41 | 42 | #ifndef WIZC_FREERTOS_H 43 | #define WIZC_FREERTOS_H 44 | 45 | #pragma noheap 46 | #pragma wizcpp expandnl on 47 | #pragma wizcpp searchpath "$__PATHNAME__/libFreeRTOS/Include/" 48 | #pragma wizcpp uselib "$__PATHNAME__/libFreeRTOS/Modules/Croutine.c" 49 | #pragma wizcpp uselib "$__PATHNAME__/libFreeRTOS/Modules/Tasks.c" 50 | #pragma wizcpp uselib "$__PATHNAME__/libFreeRTOS/Modules/Queue.c" 51 | #pragma wizcpp uselib "$__PATHNAME__/libFreeRTOS/Modules/List.c" 52 | #pragma wizcpp uselib "$__PATHNAME__/libFreeRTOS/Modules/Port.c" 53 | 54 | #endif /* WIZC_FREERTOS_H */ 55 | -------------------------------------------------------------------------------- /portable/readme.txt: -------------------------------------------------------------------------------- 1 | Each real time kernel port consists of three files that contain the core kernel 2 | components and are common to every port, and one or more files that are 3 | specific to a particular microcontroller and/or compiler. 4 | 5 | 6 | + The FreeRTOS/Source/Portable/MemMang directory contains the five sample 7 | memory allocators as described on the https://www.FreeRTOS.org WEB site. 8 | 9 | + The other directories each contain files specific to a particular 10 | microcontroller or compiler, where the directory name denotes the compiler 11 | specific files the directory contains. 12 | 13 | 14 | 15 | For example, if you are interested in the [compiler] port for the [architecture] 16 | microcontroller, then the port specific files are contained in 17 | FreeRTOS/Source/Portable/[compiler]/[architecture] directory. If this is the 18 | only port you are interested in then all the other directories can be 19 | ignored. 20 | -------------------------------------------------------------------------------- /portable/template/port.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeRTOS Kernel <DEVELOPMENT BRANCH> 3 | * license and copyright intentionally withheld to promote copying into user code. 4 | */ 5 | 6 | #include "FreeRTOS.h" 7 | #include "task.h" 8 | 9 | BaseType_t xPortStartScheduler( void ) 10 | { 11 | return pdTRUE; 12 | } 13 | 14 | void vPortEndScheduler( void ) 15 | { 16 | } 17 | 18 | StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack, 19 | TaskFunction_t pxCode, 20 | void * pvParameters ) 21 | { 22 | ( void ) pxTopOfStack; 23 | ( void ) pvParameters; 24 | ( void ) * pxCode; 25 | 26 | return NULL; 27 | } 28 | 29 | void vPortYield( void ) 30 | { 31 | /* Save the current Context */ 32 | 33 | /* Switch to the highest priority task that is ready to run. */ 34 | #if ( configNUMBER_OF_CORES == 1 ) 35 | { 36 | vTaskSwitchContext(); 37 | } 38 | #else 39 | { 40 | vTaskSwitchContext( portGET_CORE_ID() ); 41 | } 42 | #endif 43 | 44 | /* Start executing the task we have just switched to. */ 45 | } 46 | 47 | static void prvTickISR( void ) 48 | { 49 | /* Interrupts must have been enabled for the ISR to fire, so we have to 50 | * save the context with interrupts enabled. */ 51 | 52 | #if ( configNUMBER_OF_CORES == 1 ) 53 | { 54 | /* Maintain the tick count. */ 55 | if( xTaskIncrementTick() != pdFALSE ) 56 | { 57 | /* Switch to the highest priority task that is ready to run. */ 58 | vTaskSwitchContext(); 59 | } 60 | } 61 | #else 62 | { 63 | UBaseType_t ulPreviousMask; 64 | 65 | /* Tasks or ISRs running on other cores may still in critical section in 66 | * multiple cores environment. Incrementing tick needs to performed in 67 | * critical section. */ 68 | ulPreviousMask = taskENTER_CRITICAL_FROM_ISR(); 69 | 70 | /* Maintain the tick count. */ 71 | if( xTaskIncrementTick() != pdFALSE ) 72 | { 73 | /* Switch to the highest priority task that is ready to run. */ 74 | vTaskSwitchContext( portGET_CORE_ID() ); 75 | } 76 | 77 | taskEXIT_CRITICAL_FROM_ISR( ulPreviousMask ); 78 | } 79 | #endif /* if ( configNUMBER_OF_CORES == 1 ) */ 80 | 81 | /* start executing the new task */ 82 | } 83 | --------------------------------------------------------------------------------