From 9e1444f88d7be73c6d8275881dfc014ee9e9f135 Mon Sep 17 00:00:00 2001 From: ATmobica Date: Wed, 15 Dec 2021 21:37:14 +0100 Subject: [PATCH 1/2] Add <"CM0P_SLEEP" IN_LIST MBED_TARGET_LABELS> condition to Cypress boards and common PSOC6 cmake files --- .../TARGET_Cypress/TARGET_PSOC6/CMakeLists.txt | 18 ++++++++++-------- .../TARGET_CY8CKIT_062S2_43012/CMakeLists.txt | 8 +++++++- .../TARGET_CY8CKIT_062_BLE/CMakeLists.txt | 8 +++++++- .../TARGET_CY8CKIT_062_WIFI_BT/CMakeLists.txt | 8 +++++++- .../CMakeLists.txt | 8 +++++++- .../TARGET_CY8CPROTO_062_4343W/CMakeLists.txt | 8 +++++++- .../CMakeLists.txt | 8 +++++++- .../CMakeLists.txt | 8 +++++++- 8 files changed, 59 insertions(+), 15 deletions(-) diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/CMakeLists.txt b/targets/TARGET_Cypress/TARGET_PSOC6/CMakeLists.txt index 212174df64..59d2b3304e 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/CMakeLists.txt +++ b/targets/TARGET_Cypress/TARGET_PSOC6/CMakeLists.txt @@ -46,14 +46,16 @@ target_sources(mbed-cm0p-secure psoc6cm0p/COMPONENT_CM0P_SECURE/psoc6_03_cm0p_secure.c ) -add_library(mbed-cm0p-sleep INTERFACE) -target_sources(mbed-cm0p-sleep - INTERFACE - psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_01_cm0p_sleep.c - psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_02_cm0p_sleep.c - psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_03_cm0p_sleep.c - psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_04_cm0p_sleep.c -) +if("CM0P_SLEEP" IN_LIST MBED_TARGET_LABELS) + add_library(mbed-cm0p-sleep INTERFACE) + target_sources(mbed-cm0p-sleep + INTERFACE + psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_01_cm0p_sleep.c + psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_02_cm0p_sleep.c + psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_03_cm0p_sleep.c + psoc6cm0p/COMPONENT_CM0P_SLEEP/psoc6_04_cm0p_sleep.c + ) +endif() add_library(mbed-udb-sdio-p12 INTERFACE) target_include_directories(mbed-udb-sdio-p12 diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062S2_43012/CMakeLists.txt b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062S2_43012/CMakeLists.txt index bc123b1801..519eb9f153 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062S2_43012/CMakeLists.txt +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062S2_43012/CMakeLists.txt @@ -63,10 +63,16 @@ target_link_libraries(mbed-cy8ckit-062s2-43012 mbed-cat1a mbed-cy8ckit-062s2-43012-cm4 mbed-cy8ckit-062s2-43012-bsp-design-modus - mbed-cm0p-sleep mbed-psoc6 ) +if("CM0P_SLEEP" IN_LIST MBED_TARGET_LABELS) + target_link_libraries(mbed-cy8ckit-062s2-43012 + INTERFACE + mbed-cm0p-sleep + ) +endif() + if("WHD" IN_LIST MBED_TARGET_LABELS) target_link_libraries(mbed-cy8ckit-062s2-43012 INTERFACE diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_BLE/CMakeLists.txt b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_BLE/CMakeLists.txt index 06fb29f1e4..3eeb7c969b 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_BLE/CMakeLists.txt +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_BLE/CMakeLists.txt @@ -63,10 +63,16 @@ target_link_libraries(mbed-cy8ckit-062-ble mbed-cat1a mbed-cy8ckit-062-ble-cm4 mbed-cy8ckit-062-ble-bsp-design-modus - mbed-cm0p-sleep mbed-psoc6 ) +if("CM0P_SLEEP" IN_LIST MBED_TARGET_LABELS) + target_link_libraries(mbed-cy8ckit-062-ble + INTERFACE + mbed-cm0p-sleep + ) +endif() + target_compile_definitions(mbed-cy8ckit-062-ble INTERFACE "CY8C6347BZI_BLD53" diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_WIFI_BT/CMakeLists.txt b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_WIFI_BT/CMakeLists.txt index 50de533e58..178d3fa9c1 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_WIFI_BT/CMakeLists.txt +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_WIFI_BT/CMakeLists.txt @@ -63,11 +63,17 @@ target_link_libraries(mbed-cy8ckit-062-wifi-bt mbed-cat1a mbed-cy8ckit-062-wifi-bt-cm4 mbed-cy8ckit-062-wifi-bt-bsp-design-modus - mbed-cm0p-sleep mbed-psoc6 mbed-udb-sdio-p12 ) +if("CM0P_SLEEP" IN_LIST MBED_TARGET_LABELS) + target_link_libraries(mbed-cy8ckit-062-wifi-bt + INTERFACE + mbed-cm0p-sleep + ) +endif() + if("WHD" IN_LIST MBED_TARGET_LABELS) target_link_libraries(mbed-cy8ckit-062-wifi-bt INTERFACE diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_062S3_4343W/CMakeLists.txt b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_062S3_4343W/CMakeLists.txt index 4590f28792..f4baa9614b 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_062S3_4343W/CMakeLists.txt +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_062S3_4343W/CMakeLists.txt @@ -64,11 +64,17 @@ target_link_libraries(mbed-cy8cproto-062s3-4343w mbed-cat1a mbed-cy8cproto-062s3-4343w-cm4 mbed-cy8cproto-062s3-4343w-bsp-design-modus - mbed-cm0p-sleep mbed-psoc6 mbed-cy-external-wifi-fw ) +if("CM0P_SLEEP" IN_LIST MBED_TARGET_LABELS) + target_link_librariesmbed-cy8cproto-062s3-4343w + INTERFACE + mbed-cm0p-sleep + ) +endif() + if("WHD" IN_LIST MBED_TARGET_LABELS) target_link_libraries(mbed-cy8cproto-062s3-4343w INTERFACE diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_062_4343W/CMakeLists.txt b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_062_4343W/CMakeLists.txt index 9d8a30254a..2c70a0af9c 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_062_4343W/CMakeLists.txt +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_062_4343W/CMakeLists.txt @@ -64,10 +64,16 @@ target_link_libraries(mbed-cy8cproto-062-4343w mbed-cat1a mbed-cy8cproto-062-4343w-cm4 mbed-cy8cproto-062-4343w-bsp-design-modus - mbed-cm0p-sleep mbed-psoc6 ) +if("CM0P_SLEEP" IN_LIST MBED_TARGET_LABELS) + target_link_libraries(mbed-cy8cproto-062-4343w + INTERFACE + mbed-cm0p-sleep + ) +endif() + if("WHD" IN_LIST MBED_TARGET_LABELS) target_link_libraries(mbed-cy8cproto-062-4343w INTERFACE diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43012EVB_01/CMakeLists.txt b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43012EVB_01/CMakeLists.txt index 185a00c2a2..5d6d718d85 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43012EVB_01/CMakeLists.txt +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43012EVB_01/CMakeLists.txt @@ -65,11 +65,17 @@ target_link_libraries(mbed-cyw9p62s1-43012evb-01 mbed-cat1a mbed-cyw9p62s1-43012evb-01-cm4 mbed-cyw9p62s1-43012evb-01-bsp-design-modus - mbed-cm0p-sleep mbed-psoc6 mbed-udb-sdio-p12 ) +if("CM0P_SLEEP" IN_LIST MBED_TARGET_LABELS) + target_link_libraries(mbed-cyw9p62s1-43012evb-01 + INTERFACE + mbed-cm0p-sleep + ) +endif() + if("WHD" IN_LIST MBED_TARGET_LABELS) target_link_libraries(mbed-cyw9p62s1-43012evb-01 INTERFACE diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/CMakeLists.txt b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/CMakeLists.txt index f76d66e829..ef6e56e39d 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/CMakeLists.txt +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CYW9P62S1_43438EVB_01/CMakeLists.txt @@ -64,11 +64,17 @@ target_link_libraries(mbed-cyw9p62s1-43438evb-01 mbed-cat1a mbed-cyw9p62s1-43438evb-01-cm4 mbed-cyw9p62s1-43438evb-01-bsp-design-modus - mbed-cm0p-sleep mbed-psoc6 mbed-udb-sdio-p2 ) +if("CM0P_SLEEP" IN_LIST MBED_TARGET_LABELS) + target_link_libraries(mbed-cyw9p62s1-43438evb-01 + INTERFACE + mbed-cm0p-sleep + ) +endif() + if("WHD" IN_LIST MBED_TARGET_LABELS) target_link_libraries(mbed-cyw9p62s1-43438evb-01 INTERFACE From 6a5cc40182bb3bae060d7716c6444c235c5aa9a3 Mon Sep 17 00:00:00 2001 From: ATmobica Date: Wed, 15 Dec 2021 22:16:14 +0100 Subject: [PATCH 2/2] Fix mbed-cy8cproto-062s3-4343w target --- .../TARGET_PSOC6/TARGET_CY8CPROTO_062S3_4343W/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_062S3_4343W/CMakeLists.txt b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_062S3_4343W/CMakeLists.txt index f4baa9614b..cb88e65846 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_062S3_4343W/CMakeLists.txt +++ b/targets/TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CPROTO_062S3_4343W/CMakeLists.txt @@ -69,7 +69,7 @@ target_link_libraries(mbed-cy8cproto-062s3-4343w ) if("CM0P_SLEEP" IN_LIST MBED_TARGET_LABELS) - target_link_librariesmbed-cy8cproto-062s3-4343w + target_link_libraries(mbed-cy8cproto-062s3-4343w INTERFACE mbed-cm0p-sleep )