From 96526a27750e2e51c47ae07a94542f20abb0102a Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Mon, 24 Jul 2023 12:41:09 +0200 Subject: [PATCH] cmake: enable more cmake builds --- arch/arm/src/nrf53/CMakeLists.txt | 118 +++++++++++++++--------------- tools/ci/testlist/arm-05.dat | 50 ++++++------- tools/ci/testlist/arm-12.dat | 4 +- 3 files changed, 88 insertions(+), 84 deletions(-) diff --git a/arch/arm/src/nrf53/CMakeLists.txt b/arch/arm/src/nrf53/CMakeLists.txt index a77e337244523..578753af533b8 100644 --- a/arch/arm/src/nrf53/CMakeLists.txt +++ b/arch/arm/src/nrf53/CMakeLists.txt @@ -1,22 +1,22 @@ -############################################################################ +# ############################################################################## # arch/arm/src/nrf53/CMakeLists.txt # -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. The -# ASF licenses this file to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance with the -# License. You may obtain a copy of the License at +# Licensed to the Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with this work for +# additional information regarding copyright ownership. The ASF licenses this +# file to you under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. +# License for the specific language governing permissions and limitations under +# the License. # -############################################################################ +# ############################################################################## set(SRCS nrf53_start.c @@ -60,7 +60,7 @@ if(CONFIG_NRF53_IPC) list(APPEND SRCS nrf53_ipc.c) endif() -if(CONFIG_NRF53_RPTUN) +if(CONFIG_RPTUN) list(APPEND SRCS nrf53_rptun.c) endif() @@ -106,59 +106,63 @@ endif() if(CONFIG_NRF53_SOFTDEVICE_CONTROLLER) -set(NRFXLIB_VER "2.3.0") -set(NRFXLIB_URL "https://github.com/nrfconnect/sdk-nrfxlib/archive") - -if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/sdk-nrfxlib) - FetchContent_Declare( - sdk-nrfxlib - DOWNLOAD_NAME "sdk-nrfxlib-v${NRFXLIB_VER}.tar.gz" - DOWNLOAD_DIR ${CMAKE_CURRENT_LIST_DIR} - URL "${NRFXLIB_URL}/v${NRFXLIB_VER}.tar.gz" - SOURCE_DIR - ${CMAKE_CURRENT_LIST_DIR}/sdk-nrfxlib - BINARY_DIR - ${CMAKE_BINARY_DIR}/arch/sdk-nrfxlib - CONFIGURE_COMMAND - "" - BUILD_COMMAND - "" - INSTALL_COMMAND - "" - TEST_COMMAND - "" - DOWNLOAD_NO_PROGRESS true - TIMEOUT 30) - - FetchContent_GetProperties(sdk-nrfxlib) - - if(NOT sdk-nrfxlib_POPULATED) - FetchContent_Populate(sdk-nrfxlib) + set(NRFXLIB_VER "2.3.0") + set(NRFXLIB_URL "https://github.com/nrfconnect/sdk-nrfxlib/archive") + + if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/sdk-nrfxlib) + FetchContent_Declare( + sdk-nrfxlib + DOWNLOAD_NAME "sdk-nrfxlib-v${NRFXLIB_VER}.tar.gz" + DOWNLOAD_DIR ${CMAKE_CURRENT_LIST_DIR} + URL "${NRFXLIB_URL}/v${NRFXLIB_VER}.tar.gz" + SOURCE_DIR + ${CMAKE_CURRENT_LIST_DIR}/sdk-nrfxlib + BINARY_DIR + ${CMAKE_BINARY_DIR}/arch/sdk-nrfxlib + CONFIGURE_COMMAND + "" + BUILD_COMMAND + "" + INSTALL_COMMAND + "" + TEST_COMMAND + "" + DOWNLOAD_NO_PROGRESS true + TIMEOUT 30) + + FetchContent_GetProperties(sdk-nrfxlib) + + if(NOT sdk-nrfxlib_POPULATED) + FetchContent_Populate(sdk-nrfxlib) + endif() endif() -endif() -set(NRFXLIB_DIR "${NUTTX_CHIP_ABS_DIR}/sdk-nrfxlib") + set(NRFXLIB_DIR "${NUTTX_CHIP_ABS_DIR}/sdk-nrfxlib") -target_include_directories(arch PRIVATE ${NUTTX_CHIP_ABS_DIR}/sdc) -target_include_directories(arch PRIVATE ${NRFXLIB_DIR}/mpsl/include) -target_include_directories(arch PRIVATE ${NRFXLIB_DIR}/softdevice_controller/include) + target_include_directories(arch PRIVATE ${NUTTX_CHIP_ABS_DIR}/sdc) + target_include_directories(arch PRIVATE ${NRFXLIB_DIR}/mpsl/include) + target_include_directories( + arch PRIVATE ${NRFXLIB_DIR}/softdevice_controller/include) -list(APPEND SRCS nrf53_sdc.c) + list(APPEND SRCS nrf53_sdc.c) -add_compile_options(-DNRF53_SERIES) + add_compile_options(-DNRF53_SERIES) -if(CONFIG_ARCH_FPU) - set(NRFXLIB_LIB_VARIANT hard-float) -else () - set(NRFXLIB_LIB_VARIANT soft-float) -endif() + if(CONFIG_ARCH_FPU) + set(NRFXLIB_LIB_VARIANT hard-float) + else() + set(NRFXLIB_LIB_VARIANT soft-float) + endif() -set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_multirole.a) + set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_multirole.a) -target_link_libraries(arch - ${NRFXLIB_DIR}/mpsl/lib/cortex-m33+nodsp/${NRFXLIB_LIB_VARIANT}/libmpsl.a) -target_link_libraries(arch - ${NRFXLIB_DIR}/softdevice_controller/lib/cortex-m33+nodsp/${NRFXLIB_LIB_VARIANT}/${SOFTDEVICE_LIB_VARIANT}) + target_link_libraries( + arch + ${NRFXLIB_DIR}/mpsl/lib/cortex-m33+nodsp/${NRFXLIB_LIB_VARIANT}/libmpsl.a) + target_link_libraries( + arch + ${NRFXLIB_DIR}/softdevice_controller/lib/cortex-m33+nodsp/${NRFXLIB_LIB_VARIANT}/${SOFTDEVICE_LIB_VARIANT} + ) endif() diff --git a/tools/ci/testlist/arm-05.dat b/tools/ci/testlist/arm-05.dat index 73113d72eeb74..a4f4ea374f7a4 100644 --- a/tools/ci/testlist/arm-05.dat +++ b/tools/ci/testlist/arm-05.dat @@ -8,13 +8,13 @@ # Boards build by CMake CMake,nrf52832-dk:buttons -# CMake,nrf52832-dk:mcuboot_app -# CMake,nrf52832-dk:mcuboot_loader -# CMake,nrf52832-dk:mcuboot_loader_minimal +CMake,nrf52832-dk:mcuboot_app +CMake,nrf52832-dk:mcuboot_loader +CMake,nrf52832-dk:mcuboot_loader_minimal CMake,nrf52832-dk:nsh CMake,nrf52832-dk:ostest_tickless -# CMake,nrf52832-dk:sdc -# CMake,nrf52832-dk:sdc_nimble +CMake,nrf52832-dk:sdc +CMake,nrf52832-dk:sdc_nimble CMake,nrf52832-dk:wdog CMake,nrf52832-mdk:nsh @@ -24,17 +24,17 @@ CMake,nrf52832-sparkfun:nsh CMake,nrf52840-dk:adc CMake,nrf52840-dk:buttons CMake,nrf52840-dk:cdcacm -# CMake,nrf52840-dk:composite +CMake,nrf52840-dk:composite CMake,nrf52840-dk:highpri -# CMake,nrf52840-dk:mcuboot_app -# CMake,nrf52840-dk:mcuboot_loader +CMake,nrf52840-dk:mcuboot_app +CMake,nrf52840-dk:mcuboot_loader CMake,nrf52840-dk:nsh CMake,nrf52840-dk:ostest_tickless CMake,nrf52840-dk:pwm CMake,nrf52840-dk:qspi -#CMake,nrf52840-dk:rndis -# CMake,nrf52840-dk:sdc -# CMake,nrf52840-dk:sdc_nimble +CMake,nrf52840-dk:rndis +CMake,nrf52840-dk:sdc +CMake,nrf52840-dk:sdc_nimble CMake,nrf52840-dk:sx127x CMake,nrf52840-dk:timer @@ -51,30 +51,30 @@ CMake,nrf5340-audio-dk:nsh_cpuapp CMake,nrf5340-dk:adc_cpuapp CMake,nrf5340-dk:buttons_cpuapp -# CMake,nrf5340-dk:composite_cpuapp -# CMake,nrf5340-dk:mcuboot_app_cpuapp -# CMake,nrf5340-dk:mcuboot_loader_cpuapp +CMake,nrf5340-dk:composite_cpuapp +CMake,nrf5340-dk:mcuboot_app_cpuapp +CMake,nrf5340-dk:mcuboot_loader_cpuapp CMake,nrf5340-dk:nsh_cpuapp CMake,nrf5340-dk:nsh_cpunet CMake,nrf5340-dk:ostest_tickless_cpuapp CMake,nrf5340-dk:pwm_cpuapp CMake,nrf5340-dk:qspi_cpuapp -# CMake,nrf5340-dk:rpmsghci_bt_cpuapp -# CMake,nrf5340-dk:rpmsghci_nimble_cpuapp -# CMake,nrf5340-dk:rpmsghci_sdc_cpunet -# CMake,nrf5340-dk:rptun_cpuapp -# CMake,nrf5340-dk:rptun_cpunet -# CMake,nrf5340-dk:sdc_cpunet -# CMake,nrf5340-dk:sdc_nimble_cpunet +CMake,nrf5340-dk:rpmsghci_bt_cpuapp +CMake,nrf5340-dk:rpmsghci_nimble_cpuapp +CMake,nrf5340-dk:rpmsghci_sdc_cpunet +CMake,nrf5340-dk:rptun_cpuapp +CMake,nrf5340-dk:rptun_cpunet +CMake,nrf5340-dk:sdc_cpunet +CMake,nrf5340-dk:sdc_nimble_cpunet CMake,nrf5340-dk:timer_cpuapp -# CMake,thingy53:composite_cpuapp +CMake,thingy53:composite_cpuapp CMake,thingy53:nsh_cpuapp CMake,thingy53:nsh_cpunet -# CMake,nrf9160-dk:mcuboot_app -# CMake,nrf9160-dk:mcuboot_loader +CMake,nrf9160-dk:mcuboot_app +CMake,nrf9160-dk:mcuboot_loader CMake,nrf9160-dk:miniboot_s -# CMake,nrf9160-dk:modem_ns +CMake,nrf9160-dk:modem_ns CMake,nrf9160-dk:nsh CMake,nrf9160-dk:ostest_tickless diff --git a/tools/ci/testlist/arm-12.dat b/tools/ci/testlist/arm-12.dat index 5e404651b60db..a14484d23b871 100644 --- a/tools/ci/testlist/arm-12.dat +++ b/tools/ci/testlist/arm-12.dat @@ -36,8 +36,8 @@ CMake,stm32f777zit6-meadow:nsh # CMake,nucleo-h743zi:composite # CMake,nucleo-h743zi:elf -# CMake,nucleo-h743zi:mcuboot-app -# CMake,nucleo-h743zi:mcuboot-loader +CMake,nucleo-h743zi:mcuboot-app +CMake,nucleo-h743zi:mcuboot-loader CMake,nucleo-h743zi:netnsh CMake,nucleo-h743zi:nsh # CMake,nucleo-h743zi:nxlines_oled