Conexio Documentation
  • Welcome to the Conexio Platform Guides
  • Getting Started with Conexio Stratus
    • Stratus Pro nRF9151 Overview
      • Stratus Pro nRF9151 Pin Diagram
    • Stratus Pro nRF9161 Overview
      • Stratus Pro nRF9161 Pin Diagram
    • Stratus nRF9160 (Gen 1) Overview
      • Stratus nRF9160 Pin Diagram
    • Build Environment Setup
      • nRF Connect SDK (NCS) Installation
      • newtmgr Setup
    • Building and Programming an Application
      • Fetch Conexio Firmware SDK and Board Definition Files
      • Compiling Applications with nRF Connect Extension for VS Code
      • Building and Programming an Application using CLI and west
    • Sample Applications
      • Datacake
      • Golioth
      • Memfault
      • Machine Learning with Edge Impulse
    • Stratus Pro Power Analysis
    • nRF91 Modem Firmware (MFW)
    • nRF Connect LTE Link Monitor
    • Connectivity
    • Regulatory & Compliance
    • Expansion Dock
    • Purchase Stratus Kit
    • Support
Powered by GitBook
On this page
  • Building an application: The Wild Wild West way
  • Updating Through USB
  • Flashing an application: DFU Mode (Device Firmware Upgrade)

Was this helpful?

  1. Getting Started with Conexio Stratus
  2. Building and Programming an Application

Building and Programming an Application using CLI and west

PreviousCompiling Applications with nRF Connect Extension for VS CodeNextSample Applications

Last updated 3 months ago

Was this helpful?

Only build using the WEST cli method if you have used it before and are comfortable using command line tools.

Building an application: The Wild Wild West way

west is the Swiss army knife command-line tool for Zephyr. Zephyr provides several west extension commands for building, flashing, and interacting with Zephyr programs running on a device.

To build an application, navigate to the conexio-firmware-sdk directory that we installed and choose a sample application. Here, we will choose the led_blink sample.

/opt/nordic/ncs/v2.7.0/conexio_stratus_firmware/samples/conexio_stratus/led_blink

This sample tests two different functionalities of the Stratus device:

  1. The user-programmable LED on the mainboard.

  2. The USB serial communications are working correctly and the log output gets printed on the terminal window.

To compile the application, open the terminal in the sample application directory as illustrated below and issue the following west command.

This will open the terminal in the installed directory of the nRF Connect SDK as indicated. In our case nordic/ncs/v2.7.0.

Then, in the terminal change the working directory to the sample application you want to compile and flash. For instance, here we will choose the led_blink sample

cd conexio_stratus_firmware/samples/conexio_stratus/led_blink

For the latest Gen 2 Stratus Pro nRF9161 device, you can build your application targeting this board by specifying the location of the Stratus Pro board information with the -DBOARD_ROOT parameter to the CMake build system:

west build -b conexio_stratus_pro/nrf9161/ns -- -DBOARD_ROOT=/opt/nordic/ncs/v2.7.0/conexio-firmware-sdk

or if using a system build

west build -b conexio_stratus_pro/nrf9161/ns -- -DBOARD_ROOT=/opt/nordic/ncs/v2.7.0/conexio-firmware-sdk --sysbuild

For the Gen 1 Stratus device, the build command is:

west build -b conexio_stratus/nrf9160/ns -- -DBOARD_ROOT=/opt/nordic/ncs/v2.7.0/conexio-firmware-sdk

Updating Through USB

You can update the Stratus application firmware over USB using MCUboot, a secure bootloader that you can use to update applications without an external debugger.

Flashing an application: DFU Mode (Device Firmware Upgrade)

Stratus device comes preprogrammed with the MCUBoot bootloader allowing users to directly update the firmware via the USB interface. Each sample is already configured to enable the Zephyr application to be booted by the MCUBoot after resetting the board.​​

This is handled internally by the Zephyr configuration system and is wrapped in the CONFIG_BOOTLOADER_MCUBOOT Kconfig variable, which is enabled in the application’s prj.conf file as

CONFIG_BOOTLOADER_MCUBOOT=y

For Stratus Pro, MCUBoot is enabled by default in the device tree configuration and no extra action is needed by the developer at the application build level.

After the compilation has been completed, you will notice a build folder being generated, which will contain the following binary:

build/zephyr/app_update.bin

When an application is built with the option CONFIG_BOOTLOADER_MCUBOOT set, app_update.bin, a signed variant of the firmware in binary format (as opposed to intelhex) is automatically generated and can be used for firmware over-the-air (FOTA) upgrades.

To program the Stratus via USB, you will need to put the device into DFU mode first. This mode triggers the onboard bootloader that accepts firmware binary files. To enter DFU mode:

  • Hold down both buttons (MODE/USER + RESET)

  • Release only the RESET button, while holding down the MODE/USER button

  • Wait for the white LED to turn on (steady-state)

  • Release the MODE button

The device is now in the DFU mode. 🚨

Flash the compiled firmware using newtmgr on macOS:

newtmgr -c serial image upload build/zephyr/app_update.bin

Use the following upload command on Ubuntu 24 system: sudo newtmgr --conntype serial --connextra 'dev=/dev/ttyUSB0,baud=115200' image upload -e build/zephyr/app_update.bin

Give it a few seconds for the transfer to complete and then, hit the RESET button. You should now see the LEDs blinking every second. If you have a serial logger such as TeraTerm, Putty, or similar, select the correct COM port and set the baud rate = 115200, hit the RESET button, and notice the following being printed on the console window:

SPM: NS image at 0x20200
SPM: NS MSP at 0x20015528
SPM: NS reset vector at 0x21a31
SPM: prepare to jump to Non-Secure image.
*** Booting nRF Connect SDK v2.6.0 ***
Hello from conexio_stratus_pro

More information can be found .

Now you are all set! Stratus is alive and ready for development

👏
here
😄
previously