2022-10-12 17:53:04 +02:00
|
|
|
====================
|
|
|
|
Custom Boards How-To
|
|
|
|
====================
|
|
|
|
|
|
|
|
As explained in :doc:`../quickstart/configuring`, supported boards (also known
|
|
|
|
as "in-tree" boards) are configured using a standard syntax:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
$ cd nuttx
|
|
|
|
$ ./tools/configure.sh -l board-name:config-name
|
|
|
|
Copy files
|
|
|
|
Select CONFIG_HOST_LINUX=y
|
|
|
|
Refreshing...
|
|
|
|
|
|
|
|
Sometimes it is not appropriate, or not wanted, to add a new or custom board to
|
2022-10-13 12:01:04 +02:00
|
|
|
the NuttX boards tree itself. If so, the board can be defined out-of-tree in a
|
2022-10-12 17:53:04 +02:00
|
|
|
custom directory and still be built easily.
|
|
|
|
|
|
|
|
Add a Custom Board
|
2023-10-29 16:40:32 +01:00
|
|
|
==================
|
2022-10-12 17:53:04 +02:00
|
|
|
|
|
|
|
The same set of files as provided for in-tree boards is required (i.e. configs,
|
|
|
|
Kconfig, scripts, etc.) but these can be placed in a directory of your choice.
|
|
|
|
|
|
|
|
In this example, the files are assumed to exist in:
|
2022-10-13 12:01:04 +02:00
|
|
|
``../nuttx/CustomBoards/MyCustomBoardName``
|
2022-10-12 17:53:04 +02:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
|
|
|
$pwd
|
|
|
|
/home/nuttx/nuttx
|
|
|
|
$ ls -1 ../CustomBoards/MyCustomBoardName
|
|
|
|
configs
|
|
|
|
helpers
|
|
|
|
include
|
|
|
|
Kconfig
|
|
|
|
scripts
|
|
|
|
$ ls ../CustomBoards/MyCustomBoardName/configs
|
|
|
|
nsh
|
|
|
|
MyCustomConfig
|
|
|
|
$
|
|
|
|
|
|
|
|
|
|
|
|
To build the custom board, the syntax is slightly different to in-tree boards and configs:
|
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2024-04-04 16:20:37 +02:00
|
|
|
$ .tools/configure -l ../CustomBoards/MyCustomBoardName/configs/MyCustomConfig
|
2022-10-12 17:53:04 +02:00
|
|
|
Copy files
|
|
|
|
Select CONFIG_HOST_LINUX=y
|
|
|
|
Refreshing...
|
|
|
|
|
|
|
|
Kconfig Settings
|
2023-10-29 16:40:32 +01:00
|
|
|
================
|
2022-10-12 17:53:04 +02:00
|
|
|
|
|
|
|
Once the board is configured, to ensure subsequent builds run correctly, there
|
|
|
|
are two Kconfig settings that need to be set. These are:
|
|
|
|
|
|
|
|
:menuselection:`Board Selection --> Custom Board Configuration --> Custom Board Name`
|
|
|
|
|
|
|
|
:menuselection:`Board Selection --> Custom Board Configuration --> Relative custom board directory`
|
|
|
|
|
|
|
|
They should be set to suit your board name and directory location.
|
|
|
|
|
|
|
|
.. Note::
|
|
|
|
If you subsequently run a ``make distclean`` operation, then these settings will be lost.
|
|
|
|
They should be added back before building, and/or before running ``make menuconfig``.
|