3 Firmware Image Builder (pyfwimagebuilder)
Introduction
The Image Builder (pyfwimagebuilder) is a Command Line Interface (CLI) that converts the
application hex file (*.hex) into another format
(*.img) that is directly understood by the bootloader client.
The image builder tool also requires bootloader_configuration.toml
that is generated by the MPLAB Code Configurator (MCC) Melody 8-Bit MDFU Client
library. The bootloader_configuration.toml file contains various
device parameters that are added to the generated image file. These parameters
enable the bootloader client to identify the specific device used to create the
application. A few examples of device parameters are: Device ID, Flash row size,
application start address, memory unlock keys, etc. These parameters in the image
file help the bootloader client to perform the initial image verification by
extracting the Device ID information and comparing it with the Device ID of the
target device.
pyfwimagebuilder Workflow
- Open the Windows Command Prompt.
-
Install the pyfwimagebuilder using the command:
pip install pyfwimagebuilder -
Execute the below command to generate the embedded application image file:
pyfwimagebuilder build [-i input.hex] [-c bootloader_configuration.toml] [-o output.img]
.toml file will be inside
Booloader Project Folder > mcc_generated files > bootloader >
configurations > bootloader_configurtion.toml.Example to decode the image binary file:
- Download the
.tomland.imgfiles - Open terminal in the download directory with the file
- Run the below
command:
pyfwimagebuilder decode -i .\output.img -c bootloader_configuration.toml

