Skip to content

Commit 197e372

Browse files
committed
WIP
1 parent 8d35d59 commit 197e372

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
========================================================
2+
Building NuttX with Applications Outside the Source Tree
3+
========================================================
4+
5+
Q:
6+
Has anyone come up with a tidy way to build NuttX with board-specific pieces
7+
outside the source tree?
8+
9+
A:
10+
Here are four approaches:
11+
12+
1. Make export
13+
--------------
14+
15+
There is a make target called ``make export``. It will build NuttX, then bundle
16+
all of the header files, libraries, startup objects, and other build components
17+
into a ``.zip`` file. You can move that ``.zip`` file into any build environment
18+
you want. You can even build NuttX under a DOS CMD window.
19+
20+
This make target is documented in the top-level ``nuttx/README.txt``.
21+
22+
2. Replace the apps/ Directory
23+
------------------------------
24+
25+
You can replace the entire ``apps/`` directory. It is not a critical part of the
26+
OS. The ``apps/`` is simply provided for you to help with your application
27+
development. It should not dictate anything that you do.
28+
29+
To use a different ``apps`` directory, simply execute ``make menuconfig`` in the
30+
top-level ``nuttx/`` directory and redefine ``CONFIG_APPS_DIR`` in your
31+
``.config`` file so that it points to a different, custom application directory.
32+
Note that ``CONFIG_APPS_DIR`` is a relative path from the top-level
33+
``nuttx/`` directory.
34+
35+
You can copy any pieces that you like from the old ``apps/`` directory to your
36+
custom ``apps`` directory as necessary. This is documented in
37+
``nuttx/boards/README.txt``, in the "NuttX Porting Guide" and "Build options,"
38+
and in the ``apps/README.txt`` file.
39+
40+
3. Extend the apps/ Directory
41+
-----------------------------
42+
43+
If you like the random collection of stuff in the ``apps/`` directory but just
44+
want to expand the existing components with your own, external sub-directory,
45+
then there is an easy way to do that too: Create a symbolic link in the
46+
``apps/`` directory that redirects to your application sub-directory (or copy
47+
your code into a sub-directory of ``apps/``).
48+
49+
Makefile and Make.defs
50+
^^^^^^^^^^^^^^^^^^^^^^
51+
52+
In order to be incorporated into the build, the directory that you link under
53+
the ``apps

Documentation/guides/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,5 @@ Guides
5959
port.rst
6060
updating_release_system_elf.rst
6161
partially_linked_elf.rst
62-
fully_linked_elf.rst
62+
fully_linked_elf.rst
63+
building_nuttx_with_app_out_of_src_tree.rst

0 commit comments

Comments
 (0)