bootloader_apps_i2c

MCHP

Binary to C Array script help

This document describes the usage of btl_bin_to_c_array.py host script

Downloading the host script

To clone or download the host tools from Github,go to the bootloader repository and then click Clone button to clone this repo or download as zip file. This content can also be download using content manager by following these instructions

Path of the tool in bootloader repository is tools/btl_bin_to_c_array.py

Setting up the Host PC

Description

Usage Examples

Below is the syntax to show help menu for the script

python <harmony3_path>/bootloader/tools/btl_bin_to_c_array.py --help

Below is the syntax and an example on how to convert the binary file to a C style array containing Hex output

python <harmony3_path>/bootloader/tools/btl_bin_to_c_array.py -b <binary_file> -o <hex_file> -d <device>
python <harmony3_path>/bootloader/tools/btl_bin_to_c_array.py -b <harmony3_path>/bootloader_apps_i2c/apps/i2c_bootloader/test_app/firmware/sam_d20_xpro.X/dist/sam_d20_xpro/production/sam_d20_xpro.X.production.bin -o <harmony3_path>/bootloader_apps_i2c/apps/i2c_bootloader/host_app_nvm/firmware/src/test_app_images/image_pattern_hex_sam_d20_xpro.h -d samd2x