-
Notifications
You must be signed in to change notification settings - Fork 0
Reference Device Flash Memory
Command suites for the target device, flashing, verification, and memory access. All methods return a dict. See Command-Reference for shared conventions (ranges, patches, tokens, **kwargs).
Commands that affect the target device.
Show information about the connected target device (MCU/radio/SoC).
Lock / unlock debug access.
Mass-erase the device, clearing the main flash.
Erase selected flash pages. ranges are extended to page boundaries; regions are @region names.
Enable or disable read/write protection. Set read/write to choose the protection; disable=True disables (otherwise enable is implied). Scope with ranges/regions.
Recover a bricked device.
Reset the target device.
Get the QR code from a Z-Wave application. timeout_ms is how long to wait for QR-code initialization (default 5000).
Higher-level equivalents on Target-Class:
info,reset,masserase,pageerase,enable/disableWriteProtection,enable/disableReadProtection.
flash(filenames=[], address=None, halt=False, masserase=False, reset=True, close=True, verify=True, patches=[], tokens=[], tokenfiles=[], tokengroup=None, tokendefs=None, binary=False, include_sections=[], exclude_sections=[], vtor=None, **kwargs)
Write one or more files to the target flash.
| Parameter | Meaning |
|---|---|
filenames |
File(s) to flash |
address |
Address to flash to (not for hex/s37) |
halt |
Leave target halted afterward (PC/SP from vector table) |
masserase |
Mass-erase the main flash first |
reset |
Reset after flashing (False → --noreset) |
close |
Close code regions afterward, on applicable devices (False → --noclose) |
verify |
Verify written contents (False → --noverify) |
patches |
(address, data[, length]) memory patches |
tokens |
(TOKEN_NAME, value) overrides |
tokenfiles |
Files describing tokens to write |
tokengroup |
Token set: common, zigbee, or znet
|
tokendefs |
Path to a JSON token-definition file |
binary |
Treat all files as flat binaries (no GBL/s37/hex parsing) |
include_sections / exclude_sections
|
ELF sections to include/exclude |
vtor |
Vector table address (with halt or RAM code) |
Target-Class wraps this with
flashApplication,flashRamCode, andflashPatches.
verify(filenames=None, address=None, patches=[], tokens=[], tokenfiles=[], tokengroup=None, tokendefs=None, blank=False, reset=True, regions=[], binary=False, **kwargs)
Compare device flash with the given files/options.
-
filenames— file(s) to compare against (omit and setblank=Trueto check for blank). -
address— for.bincomparison (not hex/s37). -
patches,tokens,tokenfiles,tokengroup,tokendefs— as inflash. -
blank=True— verify that main flash (orregions) is blank, with no file. -
reset=False→--noreset. -
binary=True— treat all files as flat binaries.
Read from target memory. outfile extension (.bin/.hex/.s37) chooses the format; without it, data is printed. Scope the read with ranges and/or regions (@region).
Interact with an external SPI flash.
Erase external flash. ranges use start:end or start:+length. board_id selects a Series-2 board ID when the default flashloader doesn't work. verify=False → --noverify.
Read from external flash. outfile (bin/hex/s37 by extension); without it, data is printed.
Write a file to external flash. address is required for binary input (not for hex/s37). verify=False → --noverify.
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