This repo contains the Hex2Dfu tool. It's a .NET 5 console app to convert and/or pack HEX or BIN files in DFU packages (required to update some target boards). It's part of nanoFramework toolbox, along with other various tools that are required in nanoFramework development, usage or repository management. There are prebuilt versions for Win64 and Linux.
To create a DFU package from a single hex file use the following command line:
hex2dfu -h=hex_file_name -o=output_DFU_image_file_name
To create a DFU package from one (or more) bin files use the following command line:
hex2dfu -b=bin_file_name -a=hex_address_to_flash [-b=bin_file_name_N -a=hex_address_to_flash_N] -o=output_DFU_image_file_name
The following parameters are available and are optional.
Allows setting the VID of the USB device. Hexadecimal format. If not specified the STM default will be used. Usually used in conjunction with PID.
hex2dfu -h=hex_file_name -o=output_DFU_image_file_name [-v="0000"]
Allows setting the PID of the USB device. Hexadecimal format. If not specified the STM default will be used. Usually used in conjunction with VID.
hex2dfu -h=hex_file_name -o=output_DFU_image_file_name [-p="0000"]
Allows setting the firmware version of the target device. Hexadecimal format. If not specified the STM default will be used. Can be used by the DFU tool to check for a valid device to update.
hex2dfu -h=hex_file_name -o=output_DFU_image_file_name [-f=""0000""]
For documentation, providing feedback, issues and finding out how to contribute please refer to the Home repo.
Join our Discord community here.
The list of contributors to this project can be found at CONTRIBUTORS.
The nanoFramework HEX2DFU tool is licensed under the MIT license.
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.