You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2026/08/05 07:55:22 UTC
(nuttx) 02/04: boards/arm/stm32h7: switch board common to boards/arm/common/stm32
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch releases/13.0
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 8927b94f02d8251f3f997811ea5e87c10a08f15a
Author: raiden00pl <ra...@railab.me>
AuthorDate: Mon Jun 1 12:07:10 2026 +0200
boards/arm/stm32h7: switch board common to boards/arm/common/stm32
Wire the STM32H7 family to the shared boards/arm/common/stm32 board-common
directory.
Drop the local copies that are already provided by the shared directory:
- stm32_reset.c from nucleo-h723zg, nucleo-h743zi, nucleo-h743zi2,
nucleo-h753zi, stm32h745i-disco and stm32h750b-dk
- stm32_romfs_initialize.c and stm32_romfs.h from nucleo-h743zi (identical
to the shared versions)
Enable CONFIG_ARCH_BOARD_COMMON=y in the configs that use CONFIG_BOARDCTL_RESET
or CONFIG_STM32_ROMFS so board_reset()/romfs are pulled from the shared
directory.
Signed-off-by: raiden00pl <ra...@railab.me>
---
boards/Kconfig | 2 +-
boards/arm/common/stm32/src/stm32_tone.c | 43 +++++
.../src => common}/CMakeLists.txt | 39 +----
.../{weact-stm32h743/src => common}/Makefile | 34 ++--
.../linum-stm32h753bi/configs/qencoder/defconfig | 1 +
.../linum-stm32h753bi/configs/tone/defconfig | 1 +
.../arm/stm32h7/linum-stm32h753bi/include/board.h | 7 +
.../stm32h7/linum-stm32h753bi/src/CMakeLists.txt | 8 -
.../linum-stm32h753bi/src/{Makefile => Make.defs} | 14 +-
.../linum-stm32h753bi/src/linum-stm32h753bi.h | 30 ----
.../stm32h7/linum-stm32h753bi/src/stm32_bringup.c | 8 +
.../stm32h7/linum-stm32h753bi/src/stm32_qencoder.c | 68 --------
.../arm/stm32h7/linum-stm32h753bi/src/stm32_tone.c | 175 ---------------------
.../arm/stm32h7/nucleo-h723zg/src/CMakeLists.txt | 4 -
.../nucleo-h723zg/src/{Makefile => Make.defs} | 10 +-
boards/arm/stm32h7/nucleo-h723zg/src/stm32_reset.c | 64 --------
.../stm32h7/nucleo-h743zi/configs/elf/defconfig | 1 +
.../nucleo-h743zi/configs/mcuboot-app/defconfig | 1 +
.../nucleo-h743zi/configs/mcuboot-loader/defconfig | 1 +
.../nucleo-h743zi/configs/nxboot-app/defconfig | 1 +
.../nucleo-h743zi/configs/nxboot-loader/defconfig | 1 +
.../arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt | 8 -
.../nucleo-h743zi/src/{Makefile => Make.defs} | 14 +-
boards/arm/stm32h7/nucleo-h743zi/src/stm32_reset.c | 64 --------
boards/arm/stm32h7/nucleo-h743zi/src/stm32_romfs.h | 63 --------
.../nucleo-h743zi/src/stm32_romfs_initialize.c | 139 ----------------
.../stm32h7/nucleo-h743zi2/configs/jumbo/defconfig | 1 +
.../arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt | 4 -
.../src/Makefile => nucleo-h743zi2/src/Make.defs} | 10 +-
.../arm/stm32h7/nucleo-h743zi2/src/stm32_reset.c | 64 --------
.../nucleo-h745zi/src/{Makefile => Make.defs} | 10 +-
.../stm32h7/nucleo-h753zi/configs/jumbo/defconfig | 1 +
.../arm/stm32h7/nucleo-h753zi/src/CMakeLists.txt | 4 -
.../src/Makefile => nucleo-h753zi/src/Make.defs} | 10 +-
boards/arm/stm32h7/nucleo-h753zi/src/stm32_reset.c | 64 --------
.../stm32h7/openh743i/src/{Makefile => Make.defs} | 6 +-
.../portenta-h7/src/{Makefile => Make.defs} | 6 +-
.../stm32h7/stm32h745i-disco/src/CMakeLists.txt | 4 -
.../stm32h745i-disco/src/{Makefile => Make.defs} | 10 +-
.../arm/stm32h7/stm32h745i-disco/src/stm32_reset.c | 64 --------
.../stm32h747i-disco/src/{Makefile => Make.defs} | 6 +-
.../arm/stm32h7/stm32h750b-dk/src/CMakeLists.txt | 4 -
.../stm32h750b-dk/src/{Makefile => Make.defs} | 10 +-
boards/arm/stm32h7/stm32h750b-dk/src/stm32_reset.c | 62 --------
.../weact-stm32h743/src/{Makefile => Make.defs} | 6 +-
.../weact-stm32h750/src/{Makefile => Make.defs} | 6 +-
46 files changed, 136 insertions(+), 1017 deletions(-)
diff --git a/boards/Kconfig b/boards/Kconfig
index 4cad0f77ae8..957845910ec 100644
--- a/boards/Kconfig
+++ b/boards/Kconfig
@@ -5206,7 +5206,7 @@ endif
if ARCH_CHIP_SAMV7
source "boards/arm/samv7/common/Kconfig"
endif
-if ARCH_CHIP_STM32C0 || ARCH_CHIP_STM32F0 || ARCH_CHIP_STM32F1 || ARCH_CHIP_STM32F2 || ARCH_CHIP_STM32F3 || ARCH_CHIP_STM32F4 || ARCH_CHIP_STM32F7 || ARCH_CHIP_STM32G0 || ARCH_CHIP_STM32G4 || ARCH_CHIP_STM32L0 || ARCH_CHIP_STM32L1
+if ARCH_CHIP_STM32C0 || ARCH_CHIP_STM32F0 || ARCH_CHIP_STM32F1 || ARCH_CHIP_STM32F2 || ARCH_CHIP_STM32F3 || ARCH_CHIP_STM32F4 || ARCH_CHIP_STM32F7 || ARCH_CHIP_STM32G0 || ARCH_CHIP_STM32G4 || ARCH_CHIP_STM32L0 || ARCH_CHIP_STM32L1 || ARCH_CHIP_STM32H7
source "boards/arm/common/stm32/Kconfig"
endif
if ARCH_CHIP_RP2040
diff --git a/boards/arm/common/stm32/src/stm32_tone.c b/boards/arm/common/stm32/src/stm32_tone.c
index 178f8c1504c..81cbe4c6890 100644
--- a/boards/arm/common/stm32/src/stm32_tone.c
+++ b/boards/arm/common/stm32/src/stm32_tone.c
@@ -29,6 +29,7 @@
#include <errno.h>
#include <nuttx/debug.h>
#include <stdio.h>
+#include <fcntl.h>
#include <nuttx/timers/pwm.h>
#include <nuttx/timers/oneshot.h>
@@ -68,6 +69,44 @@
* Private Functions
****************************************************************************/
+/****************************************************************************
+ * Name: tone_example
+ *
+ * Input Parameters:
+ * devno - The device number, used to build the device path as /dev/toneN
+ *
+ * Description:
+ * Configure and test the tone generator.
+ *
+ ****************************************************************************/
+
+static int tone_example(int devno)
+{
+ int ret;
+ int fd;
+ char devpath[12];
+ const char msg[] = "t120o1l16b9n0baan0bn0bn0baaan0b9n0baan0b";
+
+ snprintf(devpath, 12, "/dev/tone%d", devno);
+ fd = open(devpath, O_RDWR);
+ if (fd < 0)
+ {
+ printf("Failed to open device driver at: %s\n", devpath);
+ return -errno;
+ }
+
+ ret = write(fd, msg, sizeof(msg));
+ if (ret < 0)
+ {
+ printf("Failed to write to device driver at: %s\n", devpath);
+ return ret;
+ }
+
+ close(fd);
+
+ return ret;
+}
+
/****************************************************************************
* Public Functions
****************************************************************************/
@@ -131,6 +170,10 @@ int board_tone_initialize(int devno)
/* Now we are initialized */
initialized = true;
+
+ /* Play tone example */
+
+ tone_example(devno);
}
return OK;
diff --git a/boards/arm/stm32h7/stm32h745i-disco/src/CMakeLists.txt b/boards/arm/stm32h7/common/CMakeLists.txt
similarity index 54%
copy from boards/arm/stm32h7/stm32h745i-disco/src/CMakeLists.txt
copy to boards/arm/stm32h7/common/CMakeLists.txt
index bb605d54ac7..62c445966cb 100644
--- a/boards/arm/stm32h7/stm32h745i-disco/src/CMakeLists.txt
+++ b/boards/arm/stm32h7/common/CMakeLists.txt
@@ -1,5 +1,5 @@
# ##############################################################################
-# boards/arm/stm32h7/stm32h745i-disco/src/CMakeLists.txt
+# boards/arm/stm32h7/common/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -20,39 +20,6 @@
#
# ##############################################################################
-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_STM32_OTGFS)
- list(APPEND SRCS stm32_usb.c)
-endif()
-
-if(CONFIG_TESTING_OSTEST)
- list(APPEND SRCS stm32_ostest.c)
-endif()
-
-if(CONFIG_BOARDCTL_RESET)
- list(APPEND SRCS stm32_reset.c)
-endif()
-
-if(CONFIG_INPUT_FT5X06)
- list(APPEND SRCS stm32_ft5x06.c)
-endif()
-
-if(CONFIG_STM32_LTDC)
- list(APPEND SRCS stm32_lcd.c)
-endif()
-
-target_sources(board PRIVATE ${SRCS})
-
-if(CONFIG_ARCH_CHIP_STM32H7_CORTEXM7)
- set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")
-else()
- set_property(GLOBAL PROPERTY LD_SCRIPT
- "${NUTTX_BOARD_DIR}/scripts/flash_m4.ld")
+if(CONFIG_ARCH_BOARD_COMMON)
+ add_subdirectory(${NUTTX_DIR}/boards/arm/common/stm32 stm32_common)
endif()
diff --git a/boards/arm/stm32h7/weact-stm32h743/src/Makefile b/boards/arm/stm32h7/common/Makefile
similarity index 63%
copy from boards/arm/stm32h7/weact-stm32h743/src/Makefile
copy to boards/arm/stm32h7/common/Makefile
index 0bbd3d18694..b8da8067d5f 100644
--- a/boards/arm/stm32h7/weact-stm32h743/src/Makefile
+++ b/boards/arm/stm32h7/common/Makefile
@@ -1,5 +1,5 @@
-############################################################################
-# boards/arm/stm32h7/weact-stm32h743/src/Makefile
+#############################################################################
+# boards/arm/stm32h7/common/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -18,30 +18,22 @@
# License for the specific language governing permissions and limitations
# under the License.
#
-############################################################################
+#############################################################################
include $(TOPDIR)/Make.defs
-CSRCS = stm32_boot.c stm32_bringup.c stm32_usb.c stm32_ioctl.c stm32_spi.c
+STM32_BOARD_COMMON_DIR := $(TOPDIR)$(DELIM)boards$(DELIM)arm$(DELIM)common$(DELIM)stm32
+STM32_COMMON_SRCDIR := $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)common$(DELIM)stm32
-ifeq ($(CONFIG_ARCH_LEDS),y)
-CSRCS += stm32_autoleds.c
-else
-CSRCS += stm32_userleds.c
-endif
+include board/Make.defs
+include $(STM32_BOARD_COMMON_DIR)$(DELIM)src$(DELIM)Make.defs
-ifeq ($(CONFIG_VIDEO_FB),y)
- ifeq ($(CONFIG_LCD_ST7735),y)
- CSRCS += stm32_lcd_st7735.c
- endif
-endif
+DEPPATH += --dep-path board
-ifeq ($(CONFIG_STM32_SDMMC),y)
-CSRCS += stm32_sdmmc.c
-endif
+include $(TOPDIR)/boards/Board.mk
-ifeq ($(CONFIG_FAT_DMAMEMORY),y)
-CSRCS += stm32_dma_alloc.c
-endif
+ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
+BOARDDIR = $(ARCHSRCDIR)$(DELIM)board
+CFLAGS += ${INCDIR_PREFIX}$(BOARDDIR)$(DELIM)include
-include $(TOPDIR)/boards/Board.mk
+CFLAGS += ${INCDIR_PREFIX}$(STM32_COMMON_SRCDIR)
diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/qencoder/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/qencoder/defconfig
index 483c66da524..aa315eaed33 100644
--- a/boards/arm/stm32h7/linum-stm32h753bi/configs/qencoder/defconfig
+++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/qencoder/defconfig
@@ -10,6 +10,7 @@
# CONFIG_STANDARD_SERIAL is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="linum-stm32h753bi"
+CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_LINUM_STM32H753BI=y
CONFIG_ARCH_CHIP="stm32h7"
CONFIG_ARCH_CHIP_STM32=y
diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/tone/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/tone/defconfig
index 2dec3ec8389..9580fde221d 100644
--- a/boards/arm/stm32h7/linum-stm32h753bi/configs/tone/defconfig
+++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/tone/defconfig
@@ -12,6 +12,7 @@
# CONFIG_STANDARD_SERIAL is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="linum-stm32h753bi"
+CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_LINUM_STM32H753BI=y
CONFIG_ARCH_CHIP="stm32h7"
CONFIG_ARCH_CHIP_STM32=y
diff --git a/boards/arm/stm32h7/linum-stm32h753bi/include/board.h b/boards/arm/stm32h7/linum-stm32h753bi/include/board.h
index 6cccfd1a0ba..953d60a690c 100644
--- a/boards/arm/stm32h7/linum-stm32h753bi/include/board.h
+++ b/boards/arm/stm32h7/linum-stm32h753bi/include/board.h
@@ -595,6 +595,13 @@
#define GPIO_TIM5_CH1IN GPIO_TIM5_CH1IN_1 /* PA0 */
#define GPIO_TIM5_CH2IN GPIO_TIM5_CH2IN_2 /* PH11 */
+/* Tone generator */
+
+#define BOARD_TONE_PWM_TIM 4 /* Timer 4 - PWM timer for tone generation */
+#define BOARD_TONE_PWM_CHANNEL 2 /* Timer 4 - PWM channel for tone generation */
+#define BOARD_TONE_ONESHOT_TIM 17 /* Timer 17 - Oneshot timer for note timings */
+#define BOARD_TONE_ONESHOT_TIM_RES 10 /* Timer 17 - Oneshot timer resolution (us) */
+
/* LTDC */
#define GPIO_LTDC_R0 (GPIO_LTDC_R0_3|GPIO_SPEED_100MHz) /* PI15 */
diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/CMakeLists.txt b/boards/arm/stm32h7/linum-stm32h753bi/src/CMakeLists.txt
index e4b1d4e9275..42eaf0b8ded 100644
--- a/boards/arm/stm32h7/linum-stm32h753bi/src/CMakeLists.txt
+++ b/boards/arm/stm32h7/linum-stm32h753bi/src/CMakeLists.txt
@@ -50,10 +50,6 @@ if(CONFIG_PWM)
list(APPEND SRCS stm32_pwm.c)
endif()
-if(CONFIG_AUDIO_TONE)
- list(APPEND SRCS stm32_tone.c)
-endif()
-
if(CONFIG_MTD_W25QXXXJV)
list(APPEND SRCS stm32_w25q.c)
endif()
@@ -62,10 +58,6 @@ if(CONFIG_USBMSC)
list(APPEND SRCS stm32_usbmsc.c)
endif()
-if(CONFIG_SENSORS_QENCODER)
- list(APPEND SRCS stm32_qencoder.c)
-endif()
-
if(CONFIG_CL_MFRC522)
list(APPEND SRCS stm32_mfrc522.c)
endif()
diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/Makefile b/boards/arm/stm32h7/linum-stm32h753bi/src/Make.defs
similarity index 89%
rename from boards/arm/stm32h7/linum-stm32h753bi/src/Makefile
rename to boards/arm/stm32h7/linum-stm32h753bi/src/Make.defs
index 56336dc4c5a..84f742f4004 100644
--- a/boards/arm/stm32h7/linum-stm32h753bi/src/Makefile
+++ b/boards/arm/stm32h7/linum-stm32h753bi/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/linum-stm32h753bi/src/Makefile
+# boards/arm/stm32h7/linum-stm32h753bi/src/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -60,10 +60,6 @@ ifeq ($(CONFIG_USBMSC),y)
CSRCS += stm32_usbmsc.c
endif
-ifeq ($(CONFIG_SENSORS_QENCODER),y)
-CSRCS += stm32_qencoder.c
-endif
-
ifeq ($(CONFIG_CL_MFRC522),y)
CSRCS += stm32_mfrc522.c
endif
@@ -72,12 +68,10 @@ ifeq ($(CONFIG_STM32_LTDC),y)
CSRCS += stm32_lcd.c
endif
-ifeq ($(CONFIG_AUDIO_TONE),y)
- CSRCS += stm32_tone.c
-endif
-
ifeq ($(CONFIG_INPUT_FT5X06),y)
CSRCS += stm32_touchscreen.c
endif
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/linum-stm32h753bi.h b/boards/arm/stm32h7/linum-stm32h753bi/src/linum-stm32h753bi.h
index 64027b170b9..4b43bdb6508 100644
--- a/boards/arm/stm32h7/linum-stm32h753bi/src/linum-stm32h753bi.h
+++ b/boards/arm/stm32h7/linum-stm32h753bi/src/linum-stm32h753bi.h
@@ -106,11 +106,6 @@
#define BUZZER_PWMTIMER 4
#define BUZZER_PWMCHANNEL 2
-/* OneShot Timer */
-
-#define BOARD_TONE_ONESHOT_TIM 17 /* Timer 17 - Oneshot timer for note timings */
-#define BOARD_TONE_ONESHOT_TIM_RES 10 /* Timer 17 - Oneshot timer resolution (us) */
-
/* Ethernet
*
* PI4 Reset PHY pin
@@ -241,16 +236,6 @@ void stm32_spidev_initialize(void);
int stm32_w25qxxx_setup(void);
#endif
-/****************************************************************************
- * Name: board_qencoder_initialize
- *
- * Description:
- * Initialize the quadrature encoder driver for the given timer
- *
- ****************************************************************************/
-
-int board_qencoder_initialize(int devno, int timerno);
-
/****************************************************************************
* Name: stm32_mfrc522initialize
*
@@ -269,21 +254,6 @@ int board_qencoder_initialize(int devno, int timerno);
int stm32_mfrc522initialize(const char *devpath);
#endif
-/****************************************************************************
- * Name: board_tone_initialize
- *
- * Input Parameters:
- * devno - The device number, used to build the device path as /dev/toneN
- *
- * Description:
- * Configure and initialize the tone generator.
- *
- ****************************************************************************/
-
-#ifdef CONFIG_AUDIO_TONE
-int board_tone_initialize(int devno);
-#endif
-
/****************************************************************************
* Name: stm32_tsc_setup
*
diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c
index 02f6a1cc0ae..a6f8e93a78d 100644
--- a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c
+++ b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c
@@ -38,6 +38,14 @@
#include "linum-stm32h753bi.h"
+#ifdef CONFIG_SENSORS_QENCODER
+# include "board_qencoder.h"
+#endif
+
+#ifdef CONFIG_AUDIO_TONE
+# include "stm32_tone.h"
+#endif
+
#ifdef CONFIG_USERLED
#include <nuttx/leds/userled.h>
#endif
diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_qencoder.c b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_qencoder.c
deleted file mode 100644
index 8061661794f..00000000000
--- a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_qencoder.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32h7/linum-stm32h753bi/src/stm32_qencoder.c
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <nuttx/debug.h>
-#include <stdio.h>
-
-#include <nuttx/sensors/qencoder.h>
-#include <arch/board/board.h>
-
-#include "chip.h"
-#include "arm_internal.h"
-#include "stm32_qencoder.h"
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_qencoder_initialize
- *
- * Description:
- * Initialize the quadrature encoder driver for the given timer
- *
- ****************************************************************************/
-
-int board_qencoder_initialize(int devno, int timerno)
-{
- int ret;
- char devpath[12];
-
- /* Initialize a quadrature encoder interface. */
-
- sninfo("Initializing the quadrature encoder using TIM%d\n", timerno);
- snprintf(devpath, 12, "/dev/qe%d", devno);
- ret = stm32_qeinitialize(devpath, timerno);
- if (ret < 0)
- {
- snerr("ERROR: stm32_qeinitialize failed: %d\n", ret);
- }
-
- return ret;
-}
diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_tone.c b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_tone.c
deleted file mode 100644
index 655c9d8040c..00000000000
--- a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_tone.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32h7/linum-stm32h753bi/src/stm32_tone.c
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <errno.h>
-#include <nuttx/debug.h>
-#include <stdio.h>
-#include <fcntl.h>
-
-#include <nuttx/timers/pwm.h>
-#include <nuttx/timers/oneshot.h>
-#include <nuttx/audio/tone.h>
-#include <arch/board/board.h>
-
-#include "linum-stm32h753bi.h"
-#include "arm_internal.h"
-#include "stm32_pwm.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Function Prototypes
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: tone_example
- *
- * Input Parameters:
- * devno - The device number, used to build the device path as /dev/toneN
- *
- * Description:
- * Configure and test the tone generator.
- *
- ****************************************************************************/
-
-static int tone_example(int devno)
-{
- int ret;
- int fd;
- char devpath[12];
- const char msg[] = "t120o1l16b9n0baan0bn0bn0baaan0b9n0baan0b";
-
- snprintf(devpath, 12, "/dev/tone%d", devno);
- fd = open(devpath, O_RDWR);
- if (fd < 0)
- {
- printf("Failed to open device driver at: %s\n", devpath);
- return -errno;
- }
-
- ret = write(fd, msg, sizeof(msg));
- if (ret < 0)
- {
- printf("Failed to write to device driver at: %s\n", devpath);
- return ret;
- }
-
- close(fd);
-
- return ret;
-}
-
-/****************************************************************************
- * Name: board_tone_initialize
- *
- * Input Parameters:
- * devno - The device number, used to build the device path as /dev/toneN
- *
- * Description:
- * Configure and initialize the tone generator.
- *
- ****************************************************************************/
-
-int board_tone_initialize(int devno)
-{
- static bool initialized = false;
- struct pwm_lowerhalf_s *tone;
- struct oneshot_lowerhalf_s *oneshot = NULL;
- int ret;
- char devpath[12];
-
- /* Have we already initialized? */
-
- if (!initialized)
- {
- /* Call stm32_pwminitialize() to get an instance of the PWM interface */
-
- tone = stm32_pwminitialize(BUZZER_PWMTIMER);
- if (!tone)
- {
- auderr("Failed to get the STM32 PWM lower half to AUDIO TONE\n");
- return -ENODEV;
- }
-
- /* Initialize TONE PWM */
-
- tone->ops->setup(tone);
-
- /* Initialize ONESHOT Timer */
-
- oneshot = oneshot_initialize(BOARD_TONE_ONESHOT_TIM,
- BOARD_TONE_ONESHOT_TIM_RES);
- if (!oneshot)
- {
- auderr("Failed to initialize ONESHOT Timer!\n");
- return -ENODEV;
- }
-
- /* Register the Audio Tone driver at "/dev/tone0" */
-
- snprintf(devpath, 12, "/dev/tone%d", devno);
- ret = tone_register(devpath, tone, BUZZER_PWMCHANNEL, oneshot);
- if (ret < 0)
- {
- auderr("ERROR: tone_register failed: %d\n", ret);
- return ret;
- }
-
- /* Now we are initialized */
-
- initialized = true;
-
- /* Play tone example */
-
- tone_example(devno);
- }
-
- return OK;
-}
diff --git a/boards/arm/stm32h7/nucleo-h723zg/src/CMakeLists.txt b/boards/arm/stm32h7/nucleo-h723zg/src/CMakeLists.txt
index 45813c92cc5..95677ecec03 100644
--- a/boards/arm/stm32h7/nucleo-h723zg/src/CMakeLists.txt
+++ b/boards/arm/stm32h7/nucleo-h723zg/src/CMakeLists.txt
@@ -56,10 +56,6 @@ if(CONFIG_PWM)
list(APPEND SRCS stm32_pwm.c)
endif()
-if(CONFIG_BOARDCTL_RESET)
- list(APPEND SRCS stm32_reset.c)
-endif()
-
if(CONFIG_NET_OA_TC6)
list(APPEND SRCS stm32_oa_tc6.c)
endif()
diff --git a/boards/arm/stm32h7/nucleo-h723zg/src/Makefile b/boards/arm/stm32h7/nucleo-h723zg/src/Make.defs
similarity index 88%
rename from boards/arm/stm32h7/nucleo-h723zg/src/Makefile
rename to boards/arm/stm32h7/nucleo-h723zg/src/Make.defs
index f57fd57f306..21b86d15ae5 100644
--- a/boards/arm/stm32h7/nucleo-h723zg/src/Makefile
+++ b/boards/arm/stm32h7/nucleo-h723zg/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/nucleo-h723zg/src/Makefile
+# boards/arm/stm32h7/nucleo-h723zg/src/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -58,12 +58,10 @@ ifeq ($(CONFIG_PWM),y)
CSRCS += stm32_pwm.c
endif
-ifeq ($(CONFIG_BOARDCTL_RESET),y)
-CSRCS += stm32_reset.c
-endif
-
ifeq ($(CONFIG_NET_OA_TC6),y)
CSRCS += stm32_oa_tc6.c
endif
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git a/boards/arm/stm32h7/nucleo-h723zg/src/stm32_reset.c b/boards/arm/stm32h7/nucleo-h723zg/src/stm32_reset.c
deleted file mode 100644
index 63b6ff97c86..00000000000
--- a/boards/arm/stm32h7/nucleo-h723zg/src/stm32_reset.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32h7/nucleo-h723zg/src/stm32_reset.c
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <nuttx/arch.h>
-#include <nuttx/board.h>
-
-#ifdef CONFIG_BOARDCTL_RESET
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_reset
- *
- * Description:
- * Reset board. Support for this function is required by board-level
- * logic if CONFIG_BOARDCTL_RESET is selected.
- *
- * Input Parameters:
- * status - Status information provided with the reset event. This
- * meaning of this status information is board-specific. If not
- * used by a board, the value zero may be provided in calls to
- * board_reset().
- *
- * Returned Value:
- * If this function returns, then it was not possible to power-off the
- * board due to some constraints. The return value int this case is a
- * board-specific reason for the failure to shutdown.
- *
- ****************************************************************************/
-
-int board_reset(int status)
-{
- up_systemreset();
- return 0;
-}
-
-#endif /* CONFIG_BOARDCTL_RESET */
diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/elf/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/elf/defconfig
index 27247352da0..f21cc7d12f1 100644
--- a/boards/arm/stm32h7/nucleo-h743zi/configs/elf/defconfig
+++ b/boards/arm/stm32h7/nucleo-h743zi/configs/elf/defconfig
@@ -11,6 +11,7 @@
# CONFIG_STM32_DTCMEXCLUDE is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="nucleo-h743zi"
+CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_NUCLEO_H743ZI=y
CONFIG_ARCH_CHIP="stm32h7"
CONFIG_ARCH_CHIP_STM32=y
diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/mcuboot-app/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/mcuboot-app/defconfig
index 9be0478f7ea..dd7faf05d87 100644
--- a/boards/arm/stm32h7/nucleo-h743zi/configs/mcuboot-app/defconfig
+++ b/boards/arm/stm32h7/nucleo-h743zi/configs/mcuboot-app/defconfig
@@ -8,6 +8,7 @@
# CONFIG_STANDARD_SERIAL is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="nucleo-h743zi"
+CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_NUCLEO_H743ZI=y
CONFIG_ARCH_CHIP="stm32h7"
CONFIG_ARCH_CHIP_STM32=y
diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/mcuboot-loader/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/mcuboot-loader/defconfig
index ac1dce20115..42e24eaed4c 100644
--- a/boards/arm/stm32h7/nucleo-h743zi/configs/mcuboot-loader/defconfig
+++ b/boards/arm/stm32h7/nucleo-h743zi/configs/mcuboot-loader/defconfig
@@ -7,6 +7,7 @@
#
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="nucleo-h743zi"
+CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_NUCLEO_H743ZI=y
CONFIG_ARCH_CHIP="stm32h7"
CONFIG_ARCH_CHIP_STM32=y
diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/nxboot-app/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/nxboot-app/defconfig
index 8d9cdb06d9a..ce2e87133e2 100644
--- a/boards/arm/stm32h7/nucleo-h743zi/configs/nxboot-app/defconfig
+++ b/boards/arm/stm32h7/nucleo-h743zi/configs/nxboot-app/defconfig
@@ -8,6 +8,7 @@
# CONFIG_STANDARD_SERIAL is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="nucleo-h743zi"
+CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_NUCLEO_H743ZI=y
CONFIG_ARCH_CHIP="stm32h7"
CONFIG_ARCH_CHIP_STM32=y
diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/nxboot-loader/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/nxboot-loader/defconfig
index ceb8ba55d35..ec79fa1b09c 100644
--- a/boards/arm/stm32h7/nucleo-h743zi/configs/nxboot-loader/defconfig
+++ b/boards/arm/stm32h7/nucleo-h743zi/configs/nxboot-loader/defconfig
@@ -7,6 +7,7 @@
#
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="nucleo-h743zi"
+CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_NUCLEO_H743ZI=y
CONFIG_ARCH_CHIP="stm32h7"
CONFIG_ARCH_CHIP_STM32=y
diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt b/boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt
index 4967d7e733d..6fed42e1176 100644
--- a/boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt
+++ b/boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt
@@ -36,10 +36,6 @@ 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_STM32_SPI)
list(APPEND SRCS stm32_spi.c)
endif()
@@ -88,10 +84,6 @@ 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()
diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/Makefile b/boards/arm/stm32h7/nucleo-h743zi/src/Make.defs
similarity index 91%
rename from boards/arm/stm32h7/nucleo-h743zi/src/Makefile
rename to boards/arm/stm32h7/nucleo-h743zi/src/Make.defs
index bf54e0db6ef..b1afe513ef8 100644
--- a/boards/arm/stm32h7/nucleo-h743zi/src/Makefile
+++ b/boards/arm/stm32h7/nucleo-h743zi/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/nucleo-h743zi/src/Makefile
+# boards/arm/stm32h7/nucleo-h743zi/src/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -38,10 +38,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
CSRCS += stm32_buttons.c
endif
-ifeq ($(CONFIG_STM32_ROMFS),y)
-CSRCS += stm32_romfs_initialize.c
-endif
-
ifeq ($(CONFIG_STM32_SPI),y)
CSRCS += stm32_spi.c
endif
@@ -90,10 +86,6 @@ ifeq ($(CONFIG_PWM),y)
CSRCS += stm32_pwm.c
endif
-ifeq ($(CONFIG_BOARDCTL_RESET),y)
-CSRCS += stm32_reset.c
-endif
-
ifeq ($(CONFIG_BOARDCTL_BOOT_IMAGE),y)
CSRCS += stm32_boot_image.c
endif
@@ -110,4 +102,6 @@ ifeq ($(CONFIG_MMCSD),y)
CSRCS += stm32_mmcsd.c
endif
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_reset.c b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_reset.c
deleted file mode 100644
index be800712641..00000000000
--- a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_reset.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32h7/nucleo-h743zi/src/stm32_reset.c
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <nuttx/arch.h>
-#include <nuttx/board.h>
-
-#ifdef CONFIG_BOARDCTL_RESET
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_reset
- *
- * Description:
- * Reset board. Support for this function is required by board-level
- * logic if CONFIG_BOARDCTL_RESET is selected.
- *
- * Input Parameters:
- * status - Status information provided with the reset event. This
- * meaning of this status information is board-specific. If not
- * used by a board, the value zero may be provided in calls to
- * board_reset().
- *
- * Returned Value:
- * If this function returns, then it was not possible to power-off the
- * board due to some constraints. The return value int this case is a
- * board-specific reason for the failure to shutdown.
- *
- ****************************************************************************/
-
-int board_reset(int status)
-{
- up_systemreset();
- return 0;
-}
-
-#endif /* CONFIG_BOARDCTL_RESET */
diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_romfs.h b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_romfs.h
deleted file mode 100644
index 6e90378c8fd..00000000000
--- a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_romfs.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32h7/nucleo-h743zi/src/stm32_romfs.h
- *
- * 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.
- *
- ****************************************************************************/
-
-#ifndef __BOARDS_ARM_STM32H7_NUCLEO_H743ZI_SRC_STM32_ROMFS_H
-#define __BOARDS_ARM_STM32H7_NUCLEO_H743ZI_SRC_STM32_ROMFS_H
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#ifdef CONFIG_STM32_ROMFS
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-#define ROMFS_SECTOR_SIZE 64
-
-/****************************************************************************
- * Public Function Prototypes
- ****************************************************************************/
-
-/****************************************************************************
- * Name: stm32_romfs_initialize
- *
- * Description:
- * Registers built-in ROMFS image as block device and mounts it.
- *
- * Returned Value:
- * Zero (OK) on success, a negated errno value on error.
- *
- * Assumptions/Limitations:
- * Memory addresses [romfs_data_begin .. romfs_data_end) should contain
- * ROMFS volume data, as included in the assembly snippet above (l. 84).
- *
- ****************************************************************************/
-
-int stm32_romfs_initialize(void);
-
-#endif /* CONFIG_STM32_ROMFS */
-
-#endif /* __BOARDS_ARM_STM32H7_NUCLEO_H743ZI_SRC_STM32_ROMFS_H */
diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_romfs_initialize.c b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_romfs_initialize.c
deleted file mode 100644
index 414b7343174..00000000000
--- a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_romfs_initialize.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32h7/nucleo-h743zi/src/stm32_romfs_initialize.c
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/mount.h>
-#include <sys/types.h>
-#include <stdint.h>
-#include <nuttx/debug.h>
-#include <errno.h>
-
-#include <nuttx/fs/fs.h>
-#include <nuttx/drivers/ramdisk.h>
-#include "stm32_romfs.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-#ifndef CONFIG_STM32_ROMFS
-# error "CONFIG_STM32_ROMFS must be defined"
-#else
-
-#ifndef CONFIG_STM32_ROMFS_IMAGEFILE
-# error "CONFIG_STM32_ROMFS_IMAGEFILE must be defined"
-#endif
-
-#ifndef CONFIG_STM32_ROMFS_DEV_MINOR
-# error "CONFIG_STM32_ROMFS_DEV_MINOR must be defined"
-#endif
-
-#ifndef CONFIG_STM32_ROMFS_MOUNTPOINT
-# error "CONFIG_STM32_ROMFS_MOUNTPOINT must be defined"
-#endif
-
-#define NSECTORS(size) (((size) + ROMFS_SECTOR_SIZE - 1)/ROMFS_SECTOR_SIZE)
-
-#define STR2(m) #m
-#define STR(m) STR2(m)
-
-#define MKMOUNT_DEVNAME(m) "/dev/ram" STR(m)
-#define MOUNT_DEVNAME MKMOUNT_DEVNAME(CONFIG_STM32_ROMFS_DEV_MINOR)
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-__asm__ (
- " .section .rodata, \"a\" \n"
- " .balign 16 \n"
- " .globl romfs_data_begin \n"
- "romfs_data_begin: \n"
- " .incbin " STR(CONFIG_STM32_ROMFS_IMAGEFILE)"\n"
- " .balign " STR(ROMFS_SECTOR_SIZE) "\n"
- " .globl romfs_data_end \n"
- "romfs_data_end: \n"
- );
-
-extern const uint8_t romfs_data_begin[];
-extern const uint8_t romfs_data_end[];
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: stm32_romfs_initialize
- *
- * Description:
- * Registers the aboveincluded binary file as block device.
- * Then mounts the block device as ROMFS filesystems.
- *
- * Returned Value:
- * Zero (OK) on success, a negated errno value on error.
- *
- * Assumptions/Limitations:
- * Memory addresses [romfs_data_begin .. romfs_data_end) should contain
- * ROMFS volume data, as included in the assembly snippet above (l. 84).
- *
- ****************************************************************************/
-
-int stm32_romfs_initialize(void)
-{
- size_t romfs_data_len;
- int ret;
-
- /* Create a ROM disk for the /etc filesystem */
-
- romfs_data_len = romfs_data_end - romfs_data_begin;
-
- ret = romdisk_register(CONFIG_STM32_ROMFS_DEV_MINOR, romfs_data_begin,
- NSECTORS(romfs_data_len), ROMFS_SECTOR_SIZE);
- if (ret < 0)
- {
- ferr("ERROR: romdisk_register failed: %d\n", -ret);
- return ret;
- }
-
- /* Mount the file system */
-
- finfo("Mounting ROMFS filesystem at target=%s with source=%s\n",
- CONFIG_STM32_ROMFS_MOUNTPOINT, MOUNT_DEVNAME);
-
- ret = nx_mount(MOUNT_DEVNAME, CONFIG_STM32_ROMFS_MOUNTPOINT,
- "romfs", MS_RDONLY, NULL);
- if (ret < 0)
- {
- ferr("ERROR: nx_mount(%s,%s,romfs) failed: %d\n",
- MOUNT_DEVNAME, CONFIG_STM32_ROMFS_MOUNTPOINT, ret);
- return ret;
- }
-
- return OK;
-}
-
-#endif /* CONFIG_STM32_ROMFS */
diff --git a/boards/arm/stm32h7/nucleo-h743zi2/configs/jumbo/defconfig b/boards/arm/stm32h7/nucleo-h743zi2/configs/jumbo/defconfig
index 436b8c8c378..f6ea9620979 100644
--- a/boards/arm/stm32h7/nucleo-h743zi2/configs/jumbo/defconfig
+++ b/boards/arm/stm32h7/nucleo-h743zi2/configs/jumbo/defconfig
@@ -9,6 +9,7 @@
# CONFIG_STANDARD_SERIAL is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="nucleo-h743zi2"
+CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_NUCLEO_H743ZI2=y
CONFIG_ARCH_BUTTONS=y
CONFIG_ARCH_CHIP="stm32h7"
diff --git a/boards/arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt b/boards/arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt
index 1d7544f8cdb..1b725d66c14 100644
--- a/boards/arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt
+++ b/boards/arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt
@@ -48,10 +48,6 @@ if(CONFIG_SENSORS_QENCODER)
list(APPEND SRCS stm32_qencoder.c)
endif()
-if(CONFIG_BOARDCTL_RESET)
- list(APPEND SRCS stm32_reset.c)
-endif()
-
if(CONFIG_ARCH_BUTTONS)
list(APPEND SRCS stm32_buttons.c)
endif()
diff --git a/boards/arm/stm32h7/nucleo-h753zi/src/Makefile b/boards/arm/stm32h7/nucleo-h743zi2/src/Make.defs
similarity index 88%
rename from boards/arm/stm32h7/nucleo-h753zi/src/Makefile
rename to boards/arm/stm32h7/nucleo-h743zi2/src/Make.defs
index e310e6c8a8e..eb387e18681 100644
--- a/boards/arm/stm32h7/nucleo-h753zi/src/Makefile
+++ b/boards/arm/stm32h7/nucleo-h743zi2/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/nucleo-h753zi/src/Makefile
+# boards/arm/stm32h7/nucleo-h743zi2/src/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -54,8 +54,6 @@ ifeq ($(CONFIG_SENSORS_QENCODER),y)
CSRCS += stm32_qencoder.c
endif
-ifeq ($(CONFIG_BOARDCTL_RESET),y)
-CSRCS += stm32_reset.c
-endif
-
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git a/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_reset.c b/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_reset.c
deleted file mode 100644
index 5ed1e65ea63..00000000000
--- a/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_reset.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32h7/nucleo-h743zi2/src/stm32_reset.c
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <nuttx/arch.h>
-#include <nuttx/board.h>
-
-#ifdef CONFIG_BOARDCTL_RESET
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_reset
- *
- * Description:
- * Reset board. Support for this function is required by board-level
- * logic if CONFIG_BOARDCTL_RESET is selected.
- *
- * Input Parameters:
- * status - Status information provided with the reset event. This
- * meaning of this status information is board-specific. If not
- * used by a board, the value zero may be provided in calls to
- * board_reset().
- *
- * Returned Value:
- * If this function returns, then it was not possible to power-off the
- * board due to some constraints. The return value int this case is a
- * board-specific reason for the failure to shutdown.
- *
- ****************************************************************************/
-
-int board_reset(int status)
-{
- up_systemreset();
- return 0;
-}
-
-#endif /* CONFIG_BOARDCTL_RESET */
diff --git a/boards/arm/stm32h7/nucleo-h745zi/src/Makefile b/boards/arm/stm32h7/nucleo-h745zi/src/Make.defs
similarity index 87%
rename from boards/arm/stm32h7/nucleo-h745zi/src/Makefile
rename to boards/arm/stm32h7/nucleo-h745zi/src/Make.defs
index 37c9b6b815d..51e5d21b913 100644
--- a/boards/arm/stm32h7/nucleo-h745zi/src/Makefile
+++ b/boards/arm/stm32h7/nucleo-h745zi/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/nucleo-h745zi/src/Makefile
+# boards/arm/stm32h7/nucleo-h745zi/src/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -50,8 +50,6 @@ ifeq ($(CONFIG_SENSORS_QENCODER),y)
CSRCS += stm32_qencoder.c
endif
-ifeq ($(CONFIG_BOARDCTL_RESET),y)
-CSRCS += stm32_reset.c
-endif
-
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git a/boards/arm/stm32h7/nucleo-h753zi/configs/jumbo/defconfig b/boards/arm/stm32h7/nucleo-h753zi/configs/jumbo/defconfig
index 64f82396477..798c4794b4c 100644
--- a/boards/arm/stm32h7/nucleo-h753zi/configs/jumbo/defconfig
+++ b/boards/arm/stm32h7/nucleo-h753zi/configs/jumbo/defconfig
@@ -9,6 +9,7 @@
# CONFIG_STANDARD_SERIAL is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="nucleo-h753zi"
+CONFIG_ARCH_BOARD_COMMON=y
CONFIG_ARCH_BOARD_NUCLEO_H753ZI=y
CONFIG_ARCH_BUTTONS=y
CONFIG_ARCH_CHIP="stm32h7"
diff --git a/boards/arm/stm32h7/nucleo-h753zi/src/CMakeLists.txt b/boards/arm/stm32h7/nucleo-h753zi/src/CMakeLists.txt
index 8e61aeb5382..97d733a6280 100644
--- a/boards/arm/stm32h7/nucleo-h753zi/src/CMakeLists.txt
+++ b/boards/arm/stm32h7/nucleo-h753zi/src/CMakeLists.txt
@@ -48,10 +48,6 @@ if(CONFIG_SENSORS_QENCODER)
list(APPEND SRCS stm32_qencoder.c)
endif()
-if(CONFIG_BOARDCTL_RESET)
- list(APPEND SRCS stm32_reset.c)
-endif()
-
if(CONFIG_ARCH_BUTTONS)
list(APPEND SRCS stm32_buttons.c)
endif()
diff --git a/boards/arm/stm32h7/nucleo-h743zi2/src/Makefile b/boards/arm/stm32h7/nucleo-h753zi/src/Make.defs
similarity index 88%
rename from boards/arm/stm32h7/nucleo-h743zi2/src/Makefile
rename to boards/arm/stm32h7/nucleo-h753zi/src/Make.defs
index f05dd5b891c..9e33e8b9480 100644
--- a/boards/arm/stm32h7/nucleo-h743zi2/src/Makefile
+++ b/boards/arm/stm32h7/nucleo-h753zi/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/nucleo-h743zi2/src/Makefile
+# boards/arm/stm32h7/nucleo-h753zi/src/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -54,8 +54,6 @@ ifeq ($(CONFIG_SENSORS_QENCODER),y)
CSRCS += stm32_qencoder.c
endif
-ifeq ($(CONFIG_BOARDCTL_RESET),y)
-CSRCS += stm32_reset.c
-endif
-
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git a/boards/arm/stm32h7/nucleo-h753zi/src/stm32_reset.c b/boards/arm/stm32h7/nucleo-h753zi/src/stm32_reset.c
deleted file mode 100644
index 5eb902c30fc..00000000000
--- a/boards/arm/stm32h7/nucleo-h753zi/src/stm32_reset.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32h7/nucleo-h753zi/src/stm32_reset.c
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <nuttx/arch.h>
-#include <nuttx/board.h>
-
-#ifdef CONFIG_BOARDCTL_RESET
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_reset
- *
- * Description:
- * Reset board. Support for this function is required by board-level
- * logic if CONFIG_BOARDCTL_RESET is selected.
- *
- * Input Parameters:
- * status - Status information provided with the reset event. This
- * meaning of this status information is board-specific. If not
- * used by a board, the value zero may be provided in calls to
- * board_reset().
- *
- * Returned Value:
- * If this function returns, then it was not possible to power-off the
- * board due to some constraints. The return value int this case is a
- * board-specific reason for the failure to shutdown.
- *
- ****************************************************************************/
-
-int board_reset(int status)
-{
- up_systemreset();
- return 0;
-}
-
-#endif /* CONFIG_BOARDCTL_RESET */
diff --git a/boards/arm/stm32h7/openh743i/src/Makefile b/boards/arm/stm32h7/openh743i/src/Make.defs
similarity index 87%
rename from boards/arm/stm32h7/openh743i/src/Makefile
rename to boards/arm/stm32h7/openh743i/src/Make.defs
index c9f0115dbab..bd6094b33ab 100644
--- a/boards/arm/stm32h7/openh743i/src/Makefile
+++ b/boards/arm/stm32h7/openh743i/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/openh743i/src/Makefile
+# boards/arm/stm32h7/openh743i/src/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -42,4 +42,6 @@ ifeq ($(CONFIG_USBDEV_COMPOSITE),y)
CSRCS += stm32_composite.c
endif
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git a/boards/arm/stm32h7/portenta-h7/src/Makefile b/boards/arm/stm32h7/portenta-h7/src/Make.defs
similarity index 84%
rename from boards/arm/stm32h7/portenta-h7/src/Makefile
rename to boards/arm/stm32h7/portenta-h7/src/Make.defs
index adca38bed3e..90dbd171037 100644
--- a/boards/arm/stm32h7/portenta-h7/src/Makefile
+++ b/boards/arm/stm32h7/portenta-h7/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/portenta-h7/src/Makefile
+# boards/arm/stm32h7/portenta-h7/src/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -28,4 +28,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y)
CSRCS += stm32_autoleds.c
endif
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git a/boards/arm/stm32h7/stm32h745i-disco/src/CMakeLists.txt b/boards/arm/stm32h7/stm32h745i-disco/src/CMakeLists.txt
index bb605d54ac7..276181929cc 100644
--- a/boards/arm/stm32h7/stm32h745i-disco/src/CMakeLists.txt
+++ b/boards/arm/stm32h7/stm32h745i-disco/src/CMakeLists.txt
@@ -36,10 +36,6 @@ if(CONFIG_TESTING_OSTEST)
list(APPEND SRCS stm32_ostest.c)
endif()
-if(CONFIG_BOARDCTL_RESET)
- list(APPEND SRCS stm32_reset.c)
-endif()
-
if(CONFIG_INPUT_FT5X06)
list(APPEND SRCS stm32_ft5x06.c)
endif()
diff --git a/boards/arm/stm32h7/stm32h745i-disco/src/Makefile b/boards/arm/stm32h7/stm32h745i-disco/src/Make.defs
similarity index 87%
rename from boards/arm/stm32h7/stm32h745i-disco/src/Makefile
rename to boards/arm/stm32h7/stm32h745i-disco/src/Make.defs
index 13359572cb5..dfa13ad3ab2 100644
--- a/boards/arm/stm32h7/stm32h745i-disco/src/Makefile
+++ b/boards/arm/stm32h7/stm32h745i-disco/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/stm32h745i-disco/src/Makefile
+# boards/arm/stm32h7/stm32h745i-disco/src/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -38,10 +38,6 @@ ifeq ($(CONFIG_TESTING_OSTEST),y)
CSRCS += stm32_ostest.c
endif
-ifeq ($(CONFIG_BOARDCTL_RESET),y)
-CSRCS += stm32_reset.c
-endif
-
ifeq ($(CONFIG_INPUT_FT5X06),y)
CSRCS += stm32_ft5x06.c
endif
@@ -50,4 +46,6 @@ ifeq ($(CONFIG_STM32_LTDC),y)
CSRCS += stm32_lcd.c
endif
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git a/boards/arm/stm32h7/stm32h745i-disco/src/stm32_reset.c b/boards/arm/stm32h7/stm32h745i-disco/src/stm32_reset.c
deleted file mode 100644
index ed84aebc4db..00000000000
--- a/boards/arm/stm32h7/stm32h745i-disco/src/stm32_reset.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32h7/stm32h745i-disco/src/stm32_reset.c
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <nuttx/arch.h>
-#include <nuttx/board.h>
-
-#ifdef CONFIG_BOARDCTL_RESET
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_reset
- *
- * Description:
- * Reset board. Support for this function is required by board-level
- * logic if CONFIG_BOARDCTL_RESET is selected.
- *
- * Input Parameters:
- * status - Status information provided with the reset event. This
- * meaning of this status information is board-specific. If not
- * used by a board, the value zero may be provided in calls to
- * board_reset().
- *
- * Returned Value:
- * If this function returns, then it was not possible to power-off the
- * board due to some constraints. The return value int this case is a
- * board-specific reason for the failure to shutdown.
- *
- ****************************************************************************/
-
-int board_reset(int status)
-{
- up_systemreset();
- return 0;
-}
-
-#endif /* CONFIG_BOARDCTL_RESET */
diff --git a/boards/arm/stm32h7/stm32h747i-disco/src/Makefile b/boards/arm/stm32h7/stm32h747i-disco/src/Make.defs
similarity index 88%
rename from boards/arm/stm32h7/stm32h747i-disco/src/Makefile
rename to boards/arm/stm32h7/stm32h747i-disco/src/Make.defs
index 2f0eaeee20f..d25798a6cbe 100644
--- a/boards/arm/stm32h7/stm32h747i-disco/src/Makefile
+++ b/boards/arm/stm32h7/stm32h747i-disco/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/stm32h747i-disco/src/Makefile
+# boards/arm/stm32h7/stm32h747i-disco/src/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -58,4 +58,6 @@ ifeq ($(CONFIG_FAT_DMAMEMORY),y)
CSRCS += stm32_dma_alloc.c
endif
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git a/boards/arm/stm32h7/stm32h750b-dk/src/CMakeLists.txt b/boards/arm/stm32h7/stm32h750b-dk/src/CMakeLists.txt
index 4424e927661..1e00764ac9c 100644
--- a/boards/arm/stm32h7/stm32h750b-dk/src/CMakeLists.txt
+++ b/boards/arm/stm32h7/stm32h750b-dk/src/CMakeLists.txt
@@ -34,10 +34,6 @@ if(CONFIG_TESTING_OSTEST)
list(APPEND SRCS stm32_ostest.c)
endif()
-if(CONFIG_BOARDCTL_RESET)
- list(APPEND SRCS stm32_reset.c)
-endif()
-
if(CONFIG_INPUT_FT5X06)
list(APPEND SRCS stm32_ft5x06.c)
endif()
diff --git a/boards/arm/stm32h7/stm32h750b-dk/src/Makefile b/boards/arm/stm32h7/stm32h750b-dk/src/Make.defs
similarity index 87%
rename from boards/arm/stm32h7/stm32h750b-dk/src/Makefile
rename to boards/arm/stm32h7/stm32h750b-dk/src/Make.defs
index 942bfb9fd3e..4fc260f6b91 100644
--- a/boards/arm/stm32h7/stm32h750b-dk/src/Makefile
+++ b/boards/arm/stm32h7/stm32h750b-dk/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/stm32h750b-dk/src/Makefile
+# boards/arm/stm32h7/stm32h750b-dk/src/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -36,10 +36,6 @@ ifeq ($(CONFIG_TESTING_OSTEST),y)
CSRCS += stm32_ostest.c
endif
-ifeq ($(CONFIG_BOARDCTL_RESET),y)
-CSRCS += stm32_reset.c
-endif
-
ifeq ($(CONFIG_INPUT_FT5X06),y)
CSRCS += stm32_ft5x06.c
endif
@@ -48,4 +44,6 @@ ifeq ($(CONFIG_STM32_LTDC),y)
CSRCS += stm32_lcd.c
endif
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git a/boards/arm/stm32h7/stm32h750b-dk/src/stm32_reset.c b/boards/arm/stm32h7/stm32h750b-dk/src/stm32_reset.c
deleted file mode 100644
index 7bb3feed5f5..00000000000
--- a/boards/arm/stm32h7/stm32h750b-dk/src/stm32_reset.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
- * boards/arm/stm32h7/stm32h750b-dk/src/stm32_reset.c
- *
- * 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.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <nuttx/arch.h>
-#include <nuttx/board.h>
-
-#ifdef CONFIG_BOARDCTL_RESET
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_reset
- *
- * Description:
- * Reset board. Support for this function is required by board-level
- * logic if CONFIG_BOARDCTL_RESET is selected.
- *
- * Input Parameters:
- * status - Status information provided with the reset event. This
- * meaning of this status information is board-specific. If not
- * used by a board, the value zero may be provided in calls to
- * board_reset().
- *
- * Returned Value:
- * If this function returns, then it was not possible to power-off the
- * board due to some constraints. The return value int this case is a
- * board-specific reason for the failure to shutdown.
- *
- ****************************************************************************/
-
-int board_reset(int status)
-{
- up_systemreset();
- return 0;
-}
-
-#endif /* CONFIG_BOARDCTL_RESET */
diff --git a/boards/arm/stm32h7/weact-stm32h743/src/Makefile b/boards/arm/stm32h7/weact-stm32h743/src/Make.defs
similarity index 87%
rename from boards/arm/stm32h7/weact-stm32h743/src/Makefile
rename to boards/arm/stm32h7/weact-stm32h743/src/Make.defs
index 0bbd3d18694..4aac69d54d0 100644
--- a/boards/arm/stm32h7/weact-stm32h743/src/Makefile
+++ b/boards/arm/stm32h7/weact-stm32h743/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/weact-stm32h743/src/Makefile
+# boards/arm/stm32h7/weact-stm32h743/src/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -44,4 +44,6 @@ ifeq ($(CONFIG_FAT_DMAMEMORY),y)
CSRCS += stm32_dma_alloc.c
endif
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board
diff --git a/boards/arm/stm32h7/weact-stm32h750/src/Makefile b/boards/arm/stm32h7/weact-stm32h750/src/Make.defs
similarity index 87%
rename from boards/arm/stm32h7/weact-stm32h750/src/Makefile
rename to boards/arm/stm32h7/weact-stm32h750/src/Make.defs
index 083f46024de..b9296329d36 100644
--- a/boards/arm/stm32h7/weact-stm32h750/src/Makefile
+++ b/boards/arm/stm32h7/weact-stm32h750/src/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# boards/arm/stm32h7/weact-stm32h750/src/Makefile
+# boards/arm/stm32h7/weact-stm32h750/src/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -44,4 +44,6 @@ ifeq ($(CONFIG_FAT_DMAMEMORY),y)
CSRCS += stm32_dma_alloc.c
endif
-include $(TOPDIR)/boards/Board.mk
+DEPPATH += --dep-path board
+VPATH += :board
+CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board