diff --git a/CMakeLists.txt b/CMakeLists.txt index 481b4336a..86e149c02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,7 +180,6 @@ add_library(freertos_kernel STATIC stream_buffer.c tasks.c timers.c - portable/Common/mpu_wrappers.c # If FREERTOS_HEAP is digit between 1 .. 5 - it is heap number, otherwise - it is path to custom heap source file $>,${FREERTOS_HEAP},portable/MemMang/heap_${FREERTOS_HEAP}.c> diff --git a/portable/CMakeLists.txt b/portable/CMakeLists.txt index 8d10aa06b..9848adaf4 100644 --- a/portable/CMakeLists.txt +++ b/portable/CMakeLists.txt @@ -393,6 +393,23 @@ add_library(freertos_kernel_port STATIC WizC/PIC18/Drivers/Tick/Tick.c> ) +if( + FREERTOS_PORT STREQUAL "GCC_ARM_CM23_NTZ_NONSECURE" OR + FREERTOS_PORT STREQUAL "GCC_ARM_CM23_NONSECURE" OR + FREERTOS_PORT STREQUAL "GCC_ARM_CM33_NTZ_NONSECURE" OR + FREERTOS_PORT STREQUAL "GCC_ARM_CM3_MPU" OR + FREERTOS_PORT STREQUAL "GCC_ARM_CM4_MPU" OR + FREERTOS_PORT STREQUAL "GCC_ARM_CM33_NONSECURE" OR + FREERTOS_PORT STREQUAL "IAR_ARM_CM23_NTZ_NONSECURE" OR + FREERTOS_PORT STREQUAL "IAR_ARM_CM23_NONSECURE" OR + FREERTOS_PORT STREQUAL "IAR_ARM_CM33_NTZ_NONSECURE" OR + FREERTOS_PORT STREQUAL "IAR_ARM_CM4F_MPU" OR + FREERTOS_PORT STREQUAL "IAR_ARM_CM33_NONSECURE" OR + FREERTOS_PORT STREQUAL "RVDS_ARM_CM4_MPU" +) + target_sources(freertos_kernel_port PRIVATE Common/mpu_wrappers.c) +endif() + target_include_directories(freertos_kernel_port PUBLIC $<$: ${CMAKE_CURRENT_LIST_DIR}/BCC/16BitDOS/common