This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 78ebd3b3c92a37c16cfe01367df865b4531b5c12 Author: raiden00pl <[email protected]> AuthorDate: Mon Oct 12 09:20:10 2026 +0200 Documentation/guides: add STM32 Nucleo standard draft Add the initial STM32 Nucleo standard page. It describes the common board initialization shared by all Nucleo boards and the rules for using it. Signed-off-by: raiden00pl <[email protected]> Assisted-by: Claude Code --- .../guides/chip-specific/stm32_nucleo.rst | 55 ++++++++++++++++++++++ Documentation/guides/index.rst | 1 + 2 files changed, 56 insertions(+) diff --git a/Documentation/guides/chip-specific/stm32_nucleo.rst b/Documentation/guides/chip-specific/stm32_nucleo.rst new file mode 100644 index 00000000000..5d895711bac --- /dev/null +++ b/Documentation/guides/chip-specific/stm32_nucleo.rst @@ -0,0 +1,55 @@ +===================== +STM32 Nucleo standard +===================== + +Status: draft, see `issue 19296 +<https://github.com/apache/nuttx/issues/19296>`_. + +This page collects the rules that all STM32 Nucleo boards in NuttX follow. +It starts with the common board initialization and grows as more of the +board logic becomes shared. + +Common board initialization +=========================== + +Initialization that does not depend on the board lives in +``boards/arm/common/stm32/src/board_common.c``. It is part of the common +STM32 board logic (``CONFIG_ARCH_BOARD_COMMON``), which every Nucleo board +selects, and provides one function: + +.. code-block:: c + + #include "board_common.h" + + int stm32_common_initialize(void); + +Every Nucleo board calls ``stm32_common_initialize()`` early in its +bringup, in ``stm32_bringup()`` or, if the board has none, in +``board_late_initialize()``. A failure is logged and the bringup continues. + +The function currently handles: + +========= ================================== ================================ +Feature Enabled by Result +========= ================================== ================================ +procfs ``CONFIG_FS_PROCFS`` mounted at + ``CONFIG_NSH_PROC_MOUNTPOINT`` + or ``/proc`` +tmpfs ``CONFIG_FS_TMPFS`` mounted at + ``CONFIG_LIBC_TMPDIR`` +IWDG ``CONFIG_STM32_IWDG`` ``/dev/watchdog0`` +WWDG ``CONFIG_STM32_WWDG`` ``/dev/watchdog1`` +CAN ``CONFIG_STM32_CAN_CHARDRIVER`` ``/dev/can0``, ``/dev/can1``, + ``CONFIG_STM32_FDCAN_CHARDRIVER`` ... in instance order +SocketCAN ``CONFIG_STM32_CAN_SOCKET`` interfaces for all enabled + ``CONFIG_STM32_FDCAN_SOCKET`` instances +========= ================================== ================================ + +The file systems are not mounted when ``CONFIG_DISABLE_MOUNTPOINT`` is +set. The IWDG uses ``STM32_LSI_FREQUENCY`` from the board ``board.h``. + +Rules for boards: + +- Do not repeat any of the features above in the board directory. +- Board-independent initialization is added to + ``stm32_common_initialize()``, not to individual boards. diff --git a/Documentation/guides/index.rst b/Documentation/guides/index.rst index 0f52ddac8aa..e8ec1594b5a 100644 --- a/Documentation/guides/index.rst +++ b/Documentation/guides/index.rst @@ -108,6 +108,7 @@ Guides chip-specific/port_drivers_to_stm32f7.rst chip-specific/semihosting.rst chip-specific/smaller_vector_tables.rst + chip-specific/stm32_nucleo.rst chip-specific/stm32_ports.rst chip-specific/stm32ccm.rst chip-specific/stm32nullpointer.rst
