From 02b418a7ea4a324f5fdc5a06c74684a7c0811f05 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sat, 17 Feb 2024 21:04:12 +0100 Subject: [PATCH] arch/arm/src/nrf52/CMakeLists.txt: format file --- arch/arm/src/nrf52/CMakeLists.txt | 121 +++++++++++++++--------------- 1 file changed, 62 insertions(+), 59 deletions(-) diff --git a/arch/arm/src/nrf52/CMakeLists.txt b/arch/arm/src/nrf52/CMakeLists.txt index 80b8c84408..d20b6339d7 100644 --- a/arch/arm/src/nrf52/CMakeLists.txt +++ b/arch/arm/src/nrf52/CMakeLists.txt @@ -1,22 +1,22 @@ -############################################################################ +# ############################################################################## # arch/arm/src/nrf52/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 nrf52_start.c @@ -144,65 +144,68 @@ endif() if(CONFIG_NRF52_SOFTDEVICE_CONTROLLER) -set(NRFXLIB_VER "2.3.0") -set(NRFXLIB_URL "https://github.com/nrfconnect/sdk-nrfxlib/archive") + 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) + 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) + FetchContent_GetProperties(sdk-nrfxlib) - if(NOT sdk-nrfxlib_POPULATED) - FetchContent_Populate(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 nrf52_sdc.c) + list(APPEND SRCS nrf52_sdc.c) -add_compile_options(-DNRF52_SERIES) + add_compile_options(-DNRF52_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() -if(CONFIG_NRF52_SDC_PERIPHERAL) - set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_peripheral.a) -elseif(CONFIG_NRF52_SDC_CENTRAL) - set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_central.a) -elseif(CONFIG_NRF52_SDC_MULTIROLE) - set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_multirole.a) -endif() + if(CONFIG_NRF52_SDC_PERIPHERAL) + set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_peripheral.a) + elseif(CONFIG_NRF52_SDC_CENTRAL) + set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_central.a) + elseif(CONFIG_NRF52_SDC_MULTIROLE) + set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_multirole.a) + endif() -target_link_libraries(arch - ${NRFXLIB_DIR}/mpsl/lib/cortex-m4/${NRFXLIB_LIB_VARIANT}/libmpsl.a) -target_link_libraries(arch - ${NRFXLIB_DIR}/softdevice_controller/lib/cortex-m4/${NRFXLIB_LIB_VARIANT}/${SOFTDEVICE_LIB_VARIANT}) + target_link_libraries( + arch ${NRFXLIB_DIR}/mpsl/lib/cortex-m4/${NRFXLIB_LIB_VARIANT}/libmpsl.a) + target_link_libraries( + arch + ${NRFXLIB_DIR}/softdevice_controller/lib/cortex-m4/${NRFXLIB_LIB_VARIANT}/${SOFTDEVICE_LIB_VARIANT} + ) endif()