Upgrade the firmware via USB cable
Preface
This article describes how to burn the firmware on the host computer into the memory of the CT36L development board through USB data cable. When upgrading, you need to choose the appropriate upgrade method based on the host operating system and firmware type.
Preparation tools
- CT36L/CT36B
- Firmware
- Host
- Good USB data cable
Prepare firmware
The firmware can be obtained by compiling the SDK, or you can download the public version firmware (unified firmware) from Resource Download. There are generally two types of firmware files:
-
Single unified firmware
Unified firmware is a single file that is packaged and merged from all files such as partition table, bootloader, uboot, kernel, system, etc. The firmware officially released by Firefly adopts a unified firmware format. Upgrading the unified firmware will update the data and partition table of all partitions on the motherboard, and erase all data on the motherboard.
-
Multiple partition mirrors
That is, files with independent functions, such as partition table, bootloader, kernel, etc., are generated during the development stage. Independent partition mirroring can only update the specified partition while keeping the data in other partitions from being destroyed, which is very convenient for debugging during the development process.
Through the unified firmware unpacking/packaging tool, the unified firmware can be unpacked into multiple partition images, or multiple partition images can be merged into a unified firmware.
Install the programming tool
Windows operating system
- Install RK USB driver
Download Release_DriverAssistant.zip, unzip it, and then run DriverInstall.exe inside. In order for all devices to use updated drivers, please select Driver Uninstall first, and then select Driver Installation.
- Run SocToolKit's SocToolKit.exe
Linux operating system
No need to install device driver under Linux
- Linux_Upgrade_Tool tool
Download Linux_Upgrade_Tool, and install it into the system as follows for easy calling:
cd Linux_Upgrade_Tool
cp 88-rockusb.rules /etc/udev/rules.d/
# restart udev command:
sudo udevadm control --reload-rules
sudo service udev restart
sudo cp upgrade_tool /usr/local/bin
sudo chown root:root /usr/local/bin/upgrade_tool
sudo chmod a+x /usr/local/bin/upgrade_toolEnter upgrade mode
Usually we upgrade the firmware in MaskRom mode. Before burning the firmware, we need to connect the device and put the board into upgradeable mode.
MaskRom Mode
For an introduction to boot mode, please refer to the chapter Introduction to Upgrading Firmware
MaskRom mode is the last line of defense against bricked devices. Forcibly entering MaskRom involves hardware operations and has certain risks. Therefore, you can only try MaskRom mode if the device cannot enter Loader mode.
- CT36L Introduction
The principle of entering MaskRom is to artificially short-circuit the data pin of SPI FLASH with the ground wire. The system will think that the SPI FLASH data is wrong and clear the SPI FLASH data.
- CT36B Introduction
The principle of entering MaskRom is to artificially short-circuit the EMMC data pin and the ground wire. The system will think that the EMMC data is wrong and clear the EMMC data.
**Please read carefully and operate with caution! **
The software enters MaskRom mode
When the device system can be started and running normally
The steps are as follows:
- Unplug the device from the power supply
- Connect the device to the serial port. The default baud rate of the serial port is
115200 - Connect the USB data cable to the device and connect it to the USB port of the computer.
-
CT36L hardware wiring diagram is as follows:
-
CT36B hardware wiring diagram is as follows:
- Enter the command in the serial terminal to enter MaskRom mode.
reboot loaderHardware enters MaskRom mode
When the device system is damaged and cannot operate normally, hardware operations need to be performed to force the device into Maskrom mode.
- Unplug the device from the power supply
- Use tweezers to short-circuit the 5th pin of the SPI FLASH chip and GND, and keep it there until the power supply is connected.
-
CT36L hardware wiring diagram is as follows:
-
CT36L hardware wiring diagram is as follows:
- Connect the USB data cable to the computer USB interface. At this time, the device automatically enters MaskRom mode.
At this point the device will enter MaskRom mode.
Flash firmware
- Note: Burning firmware requires disassembling the machine casing
windows operating system
Burn unified firmware update.img
Note: SocToolKit tool version 1.8 or higher is required to support the update.img burning function.
The steps to burn unified firmware update.img are as follows:
- The device enters MaskRom mode.
- Select RV1106 chip platform.
- Click the Download button in the upper left corner to switch to the Download page.
- Select the burning method, which supports serial port burning and USB burning. It is recommended to use USB burning.
- Select the update.img unified firmware file.
- Click the
Upgradebutton in the lower right corner to start the upgrade.
Burn partition image
The steps to burn a partition image are as follows:
- The device enters MaskRom mode.
- Select RV1106 chip platform.
- Click the Download button in the upper left corner to switch to the Download page.
- Select the burning method, which supports serial port burning and USB burning. It is recommended to use USB burning.
- Select the corresponding partition firmware file.
- Click the
Downloadbutton in the lower right corner to start the upgrade.
Linux operating system
Burn unified firmware update.img
There is no tool on Linux to flash unified firmware. However, partition image burning can be performed through scripts, and the burning effect is the same as unified firmware. Please refer to the partition image burning method described below.
Burn partition image
Use the rkdownload.sh script in the Linux_Upgrade_Tool directory to burn the partition image:
For example, if the partition image is placed in the output/image directory, check the partition image in the output/image compilation output directory.
ls output/image/
boot.img download.bin env.img idblock.img oem.img rootfs.img sd_update.txt tftp_update.txt uboot.img update.img userdata.imgCopy the rkdownload.sh script to the /usr/local/bin directory for global calling
sudo cp rkdownload.sh /usr/local/bin/Specify the partition image in the output/image directory for burning
sudo rkdownload.sh -d output/imageIf an error occurs during the upgrade due to flash problems, you can try low-level formatting and erasing operations:
sudo upgrade_tool ef output/image/download.binWait for the formatting and erasing operations to be completed before trying to flash the image.
Common problem
How to force into MaskRom mode
See the "MaskRom Mode" section above.
Analysis of programming failure
If Download Boot Fail occurs during the programming process, or an error occurs during the programming process, it is usually caused by poor connection of the USB cable used, inferior wire material, or insufficient driver capability of the computer USB port. Please replace the USB cable or computer USB port to troubleshoot.

