From 59bb225f407d5e5e45bc70c3285e24e73e57699b Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Wed, 3 Feb 2021 14:15:07 +0000 Subject: [PATCH] CMake: Fix Cypress MCU_PSOC6_M4 build Ensure the RTOS source file are included if the full profile is used. The macro CY_RTOS_AWARE is added whenever the full profile is used --- .../psoc6csp/abstraction/rtos/CMakeLists.txt | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/psoc6csp/abstraction/rtos/CMakeLists.txt b/targets/TARGET_Cypress/TARGET_PSOC6/psoc6csp/abstraction/rtos/CMakeLists.txt index 2b5c1479a2..938341b33f 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/psoc6csp/abstraction/rtos/CMakeLists.txt +++ b/targets/TARGET_Cypress/TARGET_PSOC6/psoc6csp/abstraction/rtos/CMakeLists.txt @@ -1,25 +1,25 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -add_library(mbed-cy_psoc6csp_rtos INTERFACE) +if("CY_RTOS_AWARE" IN_LIST MBED_CONFIG_DEFINITIONS) + if("RTX" IN_LIST MBED_TARGET_LABELS) + target_include_directories(mbed-core + INTERFACE + include/COMPONENT_RTX + ) + target_sources(mbed-core + INTERFACE + source/COMPONENT_RTX/cyabs_rtos_rtxv5.c + ) + endif() -if("RTX" IN_LIST MBED_TARGET_LABELS) - target_include_directories(mbed-cy_psoc6csp_rtos + target_include_directories(mbed-core INTERFACE - include/COMPONENT_RTX + include ) - target_sources(mbed-cy_psoc6csp_rtos + + target_sources(mbed-core INTERFACE - source/COMPONENT_RTX/cyabs_rtos_rtxv5.c + source/cy_worker_thread.c ) endif() - -target_include_directories(mbed-cy_psoc6csp_rtos - INTERFACE - include -) - -target_sources(mbed-cy_psoc6csp_rtos - INTERFACE - source/cy_worker_thread.c -)