Our website is under construction. Please stay tuned!

Firmware Update

This section provides instructions on how to update the firmware. We support many ways, such as via SEGGER J-Link, OpenOCD or Serial-COM.

Note

  • Stay connected during the update process and use the correct Device and Interface.

  • The LEAPS UWBS also support firmware update over the BLE, refer Firmware Update over BLE for more detail information.

For more detailed information, select the method you want to use below:

Prepare for setup

  • At least a device.

  • A binary file to update. (.hex or .bin)

  • Installed SEGGER J-Link.

Step-by-step instructions on how to update via SEGGER J-Link

  1. Install the SEGGER J-Link.

Locate the Windows download file named JLink_Windows_V766_x86_64.exe.

  • Double-click the file to initiate the installation process.

  • When prompted, enter the administrative password.

  • Please read and agree to the license terms by accepting them.

  • Accept the default destination folder for the installation, typically located at C:\Program Files (x86)\SEGGER\JLink.

  • Proceed with accepting the default USB driver.

Upon completion of the installation, you will find a folder and a set of driver files installed in the system folders. Please note that with each new installation, these files will be overwritten.

Locate the macOS download file named JLink_MacOSX_V766_x86_64.pkg.

  • Double-click the file to initiate the installation process.

  • Please read and agree to the license terms by accepting them.

  • Enter the administrative password when prompted. This password is required to write in the Applications folder.

After the installation, you will find a folder in the following location: /Applications/SEGGER/JLink_V766/. Please remember that each version will have a different folder. This folder will store all the executables and libraries associated with the application.

Visit the SEGGER download site for GNU/Linux and locate the desired package. Choose between 32/64-bit versions.

  • Preferably, download the .tgz file and save it to your computer.

  • Open a terminal window.

For example, on Ubuntu (Linux), to install the 64-bit .tgz file, use the following commands:

mkdir -p ~/opt/SEGGER
cd ~/opt/SEGGER
tar xf ~/Downloads/JLink_Linux_V766_x86_64.tgz
chmod a-w ~/opt/SEGGER/JLink_Linux_V766_x86_64
ls -l ~/opt/SEGGER/JLink_Linux_V766_x86_64

After executing the above commands:

  • A folder will be created at ~/opt/SEGGER.

  • The contents of the downloaded .tgz file will be extracted to the ~/opt/SEGGER folder.

  • The permissions of the JLink_Linux_V766_x86_64 file will be modified.

  • Can verify the installation by checking the contents of the ~/opt/SEGGER/JLink_Linux_V766_x86_64 folder.

Please note that the installation will overwrite any existing files in the system folders during each new install.

  1. Open the SEGGER J-Link then flash the binary file.

  • Make sure that the latest J-Link software & documentation pack is installed.

  • Connect J-Link to the PC

  • Connect target system to J-Link

  • Start J-Flash Lite

../../../_images/jflashliteexe03.png
  • Select device, debug interface and communication speed

  • Choose a file and click Program Device or click Erase Chip

  • J-Flash Lite performs the requested operation

../../../_images/jflashliteexe04.png
  • Make sure that the latest J-Link software & documentation pack is installed.

  • Connect J-Link to the PC.

  • Connect target system to J-Link

  • Start J-Link Commander.

  • Type the following commands:

  • J-Link> device <devicename> // For a list of known devices, please refer to here

  • J-Link> r

  • J-Link> h

  • J-Link> loadbin <PathToBinFile>, <programmingaddress>

  • J-Link Commander executes the flash download and prints out the time statistics upon success.

Once the update is complete, the board will automatically reset itself as part of the process.

Prepare for setup

  • At least one device.

  • A package includes a script and a binary for the update.

  • Installed OpenOCD.

Step-by-step instructions on how to update via OpenOCD (Open On-Chip Debugger)

  1. Install the OpenOCD Debugger

  • Download the xPack OpenOCD package for Windows.

  • Extract into the C:\xpack-openocd-0.11.0-1 folder.

  • Add the path: C:\xpack-openocd-0.11.0-1\bin to your Windows User Path environment variable.

For example, to install the xpack-openocd-0.11.0-1-linux-arm.tar.gz file, use the following commands:

mkdir -p ~/.local/xPacks/openocd
cd ~/.local/xPacks/openocd
tar -zxvf ~/Downloads/xpack-openocd-0.11.0-1-linux-arm.tar.gz (with PC’s AMD core, using … linux-x64.tar.gz with PC’s Intel core)
....
sudo chmod -R -w xpack-openocd-0.11.0-1/
~/.local/xPacks/openocd/xpack-openocd-0.11.0-1/bin/openocd --version
export PATH="~/.local/xPacks/openocd/xpack-openocd-0.11.0-1/bin/:$PATH"
cd ~
source .bashrc

For example, on Ubuntu (Linux), to install the xpack-openocd-0.11.0-1-linux-arm.tar.gz file, use the following commands:

mkdir -p ~/.local/xPacks/openocd
cd ~/.local/xPacks/openocd
tar -zxvf ~/Downloads/xpack-openocd-0.11.0-1-linux-arm.tar.gz (with PC’s AMD core, using … linux-x64.tar.gz with PC’s Intel core)
....
sudo chmod -R -w xpack-openocd-0.11.0-1/
~/.local/xPacks/openocd/xpack-openocd-0.11.0-1/bin/openocd --version
export PATH="~/.local/xPacks/openocd/xpack-openocd-0.11.0-1/bin/:$PATH"
cd ~
source .bashrc
  1. Check the OpenOCD version

openocd --version
xPack OpenOCD, x86_64 Open On-Chip Debugger 0.11.0-00155-ge392e485e (2021-03-15-16:43)
Licensed under GNU GPL v2
For bug reports, read
  http://openocd.org/doc/doxygen/bugs.html
  1. Download and Extract the package to your PC.

Example with the UDK1 board: Use a program like WinZip or 7-Zip to extract the downloaded to be defined file.

  1. Open your favorite terminal application.

  • On linux or macOS, like Terminal application.

  • On Windows, like Powershell application.

  1. Navigate to the folder containing the extracted package.

  • cd to /path/to/LEAPS-UWBS-Firmware-OpenOCD

  1. Use the cable to connect the device to your PC.

  • Example with the UDK1 board: Use a USB-C Data Cable to connect the USB-C Data Port 2 of devices to your PC.

  1. Execute the script to update the firmware automatically.

On Windows, Use the reflash-leaps-rtls-2ab.bat command.

On macOS, Use the reflash-leaps-rtls-2ab.sh command.

On GNU/Linux, Use the reflash-leaps-rtls-2ab.sh command.

For example, on Ubuntu (Linux):

./reflash-leaps-rtls-2ab.sh
xPack OpenOCD, x86_64 Open On-Chip Debugger 0.11.0-00155-ge392e485e (2021-03-15-16:43)
Licensed under GNU GPL v2
For bug reports, read
  http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter speed' not 'adapter_khz'
set_test_mode
Info : Using CMSIS-DAPv2 interface with VID:PID=0x0d28:0x0204, serial=01100E003602002e003f4146570120313238
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: FW Version = 2.1.0
Info : CMSIS-DAP: Serial# = 01100E003602002e003f4146570120313238
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : high-speed (adapter speed 10000) may be limited by adapter firmware.
Info : clock speed 10000 kHz
Info : SWD DPIDR 0x2ba01477
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for nrf52.cpu on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000031ec msp: 0x20003488
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
Info : nRF52840-CKAA(build code: D0) 1024kB Flash, 256kB RAM
auto erase enabled
wrote 1048576 bytes from file leaps-rtls-all-2ab-v0.14-rc25.hex in 38.776192s (26.408 KiB/s)
  1. Once the update is complete, the board will automatically reset itself as part of the process.

Prepare for setup

  • At least one device.

  • A package includes a script and a binary for the update.

  • Installed python3.

Step-by-step instructions on how to update via Serial-COM

  1. Download and Extract the package to your PC.

Example with the UDK1 board: Use a program like WinZip or 7-Zip to extract the downloaded to be defined file.

  1. Open your favorite terminal application.

  • On linux or macOS, like Terminal application.

  • On Windows, like Powershell application.

  1. Navigate to the folder containing the extracted package.

  • cd to /path/to/LEAPS-UWBS-Firmware-Serial-COM

  1. Install Dependencies. If it’s your first time, you will need to install some Python binaries like:

  • serial (pip install serial)

  • libusb (pip install libusb

  • tqdm (pip install tqdm)

  1. Can choose to use one of two ports to perform updates.

Example with the UDK1 board: If using USB-C Data Port 1, you can update eldr binaries and main binaries independently. On the contrary, if you use USB-C Data Port 2, you can update multiple devices continuously at the same time.

  1. Use a USB-C Data Cable to connect the USB-C Data Port 1 of devices to your PC.

Run the following command to perform the update eldr and main: sudo python3 ./udk1-leaps-uwbs-serial-com.py --main ./main_binaries.bin --eldr ./eldr_binaries.bin

~/LEAPS-UWBS-Firmware-Serial-COM$ sudo python3 ./udk1-leaps-uwbs-serial-com.py --main ./udk1-leaps-uwbs-fira-v0.15.0-rc8.bin --eldr ./udk1-leaps-uwbs-eldr-v0.15.0-rc8.bin
03:11:55 Device 01/02 (SerialNumber=3DB15A2CCB8053C8): Reset
03:11:55 Device 02/02 (SerialNumber=904AD29FD29D2452): Reset
15:12:15 Device 01/02 (SerialNumber=904AD29FD29D2452): Uploading MAIN: 100%|████████████████████████████| 716192/716192 [00:16<00:00, 44623.94it/s]
15:12:15 Device 02/02 (SerialNumber=3DB15A2CCB8053C8): Uploading MAIN: 100%|████████████████████████████| 716192/716192 [00:16<00:00, 44630.31it/s]
15:12:37 Device 01/02 (SerialNumber=904AD29FD29D2452): Uploading ELDR: 100%|████████████████████████████| 235748/235748 [00:05<00:00, 42419.44it/s]
15:12:37 Device 02/02 (SerialNumber=3DB15A2CCB8053C8): Uploading ELDR: 100%|████████████████████████████| 235748/235748 [00:05<00:00, 42498.01it/s]
03:12:43 Resetting devices
  1. Use a USB-C Data Cable to connect the USB-C Data Port 2 of devices to your PC. Run the following command to perform the update eldr or main:

    • python3 ./leaps-serial-com.py -d serial_port_of_device --eldr ./eldr_binaries.bin

    • python3 ./leaps-serial-com.py -d serial_port_of_device --main ./main_binaries.bin

~/LEAPS-UWBS-Firmware-Serial-COM$ python3 ./udk1-leaps-uwbs-serial-com.py -d /dev/ttyACM0 --eldr ./udk1-leaps-uwbs-eldr-v0.15.0-rc8.bin
02:54:30 Resetting device
02:54:33 Uploading file /home/leaps/LEAPS-UWBS-Firmware-v0.15.0/LEAPS-UWBS-Firmware-Serial-COM/udk1-leaps-uwbs-eldr-v0.15.0-rc8.bin (235748 bytes)
100%|████████████████████████████| 235748/235748 [00:28<00:00, 8129.43it/s]
02:55:07 Ok (upload time = 34.70 seconds)
02:55:10 Resetting device

~/LEAPS-UWBS-Firmware-Serial-COM$ python3 ./udk1-leaps-uwbs-serial-com.py -d /dev/ttyACM0 --main ./udk1-leaps-uwbs-fira-v0.15.0-rc8.bin
02:56:25 Resetting device
02:56:28 Uploading file /home/leaps/LEAPS-UWBS-Firmware-v0.15.0/LEAPS-UWBS-Firmware-Serial-COM/udk1-leaps-uwbs-fira-v0.15.0-rc8.bin (716192 bytes)
100%|████████████████████████████| 716192/716192 [01:27<00:00, 8175.81it/s]
02:58:11 Ok (upload time = 102.74 seconds)
02:58:14 Resetting device
  1. The app will provide visual indicators or progress bars to show how the update is proceeding. Be patient and let the update process run its course.

  2. Once the update is complete, the board will automatically reset itself as part of the process.

Verify the firmware and confirm success

Open your favorite terminal application,

  • On GNU/Linux or macOS, like Terminal application.

  • On Windows, like Powershell application.

For example, on Ubuntu (Linux), open minicom and press double enter:

minicom -b 115200 -D /dev/ttyACM0
../../../_images/jflashliteexe05.png

For the connection, let’s first take a look at an overview of the main components of DWM1001-DEV and DWM3001CDK development kit.

Note

For the UDK1 Kit, please refer to the detailed information in the Hardware Interfaces section.

../../../_images/dwm1001_io.png ../../../_images/dwm3001c_io.png