More Kconfig Awesomeness For Windows

In “Building NuttX, In Ubuntu, From Scratch“, we showed briefly how to use “make menuconfig” to launch NuttX configuration. Lots goes on behind the scenes to make that work.

The process of building the Linux kernel has two parts: configuring the kernel options and building the source with those options (see a nice article in Linux Journal for more basics).  Since Linux kernel 2.5 (roughly 2003), a language called Kconfig has been used to describe the kernel’s configuration options, and the relationship and dependencies between those options. NuttX is no different, in that sense – it also uses Kconfig to manage its configuration options.

To start configuring the kernel, one commonly launches an Ncurses-based configurator tool with:

make menuconfig

In NuttX’s case, this ‘make’ performs several steps to prepare the subdirectories for configuration, and then launches a tool called kconfig-mconf.

Example of NuttX configuration menu.

Kconfig-mconf shown running in Windows 10 PowerShell on the main NuttX configuration menu.

Kconfig-mconf is part of a lovely project called kconfig-frontends, which is intended to split out the Linux configuration tools into standalone tools, so that other projects can use them and benefit from some degree of commonality.  NuttX, in fact, requires at least three of these tools:

  1. kconfig-conf: Command-line and text-mode configuration tool that is used by NuttX to reduce board-specific configurations to just their non-default options (defconfig files), to make the configs smaller and more human-readable
  2. kconfig-mconf: Ncurses-based menu configuration tool, that lets us interactively set options, and provides easy ways to navigate and search through the configuration tree
  3. kconfig-tweak: Command-line script used by NuttX to force options on or off early in the configuration process, to set the proper build platform for use by the makefiles

When building NuttX natively in Windows (i.e. without POSIX-like helpers such as Cygwin, MSYS, or Windows 10 Subsystem for Linux), NuttX makefiles expect those three kconfig tools to be somewhere in the system PATH.

UVC Ingenieure made an excellent start by figuring out how to build kconfig-mconf.exe for Win32 platforms.  Reclone Labs has started a GitHub fork of their work, adding CMake build support for kconfig-conf.exe and a functional draft of kconfig-tweak.bat.

In an upcoming post, we’ll present complete steps for building NuttX in Windows (requiring these tools).

The latest release executables can be downloaded from:


Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on RedditEmail this to someonePrint this page

Leave a Reply

Your email address will not be published. Required fields are marked *