Application Fundamentals

A Zephyr application is defined by creating a directory containing the following files.

  • Application source code files: An application typically provides one or more application-specific files, written in C or assembly language. These files are usually located in a sub-directory called src.

  • Kernel configuration files: An application typically provides a configuration file (.conf) that specifies values for one or more kernel configuration options. If omitted, the application’s existing kernel configuration option values are used; if no existing values are provided, the kernel’s default configuration values are used.

    A microkernel application typically provides an additional Microkernel Definitions File under the extension .mdef. This file defines all of the system’s public microkernel objects. This file is not used with a nanokernel-only application.

  • Makefile: This file typically contains a handful of lines that tell the build system where to find the files mentioned above, as well as the desired target board configuration and kernel type (either microkernel or nanokernel).

Once the application has been defined, it can be built with a single command. The results of the build process, including the final application image, are located in a sub-directory called outdir.

For additional information see: