Programming onto nRF91 Series devices
You can program applications and samples onto the nRF91 Series devices after Building an application the corresponding firmware images.
To program firmware onto nRF91 Series devices, follow the process described in the Programming an application section. Pay attention to the exceptions specific to the nRF91 Series, which are listed below.
Before you program a device in nRF Connect for VS Code, you need to set up a build configuration, which is part of Building an application.
Complete the following steps to program the application:
Connect the development kit to your PC using a USB cable.
Power on the development kit.
Make sure to check the programming exceptions for the nRF91 Series in the sections below.
Open the nRF Connect extension in Visual Studio Code by clicking its icon in the Activity Bar.
In the extension’s Actions View, click on Flash. If you have more than one device connected, select the device to program.
You can select several devices of the same type to program them with the same build configuration.
If the build system considers the build incomplete, using this action also triggers a rebuild before flashing.
For instructions about programming with nRF Connect for VS Code, see How to flash an application.
If you want to program with custom options or scripts, read about Binding custom tasks to actions in the extension documentation.
For information about how to flash and erase in nRF Connect for VS Code, read about the Application-specific flash options.
Complete the following steps to program the application:
Connect the development kit to your PC using a USB cable.
Power on the development kit.
Make sure to check the programming exceptions for the nRF91 Series in the sections below.
Start the toolchain environment in a terminal window.
Program the application to the kit using the following command:
west flash --eraseThis command erases the full flash memory before programming, which is the recommended approach. If the application depends on other flash memory areas (for example, if it uses the Settings partition where bonding information is stored), erasing the full kit before programming ensures that these areas are updated with the new content. You can also program without erasing.
The west flash command automatically resets the kit and starts the application.
For more information on programming using the command line, see Flashing in the Zephyr documentation.
Compatible versions of modem and application
When you update the application firmware on an nRF91 Series DK, make sure that the modem firmware and application firmware are compatible versions.
Selecting board controller on nRF9160 DK
When programming on the nRF9160 DK, make sure to set the SW10 switch (marked PROG/DEBUG) in the nRF91 position to program the nRF9160 application. In nRF9160 DK board revision v0.9.0 and earlier, the switch is called SW5.