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
The following commit(s) were added to refs/heads/master by this push:
new 556f0bc0a60 boards/arm/stm32l4/stm32l476vg-disco: Add CMakeLists.txt.
556f0bc0a60 is described below
commit 556f0bc0a60ea598493a1b585c3838739feb7015
Author: Ahmed Ashraf NourEldeen <[email protected]>
AuthorDate: Sat Sep 26 18:35:40 2026 +0300
boards/arm/stm32l4/stm32l476vg-disco: Add CMakeLists.txt.
Add CMake build support for the stm32l476vg-disco board by introducing
board and source CMakeLists.txt files.
This allows the stm32l476vg-disco:nsh configuration to build successfully
with the CMake build system.
Fixes: #20366
Signed-off-by: Ahmed Ashraf NourEldeen <[email protected]>
---
.../arm/stm32l4/stm32l476vg-disco/CMakeLists.txt | 23 +++++++
.../stm32l4/stm32l476vg-disco/src/CMakeLists.txt | 79 ++++++++++++++++++++++
.../stm32l476vg-disco/src/etc/init.d/rc.sysinit | 2 +
.../stm32l4/stm32l476vg-disco/src/etc/init.d/rcS | 2 +
4 files changed, 106 insertions(+)
diff --git a/boards/arm/stm32l4/stm32l476vg-disco/CMakeLists.txt
b/boards/arm/stm32l4/stm32l476vg-disco/CMakeLists.txt
new file mode 100644
index 00000000000..e2bae2df3c5
--- /dev/null
+++ b/boards/arm/stm32l4/stm32l476vg-disco/CMakeLists.txt
@@ -0,0 +1,23 @@
+#
##############################################################################
+# boards/arm/stm32l4/stm32l476vg-disco/CMakeLists.txt
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# 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/stm32l4/stm32l476vg-disco/src/CMakeLists.txt
b/boards/arm/stm32l4/stm32l476vg-disco/src/CMakeLists.txt
new file mode 100644
index 00000000000..453b36672fb
--- /dev/null
+++ b/boards/arm/stm32l4/stm32l476vg-disco/src/CMakeLists.txt
@@ -0,0 +1,79 @@
+#
##############################################################################
+# boards/arm/stm32l4/stm32l476vg-disco/src/CMakeLists.txt
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# 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_BOARD_STM32_CUSTOM_CLOCKCONFIG)
+ list(APPEND SRCS stm32_clockconfig.c)
+endif()
+
+if(CONFIG_STM32_OTGFS)
+ list(APPEND SRCS stm32_usb.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_ADC)
+ list(APPEND SRCS stm32_adc.c)
+endif()
+
+if(CONFIG_BOARDCTL_IOCTL)
+ list(APPEND SRCS stm32_ioctl.c)
+endif()
+
+if(CONFIG_ETC_ROMFS)
+ nuttx_add_romfs(
+ NAME
+ etc
+ MOUNTPOINT
+ etc
+ RCRAWS
+ etc/init.d/rcS
+ etc/init.d/rc.sysinit
+ PATH
+ ${CMAKE_CURRENT_BINARY_DIR}/etc)
+
+ target_link_libraries(board PRIVATE romfs_etc)
+endif()
+
+if(CONFIG_BOARDCTL_UNIQUEID)
+ list(APPEND SRCS stm32_uid.c)
+endif()
+
+if(NOT CONFIG_STM32_ETHMAC)
+ if(CONFIG_NETDEVICES)
+ list(APPEND SRCS stm32_netinit.c)
+ endif()
+endif()
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT
+ "${NUTTX_BOARD_DIR}/scripts/stm32l476vg-disco.ld")
diff --git a/boards/arm/stm32l4/stm32l476vg-disco/src/etc/init.d/rc.sysinit
b/boards/arm/stm32l4/stm32l476vg-disco/src/etc/init.d/rc.sysinit
new file mode 100644
index 00000000000..fd5898636fa
--- /dev/null
+++ b/boards/arm/stm32l4/stm32l476vg-disco/src/etc/init.d/rc.sysinit
@@ -0,0 +1,2 @@
+# sample rc.sysinit file; you must run tools/genromfs <nuttx dir> from within
this
+# location to convert this file to etc_romfs.c for inclusion in the build
diff --git a/boards/arm/stm32l4/stm32l476vg-disco/src/etc/init.d/rcS
b/boards/arm/stm32l4/stm32l476vg-disco/src/etc/init.d/rcS
new file mode 100644
index 00000000000..d7f1e567fc1
--- /dev/null
+++ b/boards/arm/stm32l4/stm32l476vg-disco/src/etc/init.d/rcS
@@ -0,0 +1,2 @@
+# sample rcS file; you must run tools/genromfs <nuttx dir> from within this
+# location to convert this file to etc_romfs.c for inclusion in the build