From f97199340e4cf3a97de95c7e9b01c59aa2db93f4 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Thu, 20 Jul 2023 09:13:40 +0200 Subject: [PATCH] cmake: port missing nrf52 boards --- .../arm/nrf52/nrf52832-mdk/src/CMakeLists.txt | 37 +++++++++++++++ .../nrf52832-sparkfun/src/CMakeLists.txt | 37 +++++++++++++++ .../nrf52/nrf52840-dongle/src/CMakeLists.txt | 47 +++++++++++++++++++ boards/arm/nrf52/thingy52/src/CMakeLists.txt | 41 ++++++++++++++++ 4 files changed, 162 insertions(+) create mode 100644 boards/arm/nrf52/nrf52832-mdk/src/CMakeLists.txt create mode 100644 boards/arm/nrf52/nrf52832-sparkfun/src/CMakeLists.txt create mode 100644 boards/arm/nrf52/nrf52840-dongle/src/CMakeLists.txt create mode 100644 boards/arm/nrf52/thingy52/src/CMakeLists.txt diff --git a/boards/arm/nrf52/nrf52832-mdk/src/CMakeLists.txt b/boards/arm/nrf52/nrf52832-mdk/src/CMakeLists.txt new file mode 100644 index 0000000000..b361612bfe --- /dev/null +++ b/boards/arm/nrf52/nrf52832-mdk/src/CMakeLists.txt @@ -0,0 +1,37 @@ +############################################################################ +# boards/arm/nrf52/nrf52832-mdk/src/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 +# +# 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. +# +############################################################################ + +set(SRCS nrf52_boot.c nrf52_bringup.c) + +if(CONFIG_BOARDCTL) + list(APPEND SRCS nrf52_appinit.c) +endif() + +if(CONFIG_ARCH_LEDS) + list(APPEND SRCS nrf52_autoleds.c) +endif() + +target_sources(board PRIVATE ${SRCS}) + +if(CONFIG_ARCH_BOARD_COMMON) + set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_COMMON_DIR}/scripts/flash_config.ld") +else() + set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash_config.ld") +endif() diff --git a/boards/arm/nrf52/nrf52832-sparkfun/src/CMakeLists.txt b/boards/arm/nrf52/nrf52832-sparkfun/src/CMakeLists.txt new file mode 100644 index 0000000000..d5729e45b6 --- /dev/null +++ b/boards/arm/nrf52/nrf52832-sparkfun/src/CMakeLists.txt @@ -0,0 +1,37 @@ +############################################################################ +# boards/arm/nrf52/nrf52832-sparkfun/src/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 +# +# 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. +# +############################################################################ + +set(SRCS nrf52_boot.c nrf52_bringup.c) + +if(CONFIG_BOARDCTL) + list(APPEND SRCS nrf52_appinit.c) +endif() + +if(CONFIG_ARCH_LEDS) + list(APPEND SRCS nrf52_autoleds.c) +endif() + +target_sources(board PRIVATE ${SRCS}) + +if(CONFIG_ARCH_BOARD_COMMON) + set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_COMMON_DIR}/scripts/flash_config.ld") +else() + set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash_config.ld") +endif() diff --git a/boards/arm/nrf52/nrf52840-dongle/src/CMakeLists.txt b/boards/arm/nrf52/nrf52840-dongle/src/CMakeLists.txt new file mode 100644 index 0000000000..c633cf9235 --- /dev/null +++ b/boards/arm/nrf52/nrf52840-dongle/src/CMakeLists.txt @@ -0,0 +1,47 @@ +############################################################################ +# boards/arm/nrf52/nrf52840-dongle/src/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 +# +# 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. +# +############################################################################ + +set(SRCS nrf52_boot.c nrf52_bringup.c) + +if(CONFIG_BOARDCTL) + list(APPEND SRCS nrf52_appinit.c) +endif() + +if(CONFIG_ARCH_LEDS) + list(APPEND SRCS nrf52_autoleds.c) +else() + list(APPEND SRCS nrf52_userleds.c) +endif() + +if(CONFIG_USBDEV) + list(APPEND SRCS nrf52_usb.c) +endif() + +if(CONFIG_USBDEV_COMPOSITE) + list(APPEND SRCS nrf52_composite.c) +endif() + +target_sources(board PRIVATE ${SRCS}) + +if(CONFIG_ARCH_BOARD_COMMON) + set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_COMMON_DIR}/scripts/flash_config.ld") +else() + set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash_config.ld") +endif() diff --git a/boards/arm/nrf52/thingy52/src/CMakeLists.txt b/boards/arm/nrf52/thingy52/src/CMakeLists.txt new file mode 100644 index 0000000000..acc49b5a39 --- /dev/null +++ b/boards/arm/nrf52/thingy52/src/CMakeLists.txt @@ -0,0 +1,41 @@ +############################################################################ +# boards/arm/nrf52/thingy52/src/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 +# +# 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. +# +############################################################################ + +set(SRCS nrf52_boot.c nrf52_bringup.c) + +if(CONFIG_BOARDCTL) + list(APPEND SRCS nrf52_appinit.c) +endif() + +if(CONFIG_ARCH_BUTTONS) + list(APPEND SRCS nrf52_buttons.c) +endif() + +if(CONFIG_IOEXPANDER_SX1509) + list(APPEND SRCS nrf52_sx1509.c) +endif() + +target_sources(board PRIVATE ${SRCS}) + +if(CONFIG_ARCH_BOARD_COMMON) + set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_COMMON_DIR}/scripts/flash_config.ld") +else() + set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash_config.ld") +endif()