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
- Java™ Runtime Environment 1.8.0_251 or Lower
- OS Serial Port Drivers
UBHA Workflow
The workflow 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.
- 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.
-
Select the COM port that the target device is connected to. Navigate to Settings>Serial>COM Port.
-
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.
-
Select the application hex file to bootload. Navigate to File>Open/Load File (*
.hex
). -
Open the output console. Navigate to Tools>Console.
- Click the Program Device button.
UBHA Device Firmware Upgrade
- When using a version of Java greater than v1.8.0_251, selecting a UART COM port and selecting ”Apply” causes the UBHA to crash. To avoid this use a version of Java at or below version 1.8.0_251.
- The warning “Application Offset exists 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 data sheet.
- The UBHA COM port can become corrupted if a failed bootload occurs and the lines are busy. This prevents the read version command from being successful. Restarting the UBHA will fix this issue.