Apache NuttX is a very configurable operating system. Nearly all features can be configured in or out of the system. This makes it possible to compile a build tailored for your hardware and application. It also makes configuring the system complex at times.
There is a configuration system that can be used on the commandline or in a GUI. I’ve found
the easiest way to configured Apache NuttX is to use the
menuconfig system. This is used
via a terminal program and allows quick access to all of Apache NuttX’s features via a system of
After you’ve configured your board (see Compiling), you can use the menuconfig system to change the configuration. Once you’ve configured, you can compile to make a build that has your configuration options selected.
Initialize Board Configuration
Here we’ll use the simulator since that’s the simplest to explain. You can do this with any board and base configuration. Note here you should be supplying configure.sh the correct flag for your build environment:
-l selects the Linux (l) host environment. -m selects the macOS (m) host environment. -c selects the Windows host and Cygwin (c) environment. -g selects the Windows host and MinGW/MSYS environment. -n selects the Windows host and Windows native (n) environment.
Select the simulator configuration for a Linux host:
$ cd nuttx $ make distclean # make a clean start, clearing out old configurations $ ./tools/configure.sh -l sim:nsh Copy files Select CONFIG_HOST_LINUX=y Refreshing...
$ make clean; make $ ./nuttx login:
From another terminal window, kill the simulator:
$ pkill nuttx
login:is annyoing. Let’s use the
menuconfigsystem to turn it off.
$ make menuconfig
Here’s what you should see:
The NSH Login setting is under
Application Configuration > NSH Library. Use the up and down arrows to navigate to
Application Configuration; hit
<return>to select it. Now you’re in the
Application Configurationmenu. Use the arrows to go down to
NSH Libraryand select that. Now navigate down to
Console Loginand use the spacebar to uncheck that setting (so that it has a blank space instead of a star in it).
Now let’s save. Use the right and left arrow keys to select the
Exitmenu item at the bottom of the screen. Hit
<return>to select it, hit
<return>again, and again, finally hitting
Save Configurationdialog box.
Make the New Configuration
$ make clean; make
$ ./nuttx NuttShell (NSH) NuttX-8.2 MOTD: username=admin password=Administrator
If you find that message of the day (MOTD) annoying and want to turn that off, it’s configured in
Application Configuration > NSH Library >> Message of the Day (MOTD).
Next up is Debugging.