cmake: enable more cmake builds

This commit is contained in:
raiden00pl 2023-07-24 12:41:09 +02:00 committed by Xiang Xiao
parent 9dc5a59d50
commit e48d730273
4 changed files with 93 additions and 81 deletions

View File

@ -1,22 +1,22 @@
############################################################################ # ##############################################################################
# arch/arm/src/nrf53/CMakeLists.txt # arch/arm/src/nrf53/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
nrf53_start.c nrf53_start.c
@ -60,7 +60,7 @@ if(CONFIG_NRF53_IPC)
list(APPEND SRCS nrf53_ipc.c) list(APPEND SRCS nrf53_ipc.c)
endif() endif()
if(CONFIG_NRF53_RPTUN) if(CONFIG_RPTUN)
list(APPEND SRCS nrf53_rptun.c) list(APPEND SRCS nrf53_rptun.c)
endif() endif()
@ -106,10 +106,10 @@ endif()
if(CONFIG_NRF53_SOFTDEVICE_CONTROLLER) if(CONFIG_NRF53_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"
@ -135,30 +135,34 @@ 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 nrf53_sdc.c) list(APPEND SRCS nrf53_sdc.c)
add_compile_options(-DNRF53_SERIES) add_compile_options(-DNRF53_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()
set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_multirole.a) set(SOFTDEVICE_LIB_VARIANT libsoftdevice_controller_multirole.a)
target_link_libraries(arch target_link_libraries(
arch
${NRFXLIB_DIR}/mpsl/lib/cortex-m33+nodsp/${NRFXLIB_LIB_VARIANT}/libmpsl.a) ${NRFXLIB_DIR}/mpsl/lib/cortex-m33+nodsp/${NRFXLIB_LIB_VARIANT}/libmpsl.a)
target_link_libraries(arch target_link_libraries(
${NRFXLIB_DIR}/softdevice_controller/lib/cortex-m33+nodsp/${NRFXLIB_LIB_VARIANT}/${SOFTDEVICE_LIB_VARIANT}) arch
${NRFXLIB_DIR}/softdevice_controller/lib/cortex-m33+nodsp/${NRFXLIB_LIB_VARIANT}/${SOFTDEVICE_LIB_VARIANT}
)
endif() endif()

View File

@ -42,5 +42,13 @@ if(CONFIG_DRIVERS_BLUETOOTH)
list(APPEND SRCS bt_null.c) list(APPEND SRCS bt_null.c)
endif() endif()
if(CONFIG_BLUETOOTH_RPMSG_SERVER)
list(APPEND SRCS bt_rpmsghci_server.c)
endif()
if(CONFIG_BLUETOOTH_RPMSG)
list(APPEND SRCS bt_rpmsghci.c)
endif()
target_sources(drivers PRIVATE ${SRCS}) target_sources(drivers PRIVATE ${SRCS})
endif() endif()

View File

@ -8,13 +8,13 @@
# Boards build by CMake # Boards build by CMake
CMake,nrf52832-dk:buttons CMake,nrf52832-dk:buttons
# CMake,nrf52832-dk:mcuboot_app CMake,nrf52832-dk:mcuboot_app
# CMake,nrf52832-dk:mcuboot_loader CMake,nrf52832-dk:mcuboot_loader
# CMake,nrf52832-dk:mcuboot_loader_minimal CMake,nrf52832-dk:mcuboot_loader_minimal
CMake,nrf52832-dk:nsh CMake,nrf52832-dk:nsh
CMake,nrf52832-dk:ostest_tickless CMake,nrf52832-dk:ostest_tickless
# CMake,nrf52832-dk:sdc CMake,nrf52832-dk:sdc
# CMake,nrf52832-dk:sdc_nimble CMake,nrf52832-dk:sdc_nimble
CMake,nrf52832-dk:wdog CMake,nrf52832-dk:wdog
CMake,nrf52832-mdk:nsh CMake,nrf52832-mdk:nsh
@ -24,17 +24,17 @@ CMake,nrf52832-sparkfun:nsh
CMake,nrf52840-dk:adc CMake,nrf52840-dk:adc
CMake,nrf52840-dk:buttons CMake,nrf52840-dk:buttons
CMake,nrf52840-dk:cdcacm CMake,nrf52840-dk:cdcacm
# CMake,nrf52840-dk:composite CMake,nrf52840-dk:composite
CMake,nrf52840-dk:highpri CMake,nrf52840-dk:highpri
# CMake,nrf52840-dk:mcuboot_app CMake,nrf52840-dk:mcuboot_app
# CMake,nrf52840-dk:mcuboot_loader CMake,nrf52840-dk:mcuboot_loader
CMake,nrf52840-dk:nsh CMake,nrf52840-dk:nsh
CMake,nrf52840-dk:ostest_tickless CMake,nrf52840-dk:ostest_tickless
CMake,nrf52840-dk:pwm CMake,nrf52840-dk:pwm
CMake,nrf52840-dk:qspi CMake,nrf52840-dk:qspi
#CMake,nrf52840-dk:rndis CMake,nrf52840-dk:rndis
# CMake,nrf52840-dk:sdc CMake,nrf52840-dk:sdc
# CMake,nrf52840-dk:sdc_nimble CMake,nrf52840-dk:sdc_nimble
CMake,nrf52840-dk:sx127x CMake,nrf52840-dk:sx127x
CMake,nrf52840-dk:timer CMake,nrf52840-dk:timer
@ -51,30 +51,30 @@ CMake,nrf5340-audio-dk:nsh_cpuapp
CMake,nrf5340-dk:adc_cpuapp CMake,nrf5340-dk:adc_cpuapp
CMake,nrf5340-dk:buttons_cpuapp CMake,nrf5340-dk:buttons_cpuapp
# CMake,nrf5340-dk:composite_cpuapp CMake,nrf5340-dk:composite_cpuapp
# CMake,nrf5340-dk:mcuboot_app_cpuapp CMake,nrf5340-dk:mcuboot_app_cpuapp
# CMake,nrf5340-dk:mcuboot_loader_cpuapp CMake,nrf5340-dk:mcuboot_loader_cpuapp
CMake,nrf5340-dk:nsh_cpuapp CMake,nrf5340-dk:nsh_cpuapp
CMake,nrf5340-dk:nsh_cpunet CMake,nrf5340-dk:nsh_cpunet
CMake,nrf5340-dk:ostest_tickless_cpuapp CMake,nrf5340-dk:ostest_tickless_cpuapp
CMake,nrf5340-dk:pwm_cpuapp CMake,nrf5340-dk:pwm_cpuapp
CMake,nrf5340-dk:qspi_cpuapp CMake,nrf5340-dk:qspi_cpuapp
# CMake,nrf5340-dk:rpmsghci_bt_cpuapp CMake,nrf5340-dk:rpmsghci_bt_cpuapp
# CMake,nrf5340-dk:rpmsghci_nimble_cpuapp CMake,nrf5340-dk:rpmsghci_nimble_cpuapp
# CMake,nrf5340-dk:rpmsghci_sdc_cpunet CMake,nrf5340-dk:rpmsghci_sdc_cpunet
# CMake,nrf5340-dk:rptun_cpuapp CMake,nrf5340-dk:rptun_cpuapp
# CMake,nrf5340-dk:rptun_cpunet CMake,nrf5340-dk:rptun_cpunet
# CMake,nrf5340-dk:sdc_cpunet CMake,nrf5340-dk:sdc_cpunet
# CMake,nrf5340-dk:sdc_nimble_cpunet CMake,nrf5340-dk:sdc_nimble_cpunet
CMake,nrf5340-dk:timer_cpuapp CMake,nrf5340-dk:timer_cpuapp
# CMake,thingy53:composite_cpuapp CMake,thingy53:composite_cpuapp
CMake,thingy53:nsh_cpuapp CMake,thingy53:nsh_cpuapp
CMake,thingy53:nsh_cpunet CMake,thingy53:nsh_cpunet
# CMake,nrf9160-dk:mcuboot_app CMake,nrf9160-dk:mcuboot_app
# CMake,nrf9160-dk:mcuboot_loader CMake,nrf9160-dk:mcuboot_loader
CMake,nrf9160-dk:miniboot_s CMake,nrf9160-dk:miniboot_s
# CMake,nrf9160-dk:modem_ns CMake,nrf9160-dk:modem_ns
CMake,nrf9160-dk:nsh CMake,nrf9160-dk:nsh
CMake,nrf9160-dk:ostest_tickless CMake,nrf9160-dk:ostest_tickless

View File

@ -36,8 +36,8 @@ CMake,stm32f777zit6-meadow:nsh
# CMake,nucleo-h743zi:composite # CMake,nucleo-h743zi:composite
# CMake,nucleo-h743zi:elf # CMake,nucleo-h743zi:elf
# CMake,nucleo-h743zi:mcuboot-app CMake,nucleo-h743zi:mcuboot-app
# CMake,nucleo-h743zi:mcuboot-loader CMake,nucleo-h743zi:mcuboot-loader
CMake,nucleo-h743zi:netnsh CMake,nucleo-h743zi:netnsh
CMake,nucleo-h743zi:nsh CMake,nucleo-h743zi:nsh
# CMake,nucleo-h743zi:nxlines_oled # CMake,nucleo-h743zi:nxlines_oled