Building and programming with nRF53 Series

Building and programming with nRF53 Series application for the nRF53 Series devices follows the processes described in the following sections.

Building and programming with nRF5340 DK

Depending on the sample, you must program only the application core (for example, when using NFC samples) or both the network and the application core.

The steps differ depending on whether you work with Visual Studio Code or on the command line and whether you are doing a single or multi-image build.

Using Visual Studio Code

You can build and program separate images or combined images using nRF Connect for VS Code.

To build and program the application core, follow the instructions in How to build an application and use nrf5340dk/nrf5340/cpuapp or nrf5340dk/nrf5340/cpuapp/ns as the board target.

To build and program the network core, follow the instructions in How to build an application and use nrf5340dk/nrf5340/cpunet as the board target.

Program the sample or application

Complete the following steps to program the sample or application onto nRF5340 DK:

  1. Connect the nRF5340 development kit to your PC using a USB cable.

  2. Make sure that the nRF5340 DK and the external debug probe are powered on.

  3. Click Build in the Actions View to start the build process.

  4. Click Flash in the Actions View to program the resulting image to your device.

Using the command line

To build nRF5340 samples from the command line, use west. To program the nRF5340 DK from the command line, use either west or nRF Util (which is also used by west as the default runner).

To build and program the application sample and the network sample as separate images, follow the instructions in Programming an application for each of the samples.

See the following instructions for programming the images separately:

  1. Start the toolchain environment in a terminal window.

  2. Run the following command to erase the flash memory of the network core and program the network sample:

    west flash --erase
    
  3. Navigate to the build folder of the application sample and run the same command to erase the flash memory of the application core and program the application sample:

    west flash --erase
    

See Programming with --recover if you encounter an error.