-
Notifications
You must be signed in to change notification settings - Fork 0
Reference Image Files
Command suites for building, converting, parsing and signing firmware image files. All methods return a dict. See Command-Reference for shared conventions.
Recurring signing/encryption parameters across these suites:
-
sign_keyfile/keyfile— ECC-P256 PEM private key for signing. -
encrypt_keyfile— AES key file for encryption. -
verify_keyfile/verify_key— ECC-P256 PEM public key to verify a signature. -
extsign— produce an unsigned form for external signing; insert the signature later via the suite'ssign/--signature. -
signature— a DER ECDSA signature file.
convert(infiles, outfile=None, address=None, patches=[], ranges=[], tokens=[], tokenfiles=[], tokengroup=None, tokendefs=None, secureboot=False, keyfile=None, crc=False, certificate=None, aeskey=None, include_sections=[], exclude_sections=[], extsign=False, signature=None, verify_key=None, **kwargs)
Convert or combine input files into one output; optionally set tokens and patch binary data.
-
infiles— input file(s) to convert/combine. -
address— start address when a.binis given. -
ranges— limit output to these memory ranges. -
secureboot— create a Secure Boot image (needskeyfile,signature, orextsign). -
crc— add a CRC32 for bootloader integrity (cannot combine withsecureboot). -
certificate— certificate to append to a Secure Boot app. -
aeskey— AES key (util genkey --type aes-ccm) for bootloader app properties.
Create/parse/inspect EBL files.
Display flash/RAM usage from AAT data (Zigbee/Thread; RAM for EM3xx only).
create(outfile, app=None, sign_keyfile=None, encrypt_keyfile=None, extsign=False, signature=None, verify_keyfile=None, **kwargs)
Create an EBL file from app.
Convert a PEM public key to a token file. Deprecated — use util keytotoken. type: aes-ccm or ecc-p256.
Generate an encrypt/decrypt key or a signing key pair. Deprecated — use util genkey.
Parse an EBL file; optionally write the app image to app.
Print information about an EBL file.
Create/parse/sign GBL3 files.
As above (AAT flash/RAM usage).
create(outfile, app=None, bootloader=None, seupgrade=None, metadata=None, compress=None, certificate=None, include_sections=[], exclude_sections=[], seunencrypted=False, dep_app=None, dep_boot=None, dep_se=None, delta_app=None, sign_keyfile=None, encrypt_keyfile=None, extsign=False, signature=None, verify_keyfile=None, **kwargs)
Create a GBL3 file. Highlights: bootloader/seupgrade/metadata payloads, compress (lz4/lzma), seunencrypted (place SE upgrade outside the encrypted area), version dependencies (dep_app/dep_boot/dep_se), and delta upgrades (delta_app).
Convert a PEM public key to a token file. Deprecated — use util keytotoken.
Generate a key. Deprecated — use util genkey.
parse(infile, app=None, bootloader=None, seupgrade=None, metadata=None, verify_keyfile=None, decrypt_keyfile=None, **kwargs)
Parse a GBL3 file; export images to the given files.
Sign a GBL3 file (e.g. an .extsign from create(extsign=True)) with an external signature.
GBLv4 files.
create(outfile, config=None, data=[], seupgrade=None, encrypt_keyfile=None, compress=None, certificate=None, sign_keyfile=None, extsign=False, productid=None, bundleversion=None, minversion=None, **kwargs)
Create a GBLv4 file. config (a YAML) overrides the individual options if set. data may be repeated for multiple app/bootloader images. productid is a 128-bit hex vendor/product ID; bundleversion/minversion gate (partial) DFU.
Write a template config YAML for GBLv4 input.
Parse and show info about a GBLv4 file.
Parse a GBLv4 file; export updates and/or the SE upgrade. Multiple updates get an index suffix (e.g. file_0.s37).
Sign a GBLv4 file using an external signature (DER ECDSA of the .manifest).
Matter and Zigbee OTA files.
Create an OTA file. type is zigbee (default) or matter. The Matter and Zigbee paths use different parameter groups:
-
Matter:
input_files,vendorid,productid,swversion,swstring,min_sw,max_sw,releasenote,digest. -
Zigbee:
upgrade_images,firmware_version,manufacturer_id,image_type,string,stack_version,credentials,destination,min_hw,max_hw,null_tag,manufacturer_tags. -
Both:
certificate,sign,extsign.
Parse an OTA file (type: matter/zigbee).
Sign an OTA file with signature, using the named curve.
Verify an OTA file against a certificate.
RPS files (SiWx91x).
create(outfile, encrypt_key=None, mic_key=None, iv_file=None, sign_keyfile=None, sha=None, extsign=False, address=None, app=None, app_version=None, fw_info=None, include_sections=[], exclude_sections=[], map_file=None, combinedimage=False, key_type=None, new_key=None, prev_key=None, **kwargs)
Create an RPS file.
convert(outfile, encrypt_key=None, mic_key=None, iv_file=None, sign_keyfile=None, sha=None, extsign=False, app=None, nwpapp=None, app_version=None, fw_info=None, combinedimage=False, **kwargs)
Convert an application image to an RPS file. nwpapp adds an NWP application image.
Load an RPS file to the device. eraseapp=True erases the application first.
Sign an RPS file with an external signature.
Run post-build tasks defined in a post-build YAML (.slpb) file.
-
parameters: list[tuple[str, str]]—(name, value)overrides. -
dryrun=Trueresolves input filenames without running tasks.
PyCommander · GitHub · Simplicity Commander docs · Licensed under the Silicon Labs MSLA
Getting started
Using PyCommander
Topics
Command reference
- Overview
- adapter · aem · vcom · ctune
- device · flash · verify · readmem · extflash
- security
- tokens · nvm3 · littlefs
- convert · ebl · gbl3 · gbl4 · ota · rps · postbuild
- util · serial · mfg917
Contributing