Zephyr application
Now that Zephyr has been installed, we will be able to write our first application. Rather than using a real board, we will start by using a PC emulator.
Anatomy of an application
Our Zephyr applications will be freestanding. It means that we will keep our application code outside Zephyr source tree in order to only keep the application in our git repository.
A freestanding Zephyr application will make use of several directories:
- The virtual Python environment in which we have installed
west
and the required Python libraries. - The Zephyr source code and its associated libraries. In order to use
west
, we will set theZEPHYR_BASE
environment variable to point at it. - Your application source code, which you will create in your git repository.
- A build directory: Zephyr applications are built out of tree. It means that the build process will never mix the source code with the build artifacts. If your build directory is named
build
, you can remove it at any time in order to free up some disk space.