Option 1: nRF Connect for VS Code (recommended)

Asset Tracker Template

tags
Asset Tracker Template
  1. Open the nRF Connect extension panel from the VS Code activity bar.

  2. Under the Welcome section of the extension panel, select Create a new application:

    nRF Connect extension panel with Create a new application

  3. In the application picker, select the Browse nRF Connect SDK add-on Index option and search for Asset Tracker Template:

    Asset Tracker Template add-on

  4. After the project is created, it is listed under Applications in the extension panel. To open the build configuration dialog, select Add build configuration under the app entry, or use the Add build configuration button under Build.

  5. In the Add build configuration (app) dialog, set the Board target. With the Compatible filter selected, which is the default, only the supported build targets are listed:

    Board Board target
    Thingy:91 X thingy91x/nrf9151/ns
    nRF9151 DK nrf9151dk/nrf9151/ns

    Keep the other fields at their defaults and select Generate and build to build the application.

  6. Flash the device.

    Expand the section that matches your hardware setup.

    Thingy:91 X (with debugger) or nRF9151 DK

    With an external J-Link debugger attached to the Thingy:91 X, select the Erase and flash to board icon next to Flash in the Actions panel.

    Do not use the simple Flash action. It fails with a UICR-related error.

    If prompted for which device to flash, select the ID of the debugger or the nRF9151 DK. Do not select the THINGY91X_(serial number) device, because it is not used with an external debugger.

    Thingy:91 X (no debugger)

    The Thingy:91 X does not have an on-board debugger, so the default Flash action in the Actions panel does not work. Flash over the serial bootloader from a toolchain terminal instead.

    To open a toolchain terminal, open the context menu for the app entry under Applications and select Start new terminal. This opens a shell with all the nRF Connect SDK tools available. Then run the following command:

    west thingy91x-dfu
    
  7. After flashing, open a serial terminal at 115200 baud to view the device logs. Nordic Semiconductor recommends the Serial Terminal app, which is part of nRF Connect for Desktop. PuTTY, Tera Term, and minicom also work.

  8. Follow the instructions in Connecting to connect the device to nRF Cloud.

For more information about how to use nRF Connect for VS Code, see the nRF Connect for VS Code documentation.