wyhong 02b8027be0 [Bouffalolab] Update bflb-iot-tool version and flash script (#29379) 2 лет назад
..
README.md 361893368c [GN] ESP32 flashing support (#2903) 5 лет назад
bouffalolab_firmware_utils.py 02b8027be0 [Bouffalolab] Update bflb-iot-tool version and flash script (#29379) 2 лет назад
cyw30739_firmware_utils.py 12b638314b Flake8 fixes Python error files in the scripts directory 2 лет назад
efr32_firmware_utils.py 89fc8211b4 [Silabs] Add Support for Modules for Matter (#22793) 3 лет назад
esp32_firmware_utils.py 69e96c9202 Fix unexpected firmware selection by flashing scripts (#12345) 4 лет назад
firmware_utils.py d5bfb4b38f Add isort formatter to restyled configuration (#24148) 3 лет назад
gen_flashing_script.py bcf67b3ae7 Flashing wrappers need python3 (#2710) 5 лет назад
nrfconnect_firmware_utils.py e5c1a3bb52 [nrfconnect] Add to flake8 in workflow and fix python files (#25277) 2 лет назад
psoc6_firmware_utils.py ab028397da [Infineon] Restructure p6 and cyw30739 devices to single folder (#21926) 3 лет назад
qpg_firmware_utils.py d5bfb4b38f Add isort formatter to restyled configuration (#24148) 3 лет назад
stm32_firmware_utils.py 0b9dfec117 [ST] Adding STM32 platform and lighting app example with STM32WB5MM-DK board (#28889) 2 лет назад

README.md

Flashing Scripts

Using

\${TARGET}.flash.py

When a build target has a corresponding .flash.py script, that script can be run to flash the target to an attached device.

This is really just a wrapper around ${PLATFORM}_firmware_utils.py with built-in argument defaults, so that it can typically be run with no arguments. You can however supply additional command line arguments to override or supplement the defaults, for example to select a specific connected device. In particular, ${TARGET}.flash.py --help lists the available arguments.

\${PLATFORM}_firmware_utils.py

These scripts invoking flashing tools for the particular platform with a more-or-less uniform interface. The core set of command line options is

--erase               Erase device
--application FILE    Flash an image
--verify_application  Verify the image after flashing
--reset               Reset device after flashing

Running ${PLATFORM}_firmware_utils.py --help will show the complete list of available command line options for that platform.

Generating wrappers

Normally this is done automatically for a suitable GN build target.

The script gen_flashing_script.py builds a ${TARGET}.flash.py wrapper script to invoke the firmware utils with a particular set of argument defaults. Run this as

gen_flashing_script.py ${PLATFORM} --output filename [argument ...]

The arguments are the same as those of ${PLATFORM}_firmware_utils.py. Some platforms may have additional options, e.g. to obtain additional values from a configuration file. Use gen_flashing_script.py ${PLATFORM} --help to list all options for a particular platform.