Uploading Your Firmware
Last updated on: January 09, 2020
MCUBoot
The Icarus board since hardware version 1.2b comes pre-programmed with the Asset Tracker (Production Firmware Bundle) which includes MCUBoot and allows you to deploy firmware images to your board without the use of a programmer.
Uploading firmware images using the Actinius Programmer
First download and configure the nRF Connect Desktop
:
Download the
nRF Connect Desktop
application from Nordic Semi's website and install itClick the "Settings" button
Click the "Add source" button and add
https://cdn.actini.us/nrf-apps/apps.json
as an App SourceReturn to the main application window. The Actinius Programmer application should now be available in the list of apps
Press "Install" to install it

To upload a fimrware application:
Pick your Icarus board from the dropdown list
Select one of the provided prebuilt applications or click the "Add HEX file" button if you would like to upload your own hex file
Click "Write" button
Follow the instruction on the screen to enter MCUBoot mode
Click "Write" button

(Alternative) Deploying an update using the command line
After MCUBoot was deployed to the board, you can start uploading your firmware updates through USB using the mcumgr
application.
In order to generate an update for an application, you add the CONFIG_BOOTLOADER_MCUBOOT=y
directive to your prj.conf
and build the application normally . An app_signed.hex
file will be generated in your build folder. This is the application update and is compatible with MCUBoot. You can upload this file to your device.
To upload the file to the board you need to perform the following steps:
- Press and keep pressed the button on the board (not the reset one) then press the restart button. The board will then restart into serial recovery mode
- Use
mcumgr
to upload your update to the board. The command to upload an image to the board using themcumgr
tool is:mcumgr image upload <path to app_update.bin> --conntype=serial --connstring='dev=<port>,baud=<baud_rate>'
where<port>
is something like:COM3
for windows or/dev/tty.usbserial-AC4FBY9X
for linux/macOS and<baud_rate>
is your device baud rate. You will see upload progress if everything works ok. - Restart your board. At this moment your new firmware will run
Using a programmer
Another way to program your board is using a J-Link programmer. The next section details using either the nRF9160-DK as a programmer or the J-Link Mini EDU standalone programmer.
Using nRF9160-DK as a Programmer
Plug-in your TagConnect (TC2030-CTX-NL) to your J-Link or the J-Link OB that is on your Nordic nRF9160-DK.
Switch the VDD IO switch to 3V and restart the DK for the programmer to work correctly.
It is a good idea to switch the “nRF52-nRF91” switch to point to nRF52. That way, if something goes wrong with the connection to the Icarus board (eg in the improbable case that the TagConnect connector is not properly touching the programming pads), you will get a message from Segger about the device not being the correct one, instead of silently uploading to the DK’s nRF9160.
Once you have the programmer connected you can just use nrfjprog
by itself, through Segger Embedded Studio or through west
to upload your firmware.
Using J-Link Mini EDU Programmer
If you are a student and have access to this type of programmer you can use it to program the board.
Once you have the programmer connected you can just use nrfjprog
by itself, through Segger Embedded Studio or through west
to upload your firmware.
Restoring MCUBoot on the board
There are 2 ways in which you can deploy MCUBoot to your board if the pre-programmed firmware is erased:
Re-program our Asset Tracker (Factory Firmware Bundle) hex that you can download through the
Actinius Programmer
Build and deploy your firmware and deploy MCUBoot along with it:
- add the
CONFIG_BOOTLOADER_MCUBOOT=y
directive to yourprj.conf
- build your application like you normally would. When your application is built using this directive, the hex generated contains the MCUBoot, SPM and application.
- add the
Note: the applications provided in the Actinius Programmer
use the default private key bundled with the mcuboot
. It can be found in the ncs/mcuboot/boot/zephyr
folder. If you change the MCUBoot that comes pre-programmed on the board, and use your own private key you should keep using the same key to create and sign further updates otherwise MCUBoot will fail to start your update. If you wish to restore MCUBoot to the one provided by Actinius, just re-program the Asset Tracker (Factory Firmware Bundle) using a programmer.