https://github.com/nanoframework/hex2dfu
🛠hex2dfu tool (nanoFramework toolbox)
https://github.com/nanoframework/hex2dfu
Last synced: about 1 year ago
JSON representation
🛠hex2dfu tool (nanoFramework toolbox)
- Host: GitHub
- URL: https://github.com/nanoframework/hex2dfu
- Owner: nanoframework
- License: mit
- Created: 2019-06-18T17:02:40.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2023-09-14T14:01:34.000Z (almost 3 years ago)
- Last Synced: 2024-10-29T21:06:14.710Z (over 1 year ago)
- Language: C#
- Homepage: https://www.nanoframework.net
- Size: 148 KB
- Stars: 9
- Watchers: 5
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://opensource.org/licenses/MIT) [](https://github.com/nanoframework/Home/blob/main/CONTRIBUTING.md) [](https://dev.azure.com/nanoframework/hex2dfu/_build/latest?definitionId=41&branchName=main) [](https://discord.gg/gCyBu8T)

-----
### Welcome to the **nanoFramework** HEX2DFU tool repository!
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.
## Usage
### Create a DFU file from a single hex file
To create a DFU package from a single hex file use the following command line:
```cmd
hex2dfu -h=hex_file_name -o=output_DFU_image_file_name
```
### Create a DFU file from one or more bin files
To create a DFU package from one (or more) bin files use the following command line:
```cmd
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
```
### Optional parameters
The following parameters are available and are optional.
#### Set the VID of target USB device
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.
```cmd
hex2dfu -h=hex_file_name -o=output_DFU_image_file_name [-v="0000"]
```
#### Set the PID of target USB device
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.
```cmd
hex2dfu -h=hex_file_name -o=output_DFU_image_file_name [-p="0000"]
```
#### Set the firmware version of the target device
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.
```cmd
hex2dfu -h=hex_file_name -o=output_DFU_image_file_name [-f=""0000""]
```
## Feedback and documentation
For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).
Join our Discord community [here](https://discord.gg/gCyBu8T).
## Credits
The list of contributors to this project can be found at [CONTRIBUTORS](https://github.com/nanoframework/Home/blob/main/CONTRIBUTORS.md).
## License
The **nanoFramework** HEX2DFU tool is licensed under the [MIT license](https://opensource.org/licenses/MIT).
## Code of Conduct
This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/)
to clarify expected behavior in our community.