Getting Started

Before getting started, make sure you have a proper nRF Connect SDK development environment. Follow the official Getting started guide.

Initialization

Before initializing, start the toolchain environment:

nrfutil toolchain-manager launch --

To initialize the workspace folder (hello-nrfcloud) where the firmware project and all nRF Connect SDK modules will be cloned, run the following commands:

# Initialize hello-nrfcloud workspace
west init -m https://github.com/hello-nrfcloud/firmware --mr main hello-nrfcloud

cd hello-nrfcloud

# Enable Bosch environmental sensor driver
west config manifest.group-filter +bsec

# Update nRF Connect SDK modules
west update

# Use sysbuild by default
west config build.sysbuild True

Building and running

Complete the following steps for building and running:

  1. Navigate to the project folder:

    cd project
    
  2. To build the application, run the following command:

    west build -b thingy91x/nrf9151/ns app
    
  3. When using the serial bootloader, you can update the application using the following command:

    west thingy91x-dfu
    
  4. When using an external debugger, you can program using the following command:

    west flash --erase
    

Experimental: You can also use pyOCD to flash the nRF9151 SiP using the CMSIS-DAP interface provided by the connectivity bridge firmware.

Important

Do not use pyOCD with JLink probes. Use nRF Util or the West Runner instead.

Note

Sometimes, the nRF9151 SiP is detected as protected and is mass-erased automatically. In that case, simply program the bootloader as well.

Programming

Complete the following steps for programming:

  1. To program the app, run the following command:

    pyocd flash build/app/zephyr/zephyr.signed.hex
    
  2. To program the bootloader, run the following command:

    pyocd flash nrf91-bl-v2.hex
    
  3. To erase the chip including UICR:

pyocd erase --mass

Experimental: You can update the modem firmware using pyOCD. To do this, use the included nrf91_flasher script as follows:

python3 scripts/nrf91_flasher.py -m mfw_nrf91x1_2.0.1.zip