Skip to content

Commit

Permalink
CMake: Move mpu_wrapper to ports library. (FreeRTOS#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
imi415 authored Feb 22, 2022
1 parent 09a2c0b commit 38efd26
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<IF:$<BOOL:$<FILTER:${FREERTOS_HEAP},EXCLUDE,^[1-5]$>>,${FREERTOS_HEAP},portable/MemMang/heap_${FREERTOS_HEAP}.c>
Expand Down
17 changes: 17 additions & 0 deletions portable/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<$<STREQUAL:${FREERTOS_PORT},BCC_16BIT_DOS_FLSH186>:
${CMAKE_CURRENT_LIST_DIR}/BCC/16BitDOS/common
Expand Down

0 comments on commit 38efd26

Please sign in to comment.