3 Unified Bootloader Host Application (UBHA)

Introduction

The Unified Bootloader Host Application (UBHA) is responsible for transferring an embedded application program (the .hex file) from the host machine (development host) to a target device (a device running the embedded application). It talks to the bootloader present on the target device by sending appropriate commands, and it transfers data (the embedded application program) using a communication protocol. It can be used to program the Flash memory for PIC16, PIC18 and AVR devices. EEPROM writes are also supported.

Prerequisites

  1. Java Runtime Environment 1.8.0_251 or Lower
  2. OS Serial Port Drivers
Figure 3-1. Unified Bootloader Host Application User Interface (PIC)
Figure 3-2. Unified Bootloader Host Application User Interface (AVR)

UBHA Workflow

The workflow that is required for UBHA to function with the bootloader firmware is described below. All the steps mentioned here are required (unless stated otherwise) to successfully load a new application onto a device with a bootloader.

Note: AVR users will skip step 3.
1. Select the architecture for the bootloader using the Device Architecture menu.
Note: PIC devices need to select the correct architecture from the 8-Bit Architecture option as well as the Device Architecture.

2. The user will need to select the COM port that the target device is connected to. Navigate to Settings > Serial > COM Port.

3. The user will need to input the Bootloader Offset (End Application Start Address) and the Program Memory Size (Total Flash Size). The other address values seen here are ignored by UBHA unless the Program EEData or Program Config Words options are checked.
Note: This value is in bytes. If the target device uses word addresses then this value will need to be multiplied by 0x2.

Example: If the boot end address is 0x400 in the bootloader UI, then this value would be 0x800 for PIC16F devices.

4. The user will need to select the application hex file to bootload. Navigate to File > Open/Load File (*.hex).

5. The user will need to open the output console. Navigate to Tools > Console.

6. Click Program Device.

UBHA Device Firmware Upgrade

This section presents the device firmware upgrade flow for UBHA. This figure describes the PIC logical flow of the UBHA DFU process. After a command is sent to the bootloader, UBHA will wait roughly 20 seconds before timing out with a Serial Port Exception.
Note: AVR devices use this same process flow but UBHA does not support checksum for AVR.
Figure 3-3. UBHA DFU Flow
Known Issues
  • When using a version of Java greater than v1.8.0_251, selecting a UART COM port and selecting "Apply" causes the Unified Bootloader Host Application to crash. In order to avoid this use a version of Java at or below version 1.8.0_251.
  • The warning 'Application Offset exist between ROWS/PAGE boundaries' might be shown incorrectly, even though the application offset is at the start of a page. Make sure that the application start address is at the beginning of a page by referring to the device datasheet
  • UBHA’s COM port can become corrupted if a failed bootload occurs and the lines were busy. This prevents the read version command from being successful. Restarting UBHA will fix this issue.