A. How many flashing tools are there?

After pulling the SDK from

https://github.com/Ameba-AIoT/ameba-rtos 

You’ll find all the latest flashing/download tools under the tools directory:

1. ImageTool

Path: ameba-rtos/tools/ameba/ImageTool 

  • Windows flashing tool
  • Supports partition-based firmware download and firmware packaging

2. MP_ImageTool

Path: ameba-rtos/tools/ameba/MP_ImageTool_1_N

  • Used for downloading packaged firmware

3. flash.py

Path: ameba-rtos/tools/meta_tools/scripts/flash

  • Flashing tool for Linux

B. ImageTool

You must first select a device partition description file via FILE → Select a device partition descriptor: AmbeDplus_FreeRTOS_NOR.rdev

The device partition file mainly includes two partitions:

  • km4_boot_all.bin
  • km0_km4_app.bin

 

When developing through the SDK, these two files are generated. In most cases, you only need to flash km0_km4_app.bin.

If you want to download a packaged firmware using ImageTool, simply configure it as shown in the image below. Since the firmware size may be unknown, the End Addr is usually set larger than required. (Using MP_ImageTool avoids this issue completely.)

 

A packaged firmware combines km4_boot_all.bin and km0_km4_app.bin into a single .bin file for easy distribution. BW20’s factory firmware is packaged in this way.

 

How to generate packaged firmware:

Click the Generate tab and select the km4_boot_all.bin and km0_km4_app.bin files as shown below. Enter the offset and click Generate to output the Image_All.bin.

 

C. MP_ImageTool

MP_ImageTool is specifically designed for flashing packaged firmware.

You can download BW20's standard firmware here: https://aithinker-static.oss-cn-shenzhen.aliyuncs.com/docs/Firmware/3108-BW20_middleware_combo_soft_V4.18_P1.0.17-OTA_Tag_1.6-4M-20250414.bin

Steps:

  • First select AmbeDplus under Chip Select.
  • Follow the sequence shown in the screenshot to download the firmware.

 

Before starting: Hold the burn button on the development board → press and release the EN button → release the burn button. This puts the board into flashing mode.

 

D. flash.py

flash.py is a tool designed for conveniently flashing firmware under Linux.

When using flash.py for the first time, you may encounter an error:

 

This is usually due to a mismatched flash partition, because the factory-flashed firmware is packaged, while flash.py uses the partition layout from the device descriptor file: AmbeDplus_FreeRTOS_NOR.rdev

Solution: Flash the device once using ImageTool, and afterwards flash.py will work normally.

flash.py command format:

flash.py -a COMx

Example based on your device:

flash.py -p /dev/ttyCH341USB0