qualcomm/qbox
Loading...
Searching...
No Matches
make_config_zip Namespace Reference

Functions

 hex_to_bin (path)
 bin_to_hex (data)

Variables

 outzip = sys.argv[1]
 inputs = sys.argv[2:]
 base = os.path.basename(f)
 ext = os.path.splitext(f)[1].lower()
str bin_name = os.path.splitext(base)[0] + '.bin'

Detailed Description

Build a config zip from json and hex source files.

Usage: make_config_zip.py output.zip input1.json input2.hex ...

Supported input formats:
  .json  — included as-is
  .hex   — sparse hex format, converted to binary before packing
  .bin   — included as-is

Sparse hex format (.hex):
  Lines of "hex_offset hex_value" (32-bit words, little-endian).
  Lines starting with # are comments. Blank lines are ignored.
  The total binary size is determined by the last offset + 4.
  All unspecified words are zero.

  Example:
    # register reset values
    00000000 00200001
    00000004 0201e080
    000fffb8 80000000

Function Documentation

◆ bin_to_hex()

make_config_zip.bin_to_hex ( data)
Convert binary to sparse hex format (for reference/generation).

◆ hex_to_bin()

make_config_zip.hex_to_bin ( path)
Convert sparse hex file to binary.