Two implementation methods are provided: GUI and CLI.

Terminology Explanation: Terminology Explanation

Download all-app.bin

  1. Using CLI

    .\bk_loader.exe download -p COM11 -b 1500000 --reset_baudrate 115200 -i D:/all-app.bin --reboot

  • .\bk_loader.exe: CLI tool path

  • download: download

  • -p: Serial port name

  • -b: Working baud rate

  • --reset_baudrate: Reset baud rate

  • -i: bin file path

  • --reboot: Reboot device after download completes

There are two ways to specify bin files on the CLI: -i / --infile and --infile_json. The differences are:

Aspect

-i / --infile

--infile_json

Input form

String: path or path@addr-length

JSON array of {"path":..., "start":..., "len":...}

Multi-bin separator

Comma , (a.bin@0x0-0x1000,b.bin@0x11000-0x2000)

Expressed by the JSON array; no comma needed

Path containing comma

Not supported (comma is treated as a separator)

Supported

Optional start / len

The whole @addr-length may be omitted; if present, both are required

Each is optional: start falls back to -s / 0x0; len defaults to the full file

Typical use cases

Single file with a path that has no special characters

Multiple bins, paths containing commas, or when a structured form is preferred

Warning

When specifying the firmware path with -i / --infile, the path must not contain spaces or special characters such as parentheses (), commas ,, &, ;, or |. If the path does contain a comma, use --infile_json to pass the input via JSON instead (see examples below). If you must use the -i option, it is recommended to wrap the firmware path in double quotes.

  1. Using GUI

  • Select all-app.bin file

../../_images/download_all_app.png

Specify the bin files to download via JSON

Each item in the JSON array describes one bin (the array may contain a single item or multiple items):

  • path: Path to the bin file. Required. Supports characters such as commas.

  • start: Flash start address. Optional. Falls back to -s / --startaddr, then to 0x0.

  • len: Length to download. Optional. Defaults to the full file length. Accepts hex strings (e.g., "0x1000") or integers.

  1. Minimal form (path only; the entire file is written to the address from -s, defaulting to 0x0):

    [{"path": "D:/fw/app,v1.bin"}]
    
  2. Specifying a start address and length:

    [{"path": "D:/fw/app.bin", "start": "0x1000", "len": "0x2000"}]
    
  3. Downloading multiple bin files in one command:

    [
      {"path": "D:/fw/bootloader.bin"},
      {"path": "D:/fw/app.bin", "start": "0x11000"}
    ]
    

CLI invocation (pass the JSON above as the value of --infile_json):

.\bk_loader.exe download -p COM11 -b 1500000 --reset_baudrate 115200 --infile_json <JSON> --reboot

Note

--infile_json and -i / --infile are mutually exclusive; use one of them.

Download the first 8K data of all-app.bin to flash address 0x1000

  1. Using CLI

    .\bk_loader.exe download -p COM11 -b 1500000 --reset_baudrate 115200 -i D:/all-app.bin@0x1000-0x2000 --reboot

  • -i: bin file path

  • D:/all-app.bin@0x1000-0x2000 format: path@addr-length
    • path: bin file path

    • addr: flash start address

    • length: length to operate

  1. Using GUI

  • Select all-app.bin file

  • Edit region

../../_images/download_all_app_pre_8k_1.png
../../_images/download_all_app_pre_8k_2.png
../../_images/download_all_app_pre_8k_3.png

Download bootloader-ota.bin

bootlader-ota.bin is used to upgrade bootloader

  1. Using command line:

    .\bk_loader.exe download -p COM11 -b 1500000 --reset_baudrate 115200 -i D:/bootloader-ota.bin --reboot

  2. Using GUI

  • Select bootloader-ota.bin file

../../_images/download_bootloader_ota.png

Download all-app-outter-flash.bin

all-app-outter-flash.bin can be used to download external flash

  1. Using command line:

    .\bk_loader.exe download -p COM11 -b 1500000 --reset_baudrate 115200 -i D:/all-app-outter-flash.bin --reboot

  2. Using GUI

  • Select all-app-outter-flash.bin file

../../_images/download_outter_flash.png

Download Device Name

Device name example, in string format, downloaded to flash address 0x1000 with big-endian byte order.

  1. Using CLI

    .\bk_loader.exe download -p COM11 -b 1500000 --reset_baudrate 115200 --expand_data device_name@3@0x1000@example --reboot

  • --expand_data: Extended data

  • Extended data format name@type@addr@data
    • name: Extended data name

    • type: Extended data type

    • addr: Flash address

    • data: Extended data value

Extended data: Extended Data

  1. Using GUI

  • Add extended data

  • Fill in name, type, address, data

Warning

No spaces allowed in the name.

../../_images/download_device_name_1.png
../../_images/download_device_name_2.png

Download Extended Data

  1. Using CLI .\bk_loader.exe download -p COM11 -b 1500000 --reset_baudrate 115200 --expand_data name@type@addr@value --reboot

  • name: Extended data name

  • type: Byte order

  • addr: Extended data address

  • value: Extended data value

  1. Using GUI

  • Add extended data

  • Fill in name, byte order, address, data

../../_images/download_expand_data_1.png
../../_images/download_expand_data_2.png

Download OTP/eFuse

OTP/eFuse file is in JSON format

  1. Using CLI

    .\bk_loader.exe download -p COM11 -b 1500000 --reset_baudrate 115200 --safe_json D:/safe.json --reboot

  • --safe_json: OTP/eFuse file path

  1. Using GUI

  • Select OTP/eFuse file

Warning

Warning: OTP/eFuse data cannot be modified once downloaded. Please ensure the data content is completely correct before performing the download operation!

../../_images/download_efuse.png

Erase All Flash Data

  1. Using CLI

    .\bk_loader.exe erase -p COM11 -b 1500000 --reset_baudrate 115200 --chip_all --reboot

  • erase: Erase

  • --chip_all: All flash

  • --reboot: Reboot device after erase completes

  1. Using GUI

  • Select full erase

Warning

Warning: Flash contains important calibration data. Please ensure the correctness of the erase area.

../../_images/erase_all.png

Erase Specified Flash Area Data

  1. Using CLI

    .\bk_loader.exe erase -p COM11 -b 1500000 --reset_baudrate 115200 -f 0x1000-0x2000,0x3000-0x4000 --reboot

  • erase: Erase

  • -f: Specify the flash area to erase

  • Format: -f:addr1-length1,addr2-length2
    • addr1: Start address of the flash area to erase

    • length1: Length of the flash area to erase

    • addr2: Start address of the flash area to erase

    • length2: Length of the flash area to erase

  1. Using GUI

  • Fill in the area

  • Start erasing

../../_images/erase_custom_1.png
../../_images/erase_custom_2.png

Read OTP/eFuse

The GUI entry is otp/efuse: the tool dispatches OTP or eFuse automatically by address. The CLI also exposes --read_efuse / --read_otp to target a specific channel.

  1. Using CLI

    • Auto dispatch (recommended, matches the GUI custom mode):

      .\bk_loader.exe read -p COM11 -b 1500000 --reset_baudrate 115200 --read_otp_efuse_auto 0x44850014-4 --reboot

    • Read eFuse only:

      .\bk_loader.exe read -p COM11 -b 1500000 --reset_baudrate 115200 --read_efuse 0-0 --reboot

    • Read OTP only:

      .\bk_loader.exe read -p COM11 -b 1500000 --reset_baudrate 115200 --read_otp 0x4b010000-4 --reboot

    Field reference:

    • read: Read

    • --read_otp_efuse_auto: Auto-dispatch OTP/eFuse by address; refer to the chip datasheet for the valid address range

    • --read_efuse: eFuse only; argument format is addr-length, where 0-0 reads the entire eFuse

    • --read_otp: OTP only, address is the OTP register address

    • Argument format: addr-length, multiple ranges separated by commas (e.g. 0x44850014-4,0xa-4)

  2. Using GUI

  • Set read type to otp/efuse

  • Two read modes are available:

    • Custom: manually add one or more address ranges (start address + length)

    • As JSON: pick a local JSON config file and read in batch according to the file

../../_images/read_efuse.png

Read All Flash Data

  1. Using CLI

    .\bk_loader.exe read -p COM11 -b 1500000 --reset_baudrate 115200 --chip_all --reboot

  • --reboot: Reboot device after read completes

  1. Using GUI

  • Select all flash

../../_images/read_all.png

Read Specified Flash Area

  1. Using CLI

    .\bk_loader.exe read -p COM11 -b 1500000 --reset_baudrate 115200 0 -f 0x0-0x1000,0x2000-0x3000 --reboot

  2. Using GUI

  • Fill in the area

../../_images/read_custom_1.png
../../_images/read_custom_2.png