Building an application for the Icarus
Building an application for the Icarus can be done in multiple ways. This guide explains how to build one of the Icarus sample applications using VS code and West. West is the meta-tool of the Zephyr RTOS and is used, in combination with the Ninja build tool, by VS code when building an application for the nRF9160.
Building an application using VS code nRF Connect SDK extension
Building and application through VS code is a straightforward and easy process. The nRF connect SDK expansion pack for VS code includes tools for configuration, building, debugging and flashing code. These steps show how to build a sample application for the Icarus in VS code.
Building the application:
- Choose and download an Icarus sample application from the samples section.
- Open VS Code and click on the nRF connect icon in the left sidebar.
- Click on Add an existing application and navigate to the desired sample directory.
- Select the sample directory and click on Select folder.
- Your sample should now be visible under the applications tab on the left. Click to add a new build configuration (You can have multiple build configuration for the same application. Useful if you are building the same application for multiple different boards).
- Select the actinius_icarus_ns board. This will configure the build to be a non-secure application for the Icarus.
- Click on Build Configuration. The application will now be built. You can open up a terminal and view the building process using
CTRL+`
.
Building an application using West
West is a "swiss-army knife" command-line tool used to manage application repositories that use the Zephyr RTOS. It can be used for building, flashing and debugging among many other functionalities. Check out the West documentation for more information. To use West, you will need to use the command-line. These steps show how to build a sample application for the Icarus using West:
Building the application:
- Choose and download an Icarus sample application from the samples section.
- Open de nRF Connect for Desktop program.
- Open the Tool Manager and navigate to your nRF Connect SDK version.
- Open the drop-down menu and click on Open command prompt. This will open a command prompt with the West environment setup automatically.
- Navigate to your sample application directory and build the sample:
$ cd <path-to-sample-dir>
$ west build -b actinius_icarus_ns
West will now build the sample application and create a build directory. To rebuild the application at any time, repeat step 5. Rebuilding does not require the -b
option.
- West can also run a clean (pristine) build using the following commands:
$ west build -b actinius_icarus_ns -p