You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2023/07/11 18:53:01 UTC

[nuttx] branch master updated (a3db142fbf -> 92040a2bdf)

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


    from a3db142fbf drivers/video: use kmm_free(buff) to free memory instead of realloc(buff, 0) which is abandoned
     new ca3d213402 cmake: sync arch/stm32/CMakeLists.txt with Make.defs
     new ab6fd2e6c8 cmake: add support for stm32f7
     new 6dcfe61b0e cmake: add support for stm32h7
     new 92040a2bdf cmake: convert some stm32 boards

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/arm/src/stm32/CMakeLists.txt                  |  52 ++++--
 arch/arm/src/{stm32 => stm32f7}/CMakeLists.txt     | 197 ++++++++-------------
 arch/arm/src/stm32h7/CMakeLists.txt                | 178 +++++++++++++++++++
 boards/arm/stm32/b-g431b-esc1/CMakeLists.txt       |  22 +++
 boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt   |  53 ++++++
 boards/arm/stm32/nucleo-f302r8/CMakeLists.txt      |  21 +++
 boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt  |  60 +++++++
 boards/arm/stm32/nucleo-f334r8/CMakeLists.txt      |  21 +++
 boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt  |  61 +++++++
 boards/arm/stm32/nucleo-f446re/CMakeLists.txt      |  21 +++
 boards/arm/stm32/nucleo-f446re/src/CMakeLists.txt  |  81 +++++++++
 boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c |   2 +-
 boards/arm/stm32f7/nucleo-144/CMakeLists.txt       |  21 +++
 boards/arm/stm32f7/nucleo-144/src/CMakeLists.txt   |  98 ++++++++++
 boards/arm/stm32f7/steval-eth001v1/CMakeLists.txt  |  21 +++
 .../arm/stm32f7/steval-eth001v1/src/CMakeLists.txt |  33 ++++
 boards/arm/stm32f7/stm32f746-ws/CMakeLists.txt     |  21 +++
 boards/arm/stm32f7/stm32f746-ws/src/CMakeLists.txt |  37 ++++
 boards/arm/stm32f7/stm32f746g-disco/CMakeLists.txt |  21 +++
 .../stm32f7/stm32f746g-disco/src/CMakeLists.txt    |  77 ++++++++
 boards/arm/stm32f7/stm32f769i-disco/CMakeLists.txt |  21 +++
 .../stm32f7/stm32f769i-disco/src/CMakeLists.txt    |  51 ++++++
 .../stm32f7/stm32f777zit6-meadow/CMakeLists.txt    |  21 +++
 .../stm32f777zit6-meadow/src/CMakeLists.txt        |  60 +++++++
 boards/arm/stm32h7/nucleo-h743zi/CMakeLists.txt    |  21 +++
 .../arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt   | 130 ++++++++++++++
 boards/arm/stm32h7/nucleo-h743zi2/CMakeLists.txt   |  21 +++
 .../arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt  |  67 +++++++
 boards/arm/stm32h7/stm32h747i-disco/CMakeLists.txt |  21 +++
 .../stm32h7/stm32h747i-disco/src/CMakeLists.txt    |  70 ++++++++
 30 files changed, 1447 insertions(+), 134 deletions(-)
 copy arch/arm/src/{stm32 => stm32f7}/CMakeLists.txt (51%)
 create mode 100644 arch/arm/src/stm32h7/CMakeLists.txt
 create mode 100644 boards/arm/stm32/b-g431b-esc1/CMakeLists.txt
 create mode 100644 boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt
 create mode 100644 boards/arm/stm32/nucleo-f302r8/CMakeLists.txt
 create mode 100644 boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt
 create mode 100644 boards/arm/stm32/nucleo-f334r8/CMakeLists.txt
 create mode 100644 boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt
 create mode 100644 boards/arm/stm32/nucleo-f446re/CMakeLists.txt
 create mode 100644 boards/arm/stm32/nucleo-f446re/src/CMakeLists.txt
 create mode 100644 boards/arm/stm32f7/nucleo-144/CMakeLists.txt
 create mode 100644 boards/arm/stm32f7/nucleo-144/src/CMakeLists.txt
 create mode 100644 boards/arm/stm32f7/steval-eth001v1/CMakeLists.txt
 create mode 100644 boards/arm/stm32f7/steval-eth001v1/src/CMakeLists.txt
 create mode 100644 boards/arm/stm32f7/stm32f746-ws/CMakeLists.txt
 create mode 100644 boards/arm/stm32f7/stm32f746-ws/src/CMakeLists.txt
 create mode 100644 boards/arm/stm32f7/stm32f746g-disco/CMakeLists.txt
 create mode 100644 boards/arm/stm32f7/stm32f746g-disco/src/CMakeLists.txt
 create mode 100644 boards/arm/stm32f7/stm32f769i-disco/CMakeLists.txt
 create mode 100644 boards/arm/stm32f7/stm32f769i-disco/src/CMakeLists.txt
 create mode 100644 boards/arm/stm32f7/stm32f777zit6-meadow/CMakeLists.txt
 create mode 100644 boards/arm/stm32f7/stm32f777zit6-meadow/src/CMakeLists.txt
 create mode 100644 boards/arm/stm32h7/nucleo-h743zi/CMakeLists.txt
 create mode 100644 boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt
 create mode 100644 boards/arm/stm32h7/nucleo-h743zi2/CMakeLists.txt
 create mode 100644 boards/arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt
 create mode 100644 boards/arm/stm32h7/stm32h747i-disco/CMakeLists.txt
 create mode 100644 boards/arm/stm32h7/stm32h747i-disco/src/CMakeLists.txt


[nuttx] 03/04: cmake: add support for stm32h7

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 6dcfe61b0e90510037010f33f34f68336951d741
Author: raiden00pl <ra...@railab.me>
AuthorDate: Tue Jul 11 11:24:38 2023 +0200

    cmake: add support for stm32h7
---
 arch/arm/src/stm32h7/CMakeLists.txt                | 178 +++++++++++++++++++++
 boards/arm/stm32h7/nucleo-h743zi/CMakeLists.txt    |  21 +++
 .../arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt   | 130 +++++++++++++++
 boards/arm/stm32h7/nucleo-h743zi2/CMakeLists.txt   |  21 +++
 .../arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt  |  67 ++++++++
 boards/arm/stm32h7/stm32h747i-disco/CMakeLists.txt |  21 +++
 .../stm32h7/stm32h747i-disco/src/CMakeLists.txt    |  70 ++++++++
 7 files changed, 508 insertions(+)

diff --git a/arch/arm/src/stm32h7/CMakeLists.txt b/arch/arm/src/stm32h7/CMakeLists.txt
new file mode 100644
index 0000000000..27ed366f2d
--- /dev/null
+++ b/arch/arm/src/stm32h7/CMakeLists.txt
@@ -0,0 +1,178 @@
+# ##############################################################################
+# arch/arm/src/stm32h7/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)
+
+list(
+  APPEND
+  SRCS
+  stm32_allocateheap.c
+  stm32_exti_gpio.c
+  stm32_gpio.c
+  stm32_irq.c
+  stm32_start.c
+  stm32_rcc.c
+  stm32_lowputc.c
+  stm32_serial.c
+  stm32_uid.c
+)
+
+if(CONFIG_STM32H7_PROGMEM)
+  list(APPEND SRCS stm32_flash.c)
+endif()
+
+if(CONFIG_SCHED_TICKLESS)
+  list(APPEND SRCS stm32_tickless.c)
+else()
+  list(APPEND SRCS stm32_timerisr.c)
+endif()
+
+if(CONFIG_STM32H7_ONESHOT)
+  list(APPEND SRCS stm32_oneshot.c stm32_oneshot_lowerhalf.c)
+endif()
+
+if(CONFIG_BUILD_PROTECTED)
+  list(APPEND SRCS stm32_userspace.c stm32_mpuinit.c)
+endif()
+
+if(CONFIG_ARMV7M_DTCM)
+  list(APPEND SRCS stm32_dtcm.c)
+endif()
+
+if(CONFIG_STM32H7_ADC)
+  list(APPEND SRCS stm32_adc.c)
+endif()
+
+if(CONFIG_STM32H7_FDCAN)
+  list(APPEND SRCS stm32_fdcan_sock.c)
+endif()
+
+if(CONFIG_STM32H7_BBSRAM)
+  list(APPEND SRCS stm32_bbsram.c)
+endif()
+
+if(CONFIG_STM32H7_DMA)
+  list(APPEND SRCS stm32_dma.c)
+endif()
+
+if(CONFIG_STM32H7_FMC)
+  list(APPEND SRCS stm32_fmc.c)
+endif()
+
+if(CONFIG_STM32H7_IWDG OR CONFIG_STM32H7_RTC_LSICLOCK)
+  list(APPEND SRCS stm32_lsi.c)
+endif()
+
+if(CONFIG_STM32H7_RTC_LSECLOCK)
+  list(APPEND SRCS stm32_lse.c)
+endif()
+
+if(CONFIG_STM32H7_I2C)
+  list(APPEND SRCS stm32_i2c.c)
+endif()
+
+if(CONFIG_STM32H7_PWR)
+  list(APPEND SRCS stm32_pwr.c)
+endif()
+
+if(CONFIG_STM32H7_QUADSPI)
+  list(APPEND SRCS stm32_qspi.c)
+endif()
+
+if(CONFIG_STM32H7_RTC)
+  list(APPEND SRCS stm32_rtc.c)
+  if(CONFIG_RTC_ALARM)
+    list(APPEND SRCS stm32_exti_alarm.c)
+  endif()
+  if(CONFIG_RTC_PERIODIC)
+    list(APPEND SRCS stm32_exti_wakeup.c)
+  endif()
+  if(CONFIG_RTC_DRIVER)
+    list(APPEND SRCS stm32_rtc_lowerhalf.c)
+  endif()
+endif()
+
+if(CONFIG_STM32H7_SPI)
+  list(APPEND SRCS stm32_spi.c)
+endif()
+
+if(CONFIG_SPI_SLAVE)
+  list(APPEND SRCS stm32_spi_slave.c)
+endif()
+
+if(CONFIG_STM32H7_SDMMC)
+  list(APPEND SRCS stm32_sdmmc.c)
+endif()
+
+if(CONFIG_TIMER)
+  list(APPEND SRCS stm32_tim_lowerhalf.c)
+endif()
+
+if(CONFIG_USBDEV)
+  list(APPEND SRCS stm32_otgdev.c)
+endif()
+
+if(CONFIG_USBHOST)
+  list(APPEND SRCS stm32_otghost.c)
+  if(CONFIG_USBHOST_TRACE)
+    list(APPEND SRCS stm32_usbhost.c)
+  else()
+    if(CONFIG_DEBUG_USB)
+      list(APPEND SRCS stm32_usbhost.c)
+    endif()
+  endif()
+endif()
+
+if(CONFIG_STM32H7_TIM)
+  list(APPEND SRCS stm32_tim.c)
+endif()
+
+if(CONFIG_STM32H7_LPTIM)
+  list(APPEND SRCS stm32_lptim.c)
+endif()
+
+if(CONFIG_STM32H7_PWM)
+  list(APPEND SRCS stm32_pwm.c)
+endif()
+
+if(CONFIG_STM32H7_ETHMAC)
+  list(APPEND SRCS stm32_ethernet.c)
+endif()
+
+if(CONFIG_SENSORS_QENCODER)
+  list(APPEND SRCS stm32_qencoder.c)
+endif()
+
+if(CONFIG_PM)
+  list(APPEND SRCS stm32_pmsleep.c stm32_pmstandby.c stm32_pmstop.c)
+  if(NOT CONFIG_ARCH_CUSTOM_PMINIT)
+    list(APPEND SRCS stm32_pminitialize.c)
+  endif()
+endif()
+
+if(CONFIG_STM32H7_IWDG)
+  list(APPEND SRCS stm32_iwdg.c)
+endif()
+
+if(CONFIG_STM32H7_WWDG)
+  list(APPEND SRCS stm32_wwdg.c)
+endif()
+
+target_sources(arch PRIVATE ${SRCS})
diff --git a/boards/arm/stm32h7/nucleo-h743zi/CMakeLists.txt b/boards/arm/stm32h7/nucleo-h743zi/CMakeLists.txt
new file mode 100644
index 0000000000..7ddad094bc
--- /dev/null
+++ b/boards/arm/stm32h7/nucleo-h743zi/CMakeLists.txt
@@ -0,0 +1,21 @@
+# ##############################################################################
+# boards/arm/stm32h7/nucleo-h743zi/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.
+#
+# ##############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt b/boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt
new file mode 100644
index 0000000000..4d704c8836
--- /dev/null
+++ b/boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt
@@ -0,0 +1,130 @@
+# ##############################################################################
+# boards/arm/stm32h7/nucleo-h743zi/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 stm32_boot.c stm32_bringup.c)
+
+if(CONFIG_ADC)
+  list(APPEND SRCS stm32_adc.c)
+endif()
+
+if(CONFIG_ARCH_LEDS)
+  list(APPEND SRCS stm32_autoleds.c)
+else()
+  list(APPEND SRCS stm32_userleds.c)
+endif()
+
+if(CONFIG_ARCH_BUTTONS)
+  list(APPEND SRCS stm32_buttons.c)
+endif()
+
+if(CONFIG_STM32_ROMFS)
+  list(APPEND SRCS stm32_romfs_initialize.c)
+endif()
+
+if(CONFIG_STM32H7_SPI)
+  list(APPEND SRCS stm32_spi.c)
+endif()
+
+if(CONFIG_STM32H7_OTGFS)
+  list(APPEND SRCS stm32_usb.c)
+endif()
+
+if(CONFIG_BOARDCTL_UNIQUEID)
+  list(APPEND SRCS stm32_uid.c)
+endif()
+
+if(CONFIG_SENSORS_LSM6DSL)
+  list(APPEND SRCS stm32_lsm6dsl.c)
+endif()
+
+if(CONFIG_SENSORS_LSM9DS1)
+  list(APPEND SRCS stm32_lsm9ds1.c)
+endif()
+
+if(CONFIG_SENSORS_LSM303AGR)
+  list(APPEND SRCS stm32_lsm303agr.c)
+endif()
+
+if(CONFIG_PCA9635PW)
+  list(APPEND SRCS stm32_pca9635.c)
+endif()
+
+if(CONFIG_LCD_SSD1306)
+  list(APPEND SRCS stm32_ssd1306.c)
+endif()
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinitialize.c)
+endif()
+
+if(CONFIG_STM32H7_PROGMEM)
+  list(APPEND SRCS stm32_progmem.c)
+endif()
+
+if(CONFIG_WL_NRF24L01)
+  list(APPEND SRCS stm32_nrf24l01.c)
+endif()
+
+if(CONFIG_DEV_GPIO)
+  list(APPEND SRCS stm32_gpio.c)
+endif()
+
+if(CONFIG_PWM)
+  list(APPEND SRCS stm32_pwm.c)
+endif()
+
+if(CONFIG_BOARDCTL_RESET)
+  list(APPEND SRCS stm32_reset.c)
+endif()
+
+if(CONFIG_BOARDCTL_BOOT_IMAGE)
+  list(APPEND SRCS stm32_boot_image.c)
+endif()
+
+if(CONFIG_USBMSC)
+  list(APPEND SRCS stm32_usbmsc.c)
+endif()
+
+if(CONFIG_USBDEV_COMPOSITE)
+  list(APPEND SRCS stm32_composite.c)
+endif()
+
+if(CONFIG_MMCSD)
+  list(APPEND SRCS stm32_mmcsd.c)
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+if(CONFIG_STM32_APP_FORMAT_MCUBOOT)
+  if(CONFIG_MCUBOOT_BOOTLOADER)
+    set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash-mcuboot-loader.ld")
+  else()
+    set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash-mcuboot-app.ld")
+  endif()
+else()
+  set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")
+endif()
+
+if(NOT CONFIG_BUILD_FLAT)
+  add_subdirectory(${NUTTX_BOARD_DIR}/kernel)
+  set_property(
+    GLOBAL PROPERTY LD_SCRIPT_USER ${NUTTX_BOARD_DIR}/scripts/memory.ld
+    ${NUTTX_BOARD_DIR}/scripts/user-space.ld)
+endif()
diff --git a/boards/arm/stm32h7/nucleo-h743zi2/CMakeLists.txt b/boards/arm/stm32h7/nucleo-h743zi2/CMakeLists.txt
new file mode 100644
index 0000000000..858773b733
--- /dev/null
+++ b/boards/arm/stm32h7/nucleo-h743zi2/CMakeLists.txt
@@ -0,0 +1,21 @@
+# ##############################################################################
+# boards/arm/stm32h7/nucleo-h743zi2/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.
+#
+# ##############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt b/boards/arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt
new file mode 100644
index 0000000000..34e3e29b16
--- /dev/null
+++ b/boards/arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt
@@ -0,0 +1,67 @@
+# ##############################################################################
+# boards/arm/stm32h7/nucleo-h743zi2/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 stm32_boot.c stm32_bringup.c)
+
+if(CONFIG_ADC)
+  list(APPEND SRCS stm32_adc.c)
+endif()
+
+if(CONFIG_ARCH_LEDS)
+  list(APPEND SRCS stm32_autoleds.c)
+else()
+  list(APPEND SRCS stm32_userleds.c)
+endif()
+
+if(CONFIG_STM32H7_OTGFS)
+  list(APPEND SRCS stm32_usb.c)
+endif()
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinitialize.c)
+endif()
+
+if(CONFIG_DEV_GPIO)
+  list(APPEND SRCS stm32_gpio.c)
+endif()
+
+if(CONFIG_PWM)
+  list(APPEND SRCS stm32_pwm.c)
+endif()
+
+if(CONFIG_SENSORS_QENCODER)
+  list(APPEND SRCS stm32_qencoder.c)
+endif()
+
+if(CONFIG_BOARDCTL_RESET)
+  list(APPEND SRCS stm32_reset.c)
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")
+
+if(NOT CONFIG_BUILD_FLAT)
+  add_subdirectory(${NUTTX_BOARD_DIR}/kernel)
+  set_property(
+    GLOBAL PROPERTY LD_SCRIPT_USER ${NUTTX_BOARD_DIR}/scripts/memory.ld
+    ${NUTTX_BOARD_DIR}/scripts/user-space.ld)
+endif()
+
diff --git a/boards/arm/stm32h7/stm32h747i-disco/CMakeLists.txt b/boards/arm/stm32h7/stm32h747i-disco/CMakeLists.txt
new file mode 100644
index 0000000000..5798035294
--- /dev/null
+++ b/boards/arm/stm32h7/stm32h747i-disco/CMakeLists.txt
@@ -0,0 +1,21 @@
+# ##############################################################################
+# boards/arm/stm32h7/stm32h747i-disco/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.
+#
+# ##############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32h7/stm32h747i-disco/src/CMakeLists.txt b/boards/arm/stm32h7/stm32h747i-disco/src/CMakeLists.txt
new file mode 100644
index 0000000000..2bf988cc9d
--- /dev/null
+++ b/boards/arm/stm32h7/stm32h747i-disco/src/CMakeLists.txt
@@ -0,0 +1,70 @@
+# ##############################################################################
+# boards/arm/stm32h7/stm32h747i-disco/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 stm32_boot.c stm32_bringup.c)
+
+if(CONFIG_ADC)
+  list(APPEND SRCS stm32_adc.c)
+endif()
+
+if(CONFIG_ARCH_LEDS)
+  list(APPEND SRCS stm32_autoleds.c)
+else()
+  list(APPEND SRCS stm32_userleds.c)
+endif()
+
+if(CONFIG_ARCH_BUTTONS)
+  list(APPEND SRCS stm32_buttons.c)
+endif()
+
+if(CONFIG_STM32H7_SPI)
+  list(APPEND SRCS stm32_spi.c)
+endif()
+
+if(CONFIG_STM32H7_OTGHS)
+  list(APPEND SRCS stm32_usb.c)
+endif()
+
+if(CONFIG_BOARDCTL_UNIQUEID)
+  list(APPEND SRCS stm32_uid.c)
+endif()
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinitialize.c)
+endif()
+
+if(CONFIG_STM32H7_SDMMC)
+  list(APPEND SRCS stm32_sdmmc.c)
+endif()
+
+if(CONFIG_FAT_DMAMEMORY)
+  list(APPEND SRCS stm32_dma_alloc.c)
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")
+
+if(NOT CONFIG_BUILD_FLAT)
+  add_subdirectory(${NUTTX_BOARD_DIR}/kernel)
+  set_property(
+    GLOBAL PROPERTY LD_SCRIPT_USER ${NUTTX_BOARD_DIR}/scripts/memory.ld
+    ${NUTTX_BOARD_DIR}/scripts/user-space.ld)
+endif()


[nuttx] 02/04: cmake: add support for stm32f7

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit ab6fd2e6c8f53e415c060ae27fd8278a2c5952b1
Author: raiden00pl <ra...@railab.me>
AuthorDate: Tue Jul 11 11:24:25 2023 +0200

    cmake: add support for stm32f7
---
 arch/arm/src/stm32f7/CMakeLists.txt                | 184 +++++++++++++++++++++
 boards/arm/stm32f7/nucleo-144/CMakeLists.txt       |  21 +++
 boards/arm/stm32f7/nucleo-144/src/CMakeLists.txt   |  98 +++++++++++
 boards/arm/stm32f7/steval-eth001v1/CMakeLists.txt  |  21 +++
 .../arm/stm32f7/steval-eth001v1/src/CMakeLists.txt |  33 ++++
 boards/arm/stm32f7/stm32f746-ws/CMakeLists.txt     |  21 +++
 boards/arm/stm32f7/stm32f746-ws/src/CMakeLists.txt |  37 +++++
 boards/arm/stm32f7/stm32f746g-disco/CMakeLists.txt |  21 +++
 .../stm32f7/stm32f746g-disco/src/CMakeLists.txt    |  77 +++++++++
 boards/arm/stm32f7/stm32f769i-disco/CMakeLists.txt |  21 +++
 .../stm32f7/stm32f769i-disco/src/CMakeLists.txt    |  51 ++++++
 .../stm32f7/stm32f777zit6-meadow/CMakeLists.txt    |  21 +++
 .../stm32f777zit6-meadow/src/CMakeLists.txt        |  60 +++++++
 13 files changed, 666 insertions(+)

diff --git a/arch/arm/src/stm32f7/CMakeLists.txt b/arch/arm/src/stm32f7/CMakeLists.txt
new file mode 100644
index 0000000000..a0b7e4262f
--- /dev/null
+++ b/arch/arm/src/stm32f7/CMakeLists.txt
@@ -0,0 +1,184 @@
+# ##############################################################################
+# arch/arm/src/stm32f7/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)
+
+list(
+  APPEND
+  SRCS
+  stm32_allocateheap.c
+  stm32_exti_gpio.c
+  stm32_gpio.c
+  stm32_irq.c
+  stm32_lowputc.c
+  stm32_rcc.c
+  stm32_serial.c
+  stm32_start.c
+  stm32_capture.c
+  stm32_uid.c
+  stm32_waste.c
+)
+
+if(CONFIG_STM32F7_TICKLESS_TIMER)
+  list(APPEND SRCS stm32_tickless.c)
+else()
+  list(APPEND SRCS stm32_timerisr.c)
+endif()
+
+if(CONFIG_STM32F7_PROGMEM)
+  list(APPEND SRCS stm32_flash.c)
+endif()
+
+if(CONFIG_BUILD_PROTECTED)
+  list(APPEND SRCS stm32_userspace.c stm32_mpuinit.c)
+endif()
+
+if(CONFIG_ARMV7M_DTCM)
+  list(APPEND SRCS stm32_dtcm.c)
+endif()
+
+if(CONFIG_STM32F7_DMA)
+  list(APPEND SRCS stm32_dma.c)
+endif()
+
+if(CONFIG_PM)
+  list(APPEND SRCS stm32_pmstandby.c stm32_pmstop.c stm32_pmsleep.c)
+  if(NOT CONFIG_ARCH_CUSTOM_PMINIT)
+    list(APPEND SRCS stm32_pminitialize.c)
+  endif()
+endif()
+
+if(CONFIG_STM32F7_PWR)
+  list(APPEND SRCS stm32_pwr.c stm32_exti_pwr.c)
+endif()
+
+if(CONFIG_STM32F7_RTC)
+  list(APPEND SRCS stm32_rtc.c)
+  if(CONFIG_RTC_ALARM)
+    list(APPEND SRCS stm32_exti_alarm.c)
+  endif()
+  if(CONFIG_RTC_PERIODIC)
+    list(APPEND SRCS stm32_exti_wakeup.c)
+  endif()
+  if(CONFIG_RTC_DRIVER)
+    list(APPEND SRCS stm32_rtc_lowerhalf.c)
+  endif()
+endif()
+
+if(CONFIG_STM32F7_IWDG OR CONFIG_STM32F7_RTC_LSICLOCK)
+  list(APPEND SRCS stm32_lsi.c)
+endif()
+
+if(CONFIG_STM32F7_RTC_LSECLOCK)
+  list(APPEND SRCS stm32_lse.c)
+endif()
+
+if(CONFIG_STM32F7_I2C)
+  list(APPEND SRCS stm32_i2c.c)
+endif()
+
+if(CONFIG_STM32F7_SPI)
+  list(APPEND SRCS stm32_spi.c)
+endif()
+
+if(CONFIG_STM32F7_SDMMC)
+  list(APPEND SRCS stm32_sdmmc.c)
+endif()
+
+if(CONFIG_USBDEV)
+  list(APPEND SRCS stm32_otgdev.c)
+endif()
+
+if(CONFIG_USBHOST)
+  list(APPEND SRCS stm32_otghost.c)
+  if(CONFIG_USBHOST_TRACE)
+    list(APPEND SRCS stm32_usbhost.c)
+    elseif(CONFIG_DEBUG_USB)
+      list(APPEND SRCS stm32_usbhost.c)
+    endif()
+endif()
+
+if(CONFIG_STM32F7_TIM)
+  list(APPEND SRCS stm32_tim.c stm32_tim_lowerhalf.c)
+endif()
+
+if(CONFIG_STM32F7_ADC)
+  list(APPEND SRCS stm32_adc.c)
+endif()
+
+if(CONFIG_STM32F7_QUADSPI)
+  list(APPEND SRCS stm32_qspi.c)
+endif()
+
+if(CONFIG_STM32F7_RTC)
+  if(CONFIG_RTC_ALARM)
+    list(APPEND SRCS stm32_exti_alarm.c)
+  endif()
+endif()
+
+if(CONFIG_STM32F7_ETHMAC)
+  list(APPEND SRCS stm32_ethernet.c)
+endif()
+
+if(CONFIG_DEBUG_FEATURES)
+  list(APPEND SRCS stm32_dumpgpio.c)
+endif()
+
+if(CONFIG_STM32F7_BBSRAM)
+  list(APPEND SRCS stm32_bbsram.c)
+endif()
+
+if(CONFIG_STM32F7_RNG)
+  list(APPEND SRCS stm32_rng.c)
+endif()
+
+if(CONFIG_STM32F7_LTDC)
+  list(APPEND SRCS stm32_ltdc.c)
+endif()
+
+if(CONFIG_STM32F7_DMA2D)
+  list(APPEND SRCS stm32_dma2d.c)
+endif()
+
+if(CONFIG_SENSORS_QENCODER)
+  list(APPEND SRCS stm32_qencoder.c)
+endif()
+
+if(CONFIG_STM32F7_CAN_CHARDRIVER)
+  list(APPEND SRCS stm32_can.c)
+endif()
+
+if(CONFIG_STM32F7_CAN_SOCKET)
+  list(APPEND SRCS stm32_can_sock.c)
+endif()
+
+if(CONFIG_STM32F7_SAI)
+  list(APPEND SRCS stm32_sai.c)
+endif()
+
+if(CONFIG_STM32F7_PWM)
+  list(APPEND SRCS stm32_pwm.c)
+endif()
+
+if(CONFIG_STM32F7_FOC)
+  list(APPEND SRCS stm32_foc.c)
+endif()
+
+target_sources(arch PRIVATE ${SRCS})
diff --git a/boards/arm/stm32f7/nucleo-144/CMakeLists.txt b/boards/arm/stm32f7/nucleo-144/CMakeLists.txt
new file mode 100644
index 0000000000..aa930b44c8
--- /dev/null
+++ b/boards/arm/stm32f7/nucleo-144/CMakeLists.txt
@@ -0,0 +1,21 @@
+# ##############################################################################
+# boards/arm/stm32f7/nucleo-144/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.
+#
+# ##############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32f7/nucleo-144/src/CMakeLists.txt b/boards/arm/stm32f7/nucleo-144/src/CMakeLists.txt
new file mode 100644
index 0000000000..37563332bd
--- /dev/null
+++ b/boards/arm/stm32f7/nucleo-144/src/CMakeLists.txt
@@ -0,0 +1,98 @@
+# ##############################################################################
+# boards/arm/stm32f7/nucleo-144/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 stm32_boot.c stm32_bringup.c)
+
+if(CONFIG_ARCH_LEDS)
+  list(APPEND SRCS stm32_autoleds.c)
+else()
+  list(APPEND SRCS stm32_userleds.c)
+endif()
+
+if(CONFIG_ARCH_BUTTONS)
+  list(APPEND SRCS stm32_buttons.c)
+endif()
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinitialize.c)
+endif()
+
+if(CONFIG_DEV_GPIO)
+  list(APPEND SRCS stm32_gpio.c)
+endif()
+
+if(CONFIG_SPI)
+  list(APPEND SRCS stm32_spi.c)
+endif()
+
+if(CONFIG_ADC)
+  list(APPEND SRCS stm32_adc.c)
+endif()
+
+if(CONFIG_PWM)
+  list(APPEND SRCS stm32_pwm.c)
+endif()
+
+if(CONFIG_MMCSD)
+  list(APPEND SRCS stm32_sdio.c)
+endif()
+
+if(CONFIG_STM32F7_OTGFS)
+  list(APPEND SRCS stm32_usb.c)
+endif()
+
+if(CONFIG_STM32F7_BBSRAM)
+  list(APPEND SRCS stm32_bbsram.c)
+endif()
+
+if(CONFIG_BOARDCTL_RESET)
+  list(APPEND SRCS stm32_reset.c)
+endif()
+
+if(CONFIG_STM32_ROMFS)
+  list(APPEND SRCS stm32_romfs_initialize.c)
+endif()
+
+if(CONFIG_SENSORS_QENCODER)
+  list(APPEND SRCS stm32_qencoder.c)
+endif()
+
+if(CONFIG_STM32F7_CAN)
+  if(CONFIG_STM32F7_CAN_CHARDRIVER)
+    list(APPEND SRCS stm32_can.c)
+  endif()
+  if(CONFIG_STM32F7_CAN_SOCKET)
+    list(APPEND SRCS stm32_cansock.c)
+  endif()
+endif()
+
+if(CONFIG_USBDEV_COMPOSITE)
+  list(APPEND SRCS stm32_composite.c)
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+if(CONFIG_ARCH_CHIP_STM32F722ZE)
+  set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/f722-flash.ld")
+elseif(CONFIG_ARCH_CHIP_STM32F746ZG)
+  set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/f746-flash.ld")
+elseif(CONFIG_ARCH_CHIP_STM32F767ZI)
+  set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/f767-flash.ld")
+endif()
diff --git a/boards/arm/stm32f7/steval-eth001v1/CMakeLists.txt b/boards/arm/stm32f7/steval-eth001v1/CMakeLists.txt
new file mode 100644
index 0000000000..03ef3d06ba
--- /dev/null
+++ b/boards/arm/stm32f7/steval-eth001v1/CMakeLists.txt
@@ -0,0 +1,21 @@
+# ##############################################################################
+# boards/arm/stm32f7/steval-eth001v1/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.
+#
+# ##############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32f7/steval-eth001v1/src/CMakeLists.txt b/boards/arm/stm32f7/steval-eth001v1/src/CMakeLists.txt
new file mode 100644
index 0000000000..32c92940d8
--- /dev/null
+++ b/boards/arm/stm32f7/steval-eth001v1/src/CMakeLists.txt
@@ -0,0 +1,33 @@
+############################################################################
+# boards/arm/stm32f7/steval-eth001v1/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 stm32_boot.c stm32_bringup.c)
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinit.c)
+endif()
+
+if(CONFIG_STM32F7_FOC)
+  list(APPEND SRCS stm32_foc.c)
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")
diff --git a/boards/arm/stm32f7/stm32f746-ws/CMakeLists.txt b/boards/arm/stm32f7/stm32f746-ws/CMakeLists.txt
new file mode 100644
index 0000000000..196c729eff
--- /dev/null
+++ b/boards/arm/stm32f7/stm32f746-ws/CMakeLists.txt
@@ -0,0 +1,21 @@
+############################################################################
+# boards/arm/stm32f7/stm32f746-ws/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.
+#
+############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32f7/stm32f746-ws/src/CMakeLists.txt b/boards/arm/stm32f7/stm32f746-ws/src/CMakeLists.txt
new file mode 100644
index 0000000000..11a26dbe97
--- /dev/null
+++ b/boards/arm/stm32f7/stm32f746-ws/src/CMakeLists.txt
@@ -0,0 +1,37 @@
+############################################################################
+# boards/arm/stm32f7/stm32f746-ws/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 stm32_boot.c stm32_spi.c stm32_dma_alloc.c)
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinitialize.c)
+endif()
+
+if(CONFIG_STM32F7_OTGFS)
+  list(APPEND SRCS stm32_usb.c)
+endif()
+
+if(CONFIG_STM32F7_SDMMC1)
+  list(APPEND SRCS stm32_sdmmc.c)
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")
diff --git a/boards/arm/stm32f7/stm32f746g-disco/CMakeLists.txt b/boards/arm/stm32f7/stm32f746g-disco/CMakeLists.txt
new file mode 100644
index 0000000000..ccb967cadd
--- /dev/null
+++ b/boards/arm/stm32f7/stm32f746g-disco/CMakeLists.txt
@@ -0,0 +1,21 @@
+# ##############################################################################
+# boards/arm/stm32f7/stm32f746-disco/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.
+#
+# ##############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32f7/stm32f746g-disco/src/CMakeLists.txt b/boards/arm/stm32f7/stm32f746g-disco/src/CMakeLists.txt
new file mode 100644
index 0000000000..e9c06610be
--- /dev/null
+++ b/boards/arm/stm32f7/stm32f746g-disco/src/CMakeLists.txt
@@ -0,0 +1,77 @@
+# ##############################################################################
+# boards/arm/stm32f7/stm32f746-disco/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 stm32_boot.c stm32_spi.c stm32_bringup.c)
+
+if(CONFIG_ARCH_LEDS)
+  list(APPEND SRCS stm32_autoleds.c)
+else()
+  list(APPEND SRCS stm32_userleds.c)
+endif()
+
+if(CONFIG_ARCH_BUTTONS)
+  list(APPEND SRCS  stm32_buttons.c)
+endif()
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinitialize.c)
+endif()
+
+if(CONFIG_ADC)
+  list(APPEND SRCS stm32_adc.c)
+endif()
+
+if(CONFIG_SPORADIC_INSTRUMENTATION)
+  list(APPEND SRCS stm32_sporadic.c)
+endif()
+
+if(CONFIG_STM32F7_LTDC)
+  list(APPEND SRCS stm32_lcd.c)
+endif()
+
+if(CONFIG_STM32F7_FMC)
+  list(APPEND SRCS stm32_extmem.c)
+endif()
+
+if(CONFIG_INPUT_FT5X06)
+  list(APPEND SRCS stm32_touchscreen.c)
+endif()
+
+if(CONFIG_MTD_N25QXXX)
+  list(APPEND SRCS stm32_n25q.c)
+endif()
+
+if(CONFIG_STM32F7_OTGFS)
+  list(APPEND SRCS stm32_usb.c)
+elseif(CONFIG_STM32F7_OTGFSHS)
+  list(APPEND SRCS stm32_usb.c)
+endif()
+
+if(CONFIG_STM32F7_SDMMC)
+  list(APPEND SRCS stm32_sdmmc.c)
+endif()
+
+if(CONFIG_AUDIO_WM8994)
+  list(APPEND SRCS stm32_wm8994.c)
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")
diff --git a/boards/arm/stm32f7/stm32f769i-disco/CMakeLists.txt b/boards/arm/stm32f7/stm32f769i-disco/CMakeLists.txt
new file mode 100644
index 0000000000..b3676c8b9b
--- /dev/null
+++ b/boards/arm/stm32f7/stm32f769i-disco/CMakeLists.txt
@@ -0,0 +1,21 @@
+# ##############################################################################
+# boards/arm/stm32f7/stm32f769i-disco/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.
+#
+# ##############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32f7/stm32f769i-disco/src/CMakeLists.txt b/boards/arm/stm32f7/stm32f769i-disco/src/CMakeLists.txt
new file mode 100644
index 0000000000..0bfb1cc943
--- /dev/null
+++ b/boards/arm/stm32f7/stm32f769i-disco/src/CMakeLists.txt
@@ -0,0 +1,51 @@
+# ##############################################################################
+# boards/arm/stm32f7/stm32f769i-disco/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 stm32_boot.c stm32_bringup.c stm32_spi.c)
+
+if(CONFIG_ARCH_LEDS)
+  list(APPEND SRCS stm32_autoleds.c)
+else()
+  list(APPEND SRCS stm32_userleds.c)
+endif()
+
+if(CONFIG_ARCH_BUTTONS)
+  list(APPEND SRCS stm32_buttons.c)
+endif()
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinitialize.c)
+endif()
+
+if(CONFIG_PWM)
+  list(APPEND SRCS stm32_pwm.c)
+endif()
+
+if(CONFIG_SPORADIC_INSTRUMENTATION)
+  list(APPEND SRCS stm32_sporadic.c)
+endif()
+
+if(CONFIG_STM32F7_FMC)
+  list(APPEND SRCS stm32_extmem.c)
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")
diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/CMakeLists.txt b/boards/arm/stm32f7/stm32f777zit6-meadow/CMakeLists.txt
new file mode 100644
index 0000000000..0369a5aa12
--- /dev/null
+++ b/boards/arm/stm32f7/stm32f777zit6-meadow/CMakeLists.txt
@@ -0,0 +1,21 @@
+############################################################################
+# boards/arm/stm32f7/stm32f77zit6-meadow/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.
+#
+############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/src/CMakeLists.txt b/boards/arm/stm32f7/stm32f777zit6-meadow/src/CMakeLists.txt
new file mode 100644
index 0000000000..bd5211461d
--- /dev/null
+++ b/boards/arm/stm32f7/stm32f777zit6-meadow/src/CMakeLists.txt
@@ -0,0 +1,60 @@
+############################################################################
+# boards/arm/stm32f7/stm32f77zit6-meadow/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 stm32_boot.c stm32_bringup.c stm32_spi.c)
+
+if(CONFIG_ARCH_LEDS)
+  list(APPEND SRCS stm32_autoleds.c)
+else()
+  list(APPEND SRCS stm32_userleds.c)
+endif()
+
+if(CONFIG_ARCH_BUTTONS)
+  list(APPEND SRCS  stm32_buttons.c)
+endif()
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinitialize.c)
+  if(CONFIG_BOARDCTL_IOCTL)
+    list(APPEND SRCS stm32_ioctl.c)
+  endif()
+endif()
+
+if(CONFIG_PWM)
+  list(APPEND SRCS stm32_pwm.c)
+endif()
+
+if(CONFIG_SPORADIC_INSTRUMENTATION)
+  list(APPEND SRCS stm32_sporadic.c)
+endif()
+
+if(CONFIG_STM32F7_FMC)
+  list(APPEND SRCS stm32_extmem.c)
+endif()
+
+if(CONFIG_STM32F7_OTGFS)
+  list(APPEND SRCS stm32_usb.c)
+elseif(CONFIG_STM32F7_OTGFSHS)
+  list(APPEND SRCS stm32_usb.c)
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")


[nuttx] 04/04: cmake: convert some stm32 boards

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 92040a2bdffbdd44d7988f2ce1597cc864190891
Author: raiden00pl <ra...@railab.me>
AuthorDate: Tue Jul 11 13:00:00 2023 +0200

    cmake: convert some stm32 boards
---
 boards/arm/stm32/b-g431b-esc1/CMakeLists.txt       | 22 ++++++
 boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt   | 53 ++++++++++++++
 boards/arm/stm32/nucleo-f302r8/CMakeLists.txt      | 21 ++++++
 boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt  | 60 ++++++++++++++++
 boards/arm/stm32/nucleo-f334r8/CMakeLists.txt      | 21 ++++++
 boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt  | 61 ++++++++++++++++
 boards/arm/stm32/nucleo-f446re/CMakeLists.txt      | 21 ++++++
 boards/arm/stm32/nucleo-f446re/src/CMakeLists.txt  | 81 ++++++++++++++++++++++
 boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c |  2 +-
 9 files changed, 341 insertions(+), 1 deletion(-)

diff --git a/boards/arm/stm32/b-g431b-esc1/CMakeLists.txt b/boards/arm/stm32/b-g431b-esc1/CMakeLists.txt
new file mode 100644
index 0000000000..4c46970317
--- /dev/null
+++ b/boards/arm/stm32/b-g431b-esc1/CMakeLists.txt
@@ -0,0 +1,22 @@
+
+# ##############################################################################
+# boards/arm/stm32/b-g431b-esc1/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.
+#
+# ##############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt b/boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt
new file mode 100644
index 0000000000..c32aeba6db
--- /dev/null
+++ b/boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt
@@ -0,0 +1,53 @@
+############################################################################
+# boards/arm/stm32/b-g431b-esc1/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 stm32_boot.c stm32_bringup.c)
+
+if(CONFIG_ARCH_LEDS)
+  list(APPEND SRCS stm32_autoleds.c)
+else()
+  list(APPEND SRCS stm32_userleds.c)
+endif()
+
+if(CONFIG_ARCH_BUTTONS)
+  list(APPEND SRCS stm32_buttons.c)
+endif()
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinit.c)
+endif()
+
+if(CONFIG_STM32_FOC)
+  list(APPEND SRCS stm32_foc.c)
+endif()
+
+if(CONFIG_STM32_FDCAN)
+if(CONFIG_STM32_FDCAN_CHARDRIVER)
+  list(APPEND SRCS stm32_can.c)
+endif()
+if(CONFIG_STM32_FDCAN_SOCKET)
+  list(APPEND SRCS stm32_cansock.c)
+endif()
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
diff --git a/boards/arm/stm32/nucleo-f302r8/CMakeLists.txt b/boards/arm/stm32/nucleo-f302r8/CMakeLists.txt
new file mode 100644
index 0000000000..fd1ebdfa26
--- /dev/null
+++ b/boards/arm/stm32/nucleo-f302r8/CMakeLists.txt
@@ -0,0 +1,21 @@
+# ##############################################################################
+# boards/arm/stm32/nucleo-f302r8/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.
+#
+# ##############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt
new file mode 100644
index 0000000000..112a99b27c
--- /dev/null
+++ b/boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt
@@ -0,0 +1,60 @@
+############################################################################
+# boards/arm/stm32/nucleo-f302r8/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 stm32_boot.c stm32_bringup.c)
+
+if(CONFIG_ARCH_LEDS)
+  list(APPEND SRCS stm32_autoleds.c)
+else()
+  list(APPEND SRCS stm32_userleds.c)
+endif()
+
+if(CONFIG_ARCH_BUTTONS)
+  list(APPEND SRCS stm32_buttons.c)
+endif()
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinit.c)
+endif()
+
+if(CONFIG_PWM)
+  list(APPEND SRCS stm32_pwm.c)
+endif()
+
+if(CONFIG_NUCLEOF302R8_HIGHPRI)
+  list(APPEND SRCS stm32_highpri.c)
+endif()
+
+if(CONFIG_BOARD_STM32_IHM07M1)
+  list(APPEND SRCS stm32_foc_ihm07m1.c)
+endif()
+
+if(CONFIG_STM32_CAN)
+  if(CONFIG_STM32_CAN_CHARDRIVER)
+    list(APPEND SRCS stm32_can.c)
+  endif()
+  if(CONFIG_STM32_CAN_SOCKET)
+    list(APPEND SRCS stm32_cansock.c)
+  endif()
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
diff --git a/boards/arm/stm32/nucleo-f334r8/CMakeLists.txt b/boards/arm/stm32/nucleo-f334r8/CMakeLists.txt
new file mode 100644
index 0000000000..ae72b30a05
--- /dev/null
+++ b/boards/arm/stm32/nucleo-f334r8/CMakeLists.txt
@@ -0,0 +1,21 @@
+# ##############################################################################
+# boards/arm/stm32/nucleo-f334r8/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.
+#
+# ##############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt
new file mode 100644
index 0000000000..13c113170c
--- /dev/null
+++ b/boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt
@@ -0,0 +1,61 @@
+############################################################################
+# boards/arm/stm32/nucleo-f334r8/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 stm32_boot.c)
+
+if(CONFIG_ARCH_LEDS)
+  list(APPEND SRCS stm32_autoleds.c)
+endif()
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinit.c)
+endif()
+
+if(CONFIG_ADC)
+  list(APPEND SRCS stm32_adc.c)
+endif()
+
+if(CONFIG_DAC)
+  list(APPEND SRCS stm32_dac.c)
+endif()
+
+if(CONFIG_STM32_HRTIM)
+  list(APPEND SRCS stm32_hrtim.c)
+endif()
+
+if(CONFIG_COMP)
+  list(APPEND SRCS stm32_comp.c)
+endif()
+
+if(CONFIG_OPAMP)
+  list(APPEND SRCS stm32_opamp.c)
+endif()
+
+if(CONFIG_NUCLEOF334R8_HIGHPRI)
+  list(APPEND SRCS stm32_highpri.c)
+endif()
+
+if(CONFIG_NUCLEOF334R8_SPWM)
+  list(APPEND SRCS stm32_spwm.c)
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script")
diff --git a/boards/arm/stm32/nucleo-f446re/CMakeLists.txt b/boards/arm/stm32/nucleo-f446re/CMakeLists.txt
new file mode 100644
index 0000000000..035696fc2d
--- /dev/null
+++ b/boards/arm/stm32/nucleo-f446re/CMakeLists.txt
@@ -0,0 +1,21 @@
+# ##############################################################################
+# boards/arm/stm32/nucleo-f446re/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.
+#
+# ##############################################################################
+
+add_subdirectory(src)
diff --git a/boards/arm/stm32/nucleo-f446re/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f446re/src/CMakeLists.txt
new file mode 100644
index 0000000000..0a51d7ec52
--- /dev/null
+++ b/boards/arm/stm32/nucleo-f446re/src/CMakeLists.txt
@@ -0,0 +1,81 @@
+############################################################################
+# boards/arm/stm32/nucleo-f446re/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 stm32_boot.c stm32_bringup.c stm32_spi.c)
+
+if(CONFIG_ARCH_LEDS)
+  list(APPEND SRCS stm32_autoleds.c)
+else()
+  list(APPEND SRCS stm32_userleds.c)
+endif()
+
+if(CONFIG_ARCH_BUTTONS)
+  list(APPEND SRCS stm32_buttons.c)
+endif()
+
+if(CONFIG_LCD_ILI9225)
+  list(APPEND SRCS stm32_ili9225.c)
+endif()
+
+if(NOT CONFIG_STM32_FOC)
+  if(CONFIG_ADC)
+    list(APPEND SRCS stm32_adc.c)
+    if(CONFIG_INPUT_AJOYSTICK)
+      list(APPEND SRCS stm32_ajoystick.c)
+    endif()
+  endif()
+endif()
+
+if(CONFIG_STM32_CAN)
+  if(CONFIG_STM32_CAN_CHARDRIVER)
+    list(APPEND SRCS stm32_can.c)
+  endif()
+  if(CONFIG_STM32_CAN_SOCKET)
+    list(APPEND SRCS stm32_cansock.c)
+  endif()
+endif()
+
+if(CONFIG_STM32_PWM)
+  list(APPEND SRCS stm32_pwm.c)
+endif()
+
+if(CONFIG_DEV_GPIO)
+  list(APPEND SRCS stm32_gpio.c)
+endif()
+
+if(CONFIG_DAC)
+  list(APPEND SRCS stm32_dac.c)
+endif()
+
+if(CONFIG_BOARDCTL)
+  list(APPEND SRCS stm32_appinit.c)
+endif()
+
+if(CONFIG_BOARD_STM32_IHM08M1)
+  list(APPEND SRCS stm32_foc_ihm08m1.c)
+endif()
+
+if(CONFIG_STM32_ROMFS)
+  list(APPEND SRCS stm32_romfs_initialize.c)
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/f446re.ld")
diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c b/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c
index a576b72995..ecf39eda0f 100644
--- a/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c
+++ b/boards/arm/stm32/nucleo-f446re/src/stm32_bringup.c
@@ -35,7 +35,6 @@
 #include <nuttx/mmcsd.h>
 
 #include <stm32.h>
-#include <stm32_romfs.h>
 
 #include <arch/board/board.h>
 
@@ -55,6 +54,7 @@
 #  include <nuttx/video/fb.h>
 #endif
 
+#include "stm32_romfs.h"
 #include "nucleo-f446re.h"
 
 /****************************************************************************


[nuttx] 01/04: cmake: sync arch/stm32/CMakeLists.txt with Make.defs

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit ca3d213402fb9f5282a3328c8c37e6531f866f13
Author: raiden00pl <ra...@railab.me>
AuthorDate: Tue Jul 11 11:24:00 2023 +0200

    cmake: sync arch/stm32/CMakeLists.txt with Make.defs
---
 arch/arm/src/stm32/CMakeLists.txt | 52 +++++++++++++++++++++++++++++++--------
 1 file changed, 42 insertions(+), 10 deletions(-)

diff --git a/arch/arm/src/stm32/CMakeLists.txt b/arch/arm/src/stm32/CMakeLists.txt
index e8df2ef253..df8e06d002 100644
--- a/arch/arm/src/stm32/CMakeLists.txt
+++ b/arch/arm/src/stm32/CMakeLists.txt
@@ -32,7 +32,6 @@ list(
   stm32_exti_gpio.c
   stm32_flash.c
   stm32_irq.c
-  stm32_dma.c
   stm32_lowputc.c
   stm32_serial.c
   stm32_spi.c
@@ -45,6 +44,10 @@ list(
   stm32_capture.c
   stm32_dfumode.c)
 
+if(CONFIG_STM32_DMA)
+  list(APPEND SRCS stm32_dma.c)
+endif()
+
 if(CONFIG_TIMER)
   list(APPEND SRCS stm32_tim_lowerhalf.c)
 endif()
@@ -67,10 +70,6 @@ if(CONFIG_BUILD_PROTECTED)
   list(APPEND SRCS stm32_userspace.c stm32_mpuinit.c)
 endif()
 
-if(CONFIG_STM32_CCM_PROCFS)
-  list(APPEND SRCS stm32_procfs_ccm.c)
-endif()
-
 if(CONFIG_STM32_HAVE_IP_I2C_V1)
   if(CONFIG_STM32_I2C_ALT)
     list(APPEND SRCS stm32_i2c_alt.c)
@@ -87,6 +86,9 @@ if(CONFIG_USBDEV)
   if(CONFIG_STM32_USB)
     list(APPEND SRCS stm32_usbdev.c)
   endif()
+  if(CONFIG_STM32_USBFS)
+    list(APPEND SRCS stm32_usbfs.c)
+  endif()
   if(CONFIG_STM32_OTGFS)
     list(APPEND SRCS stm32_otgfsdev.c)
   endif()
@@ -142,14 +144,14 @@ if(CONFIG_STM32_RTC)
   endif()
 endif()
 
-if(CONFIG_STM32_ADC)
-  list(APPEND SRCS stm32_adc.c)
-endif()
-
 if(CONFIG_STM32_SDADC)
   list(APPEND SRCS stm32_sdadc.c)
 endif()
 
+if(CONFIG_STM32_ADC)
+  list(APPEND SRCS stm32_adc.c)
+endif()
+
 if(CONFIG_STM32_DAC)
   list(APPEND SRCS stm32_dac.c)
 endif()
@@ -190,12 +192,34 @@ if(CONFIG_STM32_PWM)
   list(APPEND SRCS stm32_pwm.c)
 endif()
 
+if(CONFIG_STM32_CAP)
+  list(APPEND SRCS stm32_capture_lowerhalf.c)
+endif()
+
 if(CONFIG_SENSORS_QENCODER)
   list(APPEND SRCS stm32_qencoder.c)
 endif()
 
+if(CONFIG_SENSORS_HALL3PHASE)
+  list(APPEND SRCS stm32_hall3ph.c)
+endif()
+
 if(CONFIG_STM32_CAN)
-  list(APPEND SRCS stm32_can.c)
+  if(CONFIG_STM32_CAN_CHARDRIVER)
+    list(APPEND SRCS stm32_can.c)
+  endif()
+  if(CONFIG_STM32_CAN_SOCKET)
+    list(APPEND SRCS stm32_can_sock.c)
+  endif()
+endif()
+
+if(CONFIG_STM32_FDCAN)
+  if(CONFIG_STM32_FDCAN_CHARDRIVER)
+    list(APPEND SRCS stm32_fdcan.c)
+  endif()
+  if(CONFIG_STM32_FDCAN_SOCKET)
+    list(APPEND SRCS stm32_fdcan_sock.c)
+  endif()
 endif()
 
 if(CONFIG_STM32_IWDG)
@@ -214,6 +238,10 @@ if(CONFIG_STM32_AES)
   list(APPEND SRCS stm32_aes.c)
 endif()
 
+if(CONFIG_CRYPTO_CRYPTODEV_HARDWARE)
+  list(APPEND SRCS stm32_crypto.c)
+endif()
+
 if(CONFIG_STM32_BBSRAM)
   list(APPEND SRCS stm32_bbsram.c)
 endif()
@@ -230,4 +258,8 @@ if(CONFIG_STM32_FOC)
   list(APPEND SRCS stm32_foc.c)
 endif()
 
+if(CONFIG_STM32_CORDIC)
+  list(APPEND SRCS stm32_cordic.c)
+endif()
+
 target_sources(arch PRIVATE ${SRCS})