Skip to content

Commit

Permalink
cmake: enable more cmake builds
Browse files Browse the repository at this point in the history
  • Loading branch information
raiden00pl committed Jul 25, 2023
1 parent 13dfe41 commit 332635c
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 84 deletions.
118 changes: 61 additions & 57 deletions arch/arm/src/nrf53/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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()

Expand Down
8 changes: 8 additions & 0 deletions drivers/wireless/bluetooth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,13 @@ if(CONFIG_DRIVERS_BLUETOOTH)
list(APPEND SRCS bt_null.c)
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})
endif()
50 changes: 25 additions & 25 deletions tools/ci/testlist/arm-05.dat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
4 changes: 2 additions & 2 deletions tools/ci/testlist/arm-12.dat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 332635c

Please sign in to comment.