-
Open the nRF Connect extension panel from the VS Code activity bar.
-
Under the Welcome section of the extension panel, click Create a new application:
-
In the application picker, select the Browse nRF Connect SDK add-on Index option and search for Asset Tracker Template:
-
After the project is created, it is listed under Applications in the extension panel. Click Add build configuration under the app entry (or use the Add build configuration button under Build) to open the build configuration dialog.
-
In the Add build configuration (app) dialog, set the Board target. With the Compatible filter selected (the default), only the supported build targets are listed:
Board Board target Thingy:91 X thingy91x/nrf9151/nsnRF9151 DK nrf9151dk/nrf9151/nsKeep the other fields at their defaults and click Generate and build to build the application.
-
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, click the Erase and flash to board icon next to Flash in the Actions panel.
Do not use the simple Flash action. It will fail with a UICR-related error.
If prompted for which device to flash, select the ID of the debugger or nRF9151 DK. Do not select the
THINGY91X_(serial number)device, as it is not used with an external debugger.Thingy:91 X (no debugger)
Thingy:91 X does not have an on-board debugger, so the default Flash action in the Actions panel will not work. Flash over the serial bootloader from a toolchain terminal instead.
To open a toolchain terminal, right-click the app entry under Applications and select Start new terminal. This opens a shell with all the nRF Connect SDK tools available. Then run:
west thingy91x-dfu -
After flashing, open a serial terminal at 115200 baud to view the device logs. The Serial Terminal app (part of nRF Connect for Desktop) is recommended; PuTTY, Tera Term, and minicom also work.
-
Follow the instructions in Connecting to connect the device to nRF Cloud.
For more details on how to use nRF Connect for VS Code, refer to the nRF Connect for VS Code documentation.