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 8c0e52ed7d2f6bdc05814c11b911f133d5a40e3d
Author: ImBonkers <[email protected]>
AuthorDate: Sat May 16 15:40:03 2026 +0200

    boards/arm/stm32n6/nucleo-n657x0-q: Add Nucleo-N657X0-Q board support.
    
    Add board support for the STMicro Nucleo-N657X0-Q, sufficient to boot
    NSH over the on-board ST-LINK virtual COM port (USART1, 115200 8N1)
    in DEV (serial) boot mode.
    
    Two defconfigs are shipped:
    
      - nsh:    minimal NuttShell prompt.
      - ostest: nsh + apps/testing/ostest for RTOS smoke testing.
    
    Production signed XSPI flash boot is deferred to a follow-up; in DEV
    mode the image is loaded directly into AXISRAM at 0x34000400 by the
    host (e.g. STM32CubeProgrammer over ST-LINK), keeping the linker
    script trivial — .text/.rodata/.data/.bss/.heap all in AXISRAM.
    
    Signed-off-by: ImBonkers <[email protected]>
---
 boards/Kconfig                                     |  13 ++
 boards/arm/stm32n6/nucleo-n657x0-q/CMakeLists.txt  |  23 ++++
 boards/arm/stm32n6/nucleo-n657x0-q/Kconfig         |   8 ++
 .../stm32n6/nucleo-n657x0-q/configs/nsh/defconfig  |  32 +++++
 .../nucleo-n657x0-q/configs/ostest/defconfig       |  36 ++++++
 boards/arm/stm32n6/nucleo-n657x0-q/include/board.h | 133 +++++++++++++++++++++
 .../arm/stm32n6/nucleo-n657x0-q/scripts/Make.defs  |  40 +++++++
 .../arm/stm32n6/nucleo-n657x0-q/scripts/flash.ld   | 103 ++++++++++++++++
 .../arm/stm32n6/nucleo-n657x0-q/src/CMakeLists.txt |  27 +++++
 boards/arm/stm32n6/nucleo-n657x0-q/src/Makefile    |  28 +++++
 .../stm32n6/nucleo-n657x0-q/src/nucleo-n657x0-q.h  |  65 ++++++++++
 .../arm/stm32n6/nucleo-n657x0-q/src/stm32_boot.c   |  78 ++++++++++++
 .../stm32n6/nucleo-n657x0-q/src/stm32_bringup.c    |  58 +++++++++
 13 files changed, 644 insertions(+)

diff --git a/boards/Kconfig b/boards/Kconfig
index 50ee48cd991..c2c04276a9e 100644
--- a/boards/Kconfig
+++ b/boards/Kconfig
@@ -3153,6 +3153,15 @@ config ARCH_BOARD_NUCLEO_H563ZI
        ---help---
                STMicro Nucleo-H563ZI board based on the STMicro STM32H563ZI 
MCU.
 
+config ARCH_BOARD_NUCLEO_N657X0_Q
+       bool "NUCLEO_N657X0_Q"
+       depends on ARCH_CHIP_STM32N657X0
+       ---help---
+               STMicro Nucleo-N657X0-Q development board based on the STMicro
+               STM32N657X0 MCU (Cortex-M55).  Boots in DEV mode by loading
+               code directly into SRAM via the on-board ST-Link V3EC, with
+               the NSH console on USART1 (ST-Link Virtual COM Port).
+
 config ARCH_BOARD_STM32L562E_DK
        bool "STM32L562E-DK"
        depends on ARCH_CHIP_STM32L562QE
@@ -3926,6 +3935,7 @@ config ARCH_BOARD
        default "b-l475e-iot01a"               if ARCH_BOARD_B_L475E_IOT01A
        default "b-u585i-iot02a"               if ARCH_BOARD_B_U585I_IOT02A
        default "nucleo-h563zi"                if ARCH_BOARD_NUCLEO_H563ZI
+       default "nucleo-n657x0-q"              if ARCH_BOARD_NUCLEO_N657X0_Q
        default "nucleo-u5a5zj-q"              if ARCH_BOARD_NUCLEO_U5A5ZJ_Q
        default "stm32l476vg-disco"            if ARCH_BOARD_STM32L476VG_DISCO
        default "stm32l476-mdk"                if ARCH_BOARD_STM32L476_MDK
@@ -4578,6 +4588,9 @@ endif
 if ARCH_BOARD_NUCLEO_H563ZI
 source "boards/arm/stm32h5/nucleo-h563zi/Kconfig"
 endif
+if ARCH_BOARD_NUCLEO_N657X0_Q
+source "boards/arm/stm32n6/nucleo-n657x0-q/Kconfig"
+endif
 if ARCH_BOARD_STM32L562E_DK
 source "boards/arm/stm32l5/stm32l562e-dk/Kconfig"
 endif
diff --git a/boards/arm/stm32n6/nucleo-n657x0-q/CMakeLists.txt 
b/boards/arm/stm32n6/nucleo-n657x0-q/CMakeLists.txt
new file mode 100644
index 00000000000..ee687620d81
--- /dev/null
+++ b/boards/arm/stm32n6/nucleo-n657x0-q/CMakeLists.txt
@@ -0,0 +1,23 @@
+# 
##############################################################################
+# boards/arm/stm32n6/nucleo-n657x0-q/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/stm32n6/nucleo-n657x0-q/Kconfig 
b/boards/arm/stm32n6/nucleo-n657x0-q/Kconfig
new file mode 100644
index 00000000000..4a4f23f616e
--- /dev/null
+++ b/boards/arm/stm32n6/nucleo-n657x0-q/Kconfig
@@ -0,0 +1,8 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+if ARCH_BOARD_NUCLEO_N657X0_Q
+
+endif
diff --git a/boards/arm/stm32n6/nucleo-n657x0-q/configs/nsh/defconfig 
b/boards/arm/stm32n6/nucleo-n657x0-q/configs/nsh/defconfig
new file mode 100644
index 00000000000..f18c05e1d62
--- /dev/null
+++ b/boards/arm/stm32n6/nucleo-n657x0-q/configs/nsh/defconfig
@@ -0,0 +1,32 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="nucleo-n657x0-q"
+CONFIG_ARCH_BOARD_NUCLEO_N657X0_Q=y
+CONFIG_ARCH_CHIP="stm32n6"
+CONFIG_ARCH_CHIP_STM32N657X0=y
+CONFIG_ARCH_CHIP_STM32N6=y
+CONFIG_ARCH_INTERRUPTSTACK=4096
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_BOARD_LOOPSPERMSEC=21000
+CONFIG_BUILTIN=y
+CONFIG_HAVE_CXX=y
+CONFIG_HAVE_CXXINITIALIZE=y
+CONFIG_IDLETHREAD_STACKSIZE=4096
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_READLINE=y
+CONFIG_RAM_SIZE=4193280
+CONFIG_RAM_START=0x34000400
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_WAITPID=y
+CONFIG_STM32N6_USART1=y
+CONFIG_SYSTEM_NSH=y
+CONFIG_USART1_SERIAL_CONSOLE=y
diff --git a/boards/arm/stm32n6/nucleo-n657x0-q/configs/ostest/defconfig 
b/boards/arm/stm32n6/nucleo-n657x0-q/configs/ostest/defconfig
new file mode 100644
index 00000000000..9e14513b6c7
--- /dev/null
+++ b/boards/arm/stm32n6/nucleo-n657x0-q/configs/ostest/defconfig
@@ -0,0 +1,36 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="nucleo-n657x0-q"
+CONFIG_ARCH_BOARD_NUCLEO_N657X0_Q=y
+CONFIG_ARCH_CHIP="stm32n6"
+CONFIG_ARCH_CHIP_STM32N657X0=y
+CONFIG_ARCH_CHIP_STM32N6=y
+CONFIG_ARCH_INTERRUPTSTACK=4096
+CONFIG_ARCH_STACKDUMP=y
+CONFIG_BOARD_LOOPSPERMSEC=21000
+CONFIG_BUILTIN=y
+CONFIG_HAVE_CXX=y
+CONFIG_HAVE_CXXINITIALIZE=y
+CONFIG_IDLETHREAD_STACKSIZE=4096
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_READLINE=y
+CONFIG_PREALLOC_CHILDSTATUS=2
+CONFIG_RAM_SIZE=4193280
+CONFIG_RAM_START=0x34000400
+CONFIG_RAW_BINARY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_CHILD_STATUS=y
+CONFIG_SCHED_HAVE_PARENT=y
+CONFIG_SCHED_WAITPID=y
+CONFIG_STM32N6_USART1=y
+CONFIG_SYSTEM_NSH=y
+CONFIG_TESTING_OSTEST=y
+CONFIG_USART1_SERIAL_CONSOLE=y
diff --git a/boards/arm/stm32n6/nucleo-n657x0-q/include/board.h 
b/boards/arm/stm32n6/nucleo-n657x0-q/include/board.h
new file mode 100644
index 00000000000..0dfe61e2af1
--- /dev/null
+++ b/boards/arm/stm32n6/nucleo-n657x0-q/include/board.h
@@ -0,0 +1,133 @@
+/****************************************************************************
+ * boards/arm/stm32n6/nucleo-n657x0-q/include/board.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_STM32N6_NUCLEO_N657X0_Q_INCLUDE_BOARD_H
+#define __BOARDS_ARM_STM32N6_NUCLEO_N657X0_Q_INCLUDE_BOARD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#ifndef __ASSEMBLY__
+#  include <stdint.h>
+#endif
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Clocking *****************************************************************/
+
+/* Clock tree (single PLL1 fed from the internal HSI):
+ *
+ *   HSI 64 MHz / M=4 * N=50 = 800 MHz VCO
+ *     IC1  /4 = 200 MHz  -> CPU clock (CPUSW)
+ *     IC2  /8 = 100 MHz  \
+ *     IC6 /12 = 66.7 MHz  > SYSCLK components (SYSSW IC2_IC6_IC11)
+ *     IC11 /8 = 100 MHz  /
+ *   HPRE /2  = 50 MHz   -> HCLK
+ *   PPRE1 /1 = 50 MHz   -> PCLK1
+ *   PPRE2 /1 = 50 MHz   -> PCLK2
+ *
+ * Works with the default VOS SCALE1, no SMPS overdrive required.  Higher
+ * CPU frequencies (600/800 MHz) are deferred to a follow-up.
+ */
+
+#define STM32_HSI_FREQUENCY     64000000ul
+
+#define STM32_PLL1_M            4
+#define STM32_PLL1_N            50
+#define STM32_PLL1_IC1_DIV      4
+
+#define STM32_CPUCLK_FREQUENCY  200000000ul
+#define STM32_SYSCLK_FREQUENCY  (STM32_CPUCLK_FREQUENCY / 2)
+#define STM32_HCLK_FREQUENCY    (STM32_CPUCLK_FREQUENCY / 4)
+#define STM32_PCLK1_FREQUENCY   STM32_HCLK_FREQUENCY
+#define STM32_PCLK2_FREQUENCY   STM32_HCLK_FREQUENCY
+
+/* Timer input clock = SYSCLK (TIMPRE=0 default) */
+
+#define STM32_APB1_TIM_FREQUENCY STM32_SYSCLK_FREQUENCY
+#define STM32_APB2_TIM_FREQUENCY STM32_SYSCLK_FREQUENCY
+
+/* I/O voltage domains ******************************************************/
+
+/* GPIO port E (USART1 TX/RX on PE5/PE6) is on the VddIO2 and VddIO3
+ * domains; both are wired to the board's 1.8 V rail.  This mask is
+ * applied to PWR_SVMCR3 early in boot to mark the supplies valid and
+ * select their 1.8 V range.
+ */
+
+#define BOARD_PWR_VDDIO  (PWR_SVMCR3_VDDIO2SV    | PWR_SVMCR3_VDDIO3SV | \
+                          PWR_SVMCR3_VDDIO2VRSEL | PWR_SVMCR3_VDDIO3VRSEL)
+
+/* Alternate function pin selections ****************************************/
+
+/* USART1 GPIOs *************************************************************/
+
+/* USART1 (Nucleo Virtual Console): PE5=TX (AF7), PE6=RX (AF7)
+ * Connected to the on-board ST-Link to provide a Virtual COM Port.
+ */
+
+#define GPIO_USART1_TX   GPIO_USART1_TX_1
+#define GPIO_USART1_RX   GPIO_USART1_RX_1
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+#undef EXTERN
+#if defined(__cplusplus)
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: stm32_board_initialize
+ *
+ * Description:
+ *   All STM32N6 architectures must provide the following entry point.
+ *   This entry point is called early in the initialization -- after all
+ *   memory has been configured and mapped but before any devices
+ *   have been initialized.
+ *
+ ****************************************************************************/
+
+void stm32_board_initialize(void);
+
+#undef EXTERN
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* __ASSEMBLY__ */
+#endif /* __BOARDS_ARM_STM32N6_NUCLEO_N657X0_Q_INCLUDE_BOARD_H */
diff --git a/boards/arm/stm32n6/nucleo-n657x0-q/scripts/Make.defs 
b/boards/arm/stm32n6/nucleo-n657x0-q/scripts/Make.defs
new file mode 100644
index 00000000000..1fc88627691
--- /dev/null
+++ b/boards/arm/stm32n6/nucleo-n657x0-q/scripts/Make.defs
@@ -0,0 +1,40 @@
+##############################################################################
+# boards/arm/stm32n6/nucleo-n657x0-q/scripts/Make.defs
+#
+# 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.
+#
+##############################################################################
+
+include ${TOPDIR}/.config
+include ${TOPDIR}/tools/Config.mk
+include ${TOPDIR}/arch/arm/src/armv8-m/Toolchain.defs
+
+ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)flash.ld
+
+ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
+
+CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) 
$(ARCHDEFINES) $(EXTRAFLAGS)
+CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
+CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) 
$(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
+CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
+CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
+AFLAGS := $(CFLAGS) -D__ASSEMBLY__
+
+NXFLATLDFLAGS1 = -r -d -warn-common
+NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) 
-T$(TOPDIR)$(DELIM)binfmt$(DELIM)libnxflat$(DELIM)gnu-nxflat-pcrel.ld 
-no-check-sections
+LDNXFLATFLAGS = -e main -s 2048
diff --git a/boards/arm/stm32n6/nucleo-n657x0-q/scripts/flash.ld 
b/boards/arm/stm32n6/nucleo-n657x0-q/scripts/flash.ld
new file mode 100644
index 00000000000..97e9d927e7e
--- /dev/null
+++ b/boards/arm/stm32n6/nucleo-n657x0-q/scripts/flash.ld
@@ -0,0 +1,103 @@
+/****************************************************************************
+ * boards/arm/stm32n6/nucleo-n657x0-q/scripts/flash.ld
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+/* The STM32N657X0 has no internal flash.  In DEV boot mode, code is loaded
+ * directly into SRAM by the ST-Link debugger at 0x34000400.  The first
+ * 1 KiB of SRAM is reserved for the boot ROM header.
+ */
+
+MEMORY
+{
+    sram (rwx) : ORIGIN = 0x34000400, LENGTH = 4193280
+}
+
+OUTPUT_ARCH(arm)
+ENTRY(_stext)
+SECTIONS
+{
+    .text : {
+        _stext = ABSOLUTE(.);
+        *(.vectors)
+        *(.text .text.*)
+        *(.fixup)
+        *(.gnu.warning)
+        *(.rodata .rodata.*)
+        *(.gnu.linkonce.t.*)
+        *(.glue_7)
+        *(.glue_7t)
+        *(.got)
+        *(.gcc_except_table)
+        *(.gnu.linkonce.r.*)
+        _etext = ABSOLUTE(.);
+    } > sram
+
+    .init_section : {
+        _sinit = ABSOLUTE(.);
+        KEEP(*(SORT_BY_INIT_PRIORITY(.init_array.*) 
SORT_BY_INIT_PRIORITY(.ctors.*)))
+        KEEP(*(.init_array EXCLUDE_FILE(*crtbegin.o *crtbegin?.o *crtend.o 
*crtend?.o) .ctors))
+        _einit = ABSOLUTE(.);
+    } > sram
+
+    .ARM.extab : {
+        *(.ARM.extab*)
+    } > sram
+
+    __exidx_start = ABSOLUTE(.);
+    .ARM.exidx : {
+        *(.ARM.exidx*)
+    } > sram
+    __exidx_end = ABSOLUTE(.);
+
+    .data : {
+        _eronly = ABSOLUTE(.);
+        _sdata = ABSOLUTE(.);
+        *(.data .data.*)
+        *(.gnu.linkonce.d.*)
+        CONSTRUCTORS
+        . = ALIGN(4);
+        _edata = ABSOLUTE(.);
+    } > sram
+
+    .bss : {
+        _sbss = ABSOLUTE(.);
+        *(.bss .bss.*)
+        *(.gnu.linkonce.b.*)
+        *(COMMON)
+        . = ALIGN(4);
+        _ebss = ABSOLUTE(.);
+    } > sram
+
+    /* Stabs debugging sections. */
+
+    .stab 0 : { *(.stab) }
+    .stabstr 0 : { *(.stabstr) }
+    .stab.excl 0 : { *(.stab.excl) }
+    .stab.exclstr 0 : { *(.stab.exclstr) }
+    .stab.index 0 : { *(.stab.index) }
+    .stab.indexstr 0 : { *(.stab.indexstr) }
+    .comment 0 : { *(.comment) }
+    .debug_abbrev 0 : { *(.debug_abbrev) }
+    .debug_info 0 : { *(.debug_info) }
+    .debug_line 0 : { *(.debug_line) }
+    .debug_pubnames 0 : { *(.debug_pubnames) }
+    .debug_aranges 0 : { *(.debug_aranges) }
+}
diff --git a/boards/arm/stm32n6/nucleo-n657x0-q/src/CMakeLists.txt 
b/boards/arm/stm32n6/nucleo-n657x0-q/src/CMakeLists.txt
new file mode 100644
index 00000000000..0146628e33d
--- /dev/null
+++ b/boards/arm/stm32n6/nucleo-n657x0-q/src/CMakeLists.txt
@@ -0,0 +1,27 @@
+# 
##############################################################################
+# boards/arm/stm32n6/nucleo-n657x0-q/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)
+
+target_sources(board PRIVATE ${SRCS})
+
+set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld")
diff --git a/boards/arm/stm32n6/nucleo-n657x0-q/src/Makefile 
b/boards/arm/stm32n6/nucleo-n657x0-q/src/Makefile
new file mode 100644
index 00000000000..6bcfb95b605
--- /dev/null
+++ b/boards/arm/stm32n6/nucleo-n657x0-q/src/Makefile
@@ -0,0 +1,28 @@
+##############################################################################
+# boards/arm/stm32n6/nucleo-n657x0-q/src/Makefile
+#
+# 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.
+#
+##############################################################################
+
+-include $(TOPDIR)/Make.defs
+
+ASRCS =
+CSRCS = stm32_boot.c stm32_bringup.c
+
+include $(TOPDIR)/boards/Board.mk
diff --git a/boards/arm/stm32n6/nucleo-n657x0-q/src/nucleo-n657x0-q.h 
b/boards/arm/stm32n6/nucleo-n657x0-q/src/nucleo-n657x0-q.h
new file mode 100644
index 00000000000..99c6e3e5476
--- /dev/null
+++ b/boards/arm/stm32n6/nucleo-n657x0-q/src/nucleo-n657x0-q.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+ * boards/arm/stm32n6/nucleo-n657x0-q/src/nucleo-n657x0-q.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_STM32N6_NUCLEO_N657X0_Q_SRC_NUCLEO_N657X0_Q_H
+#define __BOARDS_ARM_STM32N6_NUCLEO_N657X0_Q_SRC_NUCLEO_N657X0_Q_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <nuttx/compiler.h>
+#include <stdint.h>
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: stm32_bringup
+ *
+ * Description:
+ *   Perform architecture-specific initialization
+ *
+ *   CONFIG_BOARD_LATE_INITIALIZE=y :
+ *     Called from board_late_initialize().
+ *
+ *   CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y :
+ *     Called from the NSH library
+ *
+ ****************************************************************************/
+
+int stm32_bringup(void);
+
+#endif /* __ASSEMBLY__ */
+#endif /* __BOARDS_ARM_STM32N6_NUCLEO_N657X0_Q_SRC_NUCLEO_N657X0_Q_H */
diff --git a/boards/arm/stm32n6/nucleo-n657x0-q/src/stm32_boot.c 
b/boards/arm/stm32n6/nucleo-n657x0-q/src/stm32_boot.c
new file mode 100644
index 00000000000..6bb40b35dc5
--- /dev/null
+++ b/boards/arm/stm32n6/nucleo-n657x0-q/src/stm32_boot.c
@@ -0,0 +1,78 @@
+/****************************************************************************
+ * boards/arm/stm32n6/nucleo-n657x0-q/src/stm32_boot.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 <debug.h>
+
+#include <nuttx/board.h>
+
+#include "arm_internal.h"
+#include "nucleo-n657x0-q.h"
+
+#include <arch/board/board.h>
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: stm32_board_initialize
+ *
+ * Description:
+ *   All STM32 architectures must provide the following entry point.  This
+ *   entry point is called early in the initialization -- after all memory
+ *   has been configured and mapped but before any devices have been
+ *   initialized.
+ *
+ ****************************************************************************/
+
+void stm32_board_initialize(void)
+{
+}
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize().  board_late_initialize() will
+ *   be called immediately after up_initialize() is called and just before
+ *   the initial application is started.  This additional initialization
+ *   phase may be used, for example, to initialize board-specific device
+ *   drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
+{
+  /* Perform board-specific initialization here if so configured */
+
+  stm32_bringup();
+}
+#endif
diff --git a/boards/arm/stm32n6/nucleo-n657x0-q/src/stm32_bringup.c 
b/boards/arm/stm32n6/nucleo-n657x0-q/src/stm32_bringup.c
new file mode 100644
index 00000000000..fb6f9999957
--- /dev/null
+++ b/boards/arm/stm32n6/nucleo-n657x0-q/src/stm32_bringup.c
@@ -0,0 +1,58 @@
+/****************************************************************************
+ * boards/arm/stm32n6/nucleo-n657x0-q/src/stm32_bringup.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 <debug.h>
+
+#include <nuttx/board.h>
+
+#include "nucleo-n657x0-q.h"
+
+#include <arch/board/board.h>
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: stm32_bringup
+ *
+ * Description:
+ *   Perform architecture-specific initialization
+ *
+ *   CONFIG_BOARD_LATE_INITIALIZE=y :
+ *     Called from board_late_initialize().
+ *
+ *   CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y :
+ *     Called from the NSH library
+ *
+ ****************************************************************************/
+
+int stm32_bringup(void)
+{
+  return OK;
+}

Reply via email to