Bootloader¶
How to Run Bootloader¶
This section describes how to update firmware using the bootloader tool. Before running the bootloader, make sure the robot is powered on and the correct firmware file is prepared.
Downloads (Bootloader)¶
bootloader: Download
The downloaded files include HEX firmware images for each robot module and bootloader executables for different system architectures.
HEX Firmware Files¶
Each HEX file contains the firmware image for the actuator modules indicated by its file name.
File name |
Target module |
|---|---|
|
head_0, head_1 |
|
left_arm_0 |
|
left_arm_1,left_arm_2 |
|
left_arm_3 |
|
left_arm_4 |
|
left_arm_5 |
|
right_arm_0, right_arm_1, right_arm_2 |
|
right_arm_3 |
|
right_arm_4 |
|
right_arm_5 |
|
torso_0, torso_1, torso_2 |
|
torso_3, torso_5 |
|
torso_4 |
Bootloader Executables¶
Select the bootloader executable that matches the architecture of the system where the bootloader will be executed.
File name |
Target system |
|---|---|
|
ARM-based systems, such as Jetson |
|
x86_64 systems |
Note
Use the HEX file that matches the target module. Using an incorrect HEX file may erase or flash the wrong actuator.
Warning
Ensure that the robot’s main power is turned off before proceeding.
Usage (Bootloader)¶
## For ARM-based systems
sudo chmod +x upc_firmware_bootloader_jetson
## For x86_64 systems
sudo chmod +x upc_firmware_bootloader_x86
# RUN
./upc_firmware_bootloader_<OS> <RPC IP> <TARGET JOINT> <HEX FILE>
## ex) torso_0.
## For ARM-based systems
./upc_firmware_bootloader_jetson 192.168.30.1 torso_0 com_torso_0_1_2.hex
## For x86_64 systems
./upc_firmware_bootloader_x86 <RPC IP> torso_0 com_torso_0_1_2.hex
After running the bootloader command, the flash target confirmation message will be displayed.
========================================
UPC->RPC CAN Bootloader Flash (native RPC burn worker)
========================================
[OK] HEX parsed
========================================
FLASH TARGET CONFIRMATION
========================================
[TARGET] joint=torso_0
[TARGET] hex=com_torso_0_1_2.hex
[WARN] Wrong CAN/BNO/HEX can erase or flash the wrong actuator.
[WARN] No SSH, power, erase, or burn command has been sent yet.
Type "yes" to start flash [yes]:
If the target joint and HEX file are correct, type yes and press Enter to start the flash process.
Type "yes" to start flash [yes]: yes
Result Guide (Bootloader)¶
Success Case (Bootloader)¶
[DONE] flash sequence complete
Failure Cases (Bootloader)¶
If the bootloader fails, check the error message and rerun the flash process again. In most cases, the firmware can be recovered by running the bootloader again.
Unsupported firmware version
This error occurs when the firmware version does not support the bootloader.
[FAIL] unsupported firmware version for this bootloader
Incorrect HEX file
This error occurs when the selected .hex file does not match the target joint.
[ERR] HEX filename <Hex File Name>.hex is not allowed for joint torso_0 (expected=com_torso_0_1_2.hex)
Check that the target joint name and .hex filename are correct, then run the bootloader again.
Error during Erase
This error occurs when the erase step does not complete normally.
[STEP] ERASE start (may take up to ~30s)
[WARN] ERASE ack(22) not received, retry 2/2
[SUMMARY] rewrite-required failure: ERASE ack(22) not received after 2 attempts
[RECOVERY] image state is uncertain; rerun the full flash to perform full erase + full rewrite
[STEP] cleanup remote resources
[OK] cleanup done
In this case, the firmware image state may be uncertain.
Run the flash process again to perform erase and rewrite.
Error during burn
This error occurs when communication fails while writing the firmware.
[STEP] BURN start (8816/8816 lines)
progress: 5290/8816 (60%) elapsed=9.99s rate=530 lines/s
[SUMMARY] rewrite-required failure: BL handshake timeout at line 5337 (expected 99)
[RECOVERY] image state is uncertain; rerun the full flash to perform full erase + full rewrite
[STEP] cleanup remote resources
[OK] cleanup done
In this case, the firmware write process was interrupted. Run the flash process again to perform erase and rewrite.
Unsupported firmware version
This error occurs when the current firmware version is too old to be supported by this bootloader.
[FAIL] unsupported firmware version for this bootloader
If FAIL is displayed, please save the terminal output and contact our CS team(rby.support@rainbow-robotics.com).