How to create an application

nRF Connect for VS Code

tags
nRF Connect for VS Code

The following procedure creates a freestanding application. The steps correspond to the ones listed on the Create an application page in the nRF Connect SDK documentation.

Complete the following steps:

  1. Open the nRF Connect for VS Code extension by clicking its icon.
  2. From the Welcome View, click Create a new application.

    Create a new application in the Welcome View

    A quick pick menu appears.

  3. Choose one of the following options:

    • Create a blank application - This will create an application with a code structure that you need to populate from scratch.
    • Copy a sample - This will create an application from a sample or an application in the nRF Connect SDK.
    • Browse nRF Connect SDK Add-on Index - This will create an application from an out-of-tree nRF Connect SDK reference application that follows its own versioning scheme and uses custom west workspace settings. The available reference applications are listed in the online application index.
  4. Enter the path for the application. You can also use the folder button at the top of the quick pick to open a picker. A folder with the same name cannot already exist in the path.
    The application creation process starts after you enter the name. When the application is created, a prompt appears asking you what to do with the application.

    Created the new application prompt

  5. Click one of the following options:

    • Open - This opens the new application in your current VS Code window.
    • Open in New Window - This opens the new application in a new VS Code window.
    • Add to Workspace - This option is available when you have already one or more applications listed in the Applications View. This option opens the new application in your current VS Code window and adds it to your VS Code workspace.

    Tip

    You can use the nrf-connect.defaultOpenAction setting to configure the default action to use when Visual Studio Code prompts you about opening an application.

The application is now created and listed in the Applications View.