mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
arch/arm/src/nrf52/CMakeLists.txt: format file
This commit is contained in:
@@ -1,22 +1,22 @@
|
|||||||
############################################################################
|
# ##############################################################################
|
||||||
# arch/arm/src/nrf52/CMakeLists.txt
|
# arch/arm/src/nrf52/CMakeLists.txt
|
||||||
#
|
#
|
||||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
|
||||||
# contributor license agreements. See the NOTICE file distributed with
|
# license agreements. See the NOTICE file distributed with this work for
|
||||||
# this work for additional information regarding copyright ownership. The
|
# additional information regarding copyright ownership. The ASF licenses this
|
||||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
# file to you under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
# "License"); you may not use this file except in compliance with the
|
# use this file except in compliance with the License. You may obtain a copy of
|
||||||
# License. You may obtain a copy of the License at
|
# 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
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations under
|
||||||
# under the License.
|
# the License.
|
||||||
#
|
#
|
||||||
############################################################################
|
# ##############################################################################
|
||||||
|
|
||||||
set(SRCS
|
set(SRCS
|
||||||
nrf52_start.c
|
nrf52_start.c
|
||||||
@@ -144,10 +144,10 @@ endif()
|
|||||||
|
|
||||||
if(CONFIG_NRF52_SOFTDEVICE_CONTROLLER)
|
if(CONFIG_NRF52_SOFTDEVICE_CONTROLLER)
|
||||||
|
|
||||||
set(NRFXLIB_VER "2.3.0")
|
set(NRFXLIB_VER "2.3.0")
|
||||||
set(NRFXLIB_URL "https://github.com/nrfconnect/sdk-nrfxlib/archive")
|
set(NRFXLIB_URL "https://github.com/nrfconnect/sdk-nrfxlib/archive")
|
||||||
|
|
||||||
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/sdk-nrfxlib)
|
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/sdk-nrfxlib)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
sdk-nrfxlib
|
sdk-nrfxlib
|
||||||
DOWNLOAD_NAME "sdk-nrfxlib-v${NRFXLIB_VER}.tar.gz"
|
DOWNLOAD_NAME "sdk-nrfxlib-v${NRFXLIB_VER}.tar.gz"
|
||||||
@@ -173,36 +173,39 @@ if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/sdk-nrfxlib)
|
|||||||
if(NOT sdk-nrfxlib_POPULATED)
|
if(NOT sdk-nrfxlib_POPULATED)
|
||||||
FetchContent_Populate(sdk-nrfxlib)
|
FetchContent_Populate(sdk-nrfxlib)
|
||||||
endif()
|
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 ${NUTTX_CHIP_ABS_DIR}/sdc)
|
||||||
target_include_directories(arch PRIVATE ${NRFXLIB_DIR}/mpsl/include)
|
target_include_directories(arch PRIVATE ${NRFXLIB_DIR}/mpsl/include)
|
||||||
target_include_directories(arch PRIVATE ${NRFXLIB_DIR}/softdevice_controller/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)
|
if(CONFIG_ARCH_FPU)
|
||||||
set(NRFXLIB_LIB_VARIANT hard-float)
|
set(NRFXLIB_LIB_VARIANT hard-float)
|
||||||
else ()
|
else()
|
||||||
set(NRFXLIB_LIB_VARIANT soft-float)
|
set(NRFXLIB_LIB_VARIANT soft-float)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_NRF52_SDC_PERIPHERAL)
|
if(CONFIG_NRF52_SDC_PERIPHERAL)
|
||||||
set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_peripheral.a)
|
set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_peripheral.a)
|
||||||
elseif(CONFIG_NRF52_SDC_CENTRAL)
|
elseif(CONFIG_NRF52_SDC_CENTRAL)
|
||||||
set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_central.a)
|
set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_central.a)
|
||||||
elseif(CONFIG_NRF52_SDC_MULTIROLE)
|
elseif(CONFIG_NRF52_SDC_MULTIROLE)
|
||||||
set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_multirole.a)
|
set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_multirole.a)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(arch
|
target_link_libraries(
|
||||||
${NRFXLIB_DIR}/mpsl/lib/cortex-m4/${NRFXLIB_LIB_VARIANT}/libmpsl.a)
|
arch ${NRFXLIB_DIR}/mpsl/lib/cortex-m4/${NRFXLIB_LIB_VARIANT}/libmpsl.a)
|
||||||
target_link_libraries(arch
|
target_link_libraries(
|
||||||
${NRFXLIB_DIR}/softdevice_controller/lib/cortex-m4/${NRFXLIB_LIB_VARIANT}/${SOFTDEVICE_LIB_VARIANT})
|
arch
|
||||||
|
${NRFXLIB_DIR}/softdevice_controller/lib/cortex-m4/${NRFXLIB_LIB_VARIANT}/${SOFTDEVICE_LIB_VARIANT}
|
||||||
|
)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user