This is an automated email from the ASF dual-hosted git repository. linguini pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit c568a348f5a4c78fb3f818b1988f12218526daca Author: Kerogit <[email protected]> AuthorDate: Sat Feb 28 14:02:58 2026 +0100 Documentation/guides/customboards: add example minimal defconfig file This patch adds defconfig example to The Custom Boards How-To guide. The command specified in this guide which runs configure script fails if the defconfig file does not exists; the guide did not mention this file at all. If the file exists but is empty, the configure script fails and leaves the system in a broken state which is somewhat difficult to deal with. (Subsequent attempts to configure fail but so do attempts to distclean.) To resolve this, this patch adds a minimal defconfig example which should be sufficient for the configure script to do its work correctly. Signed-off-by: Kerogit <[email protected]> --- Documentation/guides/customboards.rst | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/Documentation/guides/customboards.rst b/Documentation/guides/customboards.rst index 8a8dacedbab..b8624426a5e 100644 --- a/Documentation/guides/customboards.rst +++ b/Documentation/guides/customboards.rst @@ -41,8 +41,38 @@ In this example, the files are assumed to exist in: MyCustomConfig $ - -To build the custom board, the syntax is slightly different to in-tree boards and configs: +At this stage, the contents of the files is not important. The notable exception to this +is file named ``defconfig``, which is stored in the directory ``MyCustomConfig`` (see +the listing above.) + +This file is autogenerated and should not be edited manually. However, it should also +not be copied blindly from an existing board as the values within are incorrect +for the custom board. This causes an issue because the configure script called below +is supposed to create some symbolic links in the NuttX source tree and it is using +the contents of the ``defconfig`` file for that. Since the file does not exist, +configure script will fail which prevents the user from creating the ``defconfig`` +file automatically. + +As a workaround, a minimal ``defconfig`` file needs to be provided. See an example +for AVR architecture: + + .. code-block:: kconfig + + CONFIG_ARCH="avr" + CONFIG_ARCH_AVR=y + CONFIG_ARCH_BOARD_CUSTOM=y + CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y + CONFIG_ARCH_BOARD_CUSTOM_DIR="../CustomBoards/MyCustomBoardName/" + CONFIG_ARCH_BOARD_CUSTOM_NAME="MyCustomBoardName" + CONFIG_ARCH_CHIP="avrdx" + +This minimal file should be sufficient for the configure script to succeed. Additional +changes can be made using ``make menuconfig`` and proper ``defconfig`` file can then +be generated using ``make savedefconfig``. + +To build the custom board, alter the contents of the example above to fit your +architecture and chip, then use this syntax, which is slightly different +from in-tree boards and configs: .. code-block:: console
