10.2.4. 测试指南
配置连接PC端串口或C3模块串口
10.2.4.1. 验证
10.2.4.1.1. 查看 OTA 升级命令
...
zx_uart_ota - Use Uart to download the firmware
...
10.2.4.1.2. 启动 OTA 升级
开发版执行命令 zx_uart_ota uartx
C3模块或PC端向 uartx 发送升级包数据
以下是相关升级信息
ZXM47D0N /> zx_uart_ota uart2
01-01 10:02:16 I/NO_TAG: osAB_now = A
01-01 10:02:16 I/NO_TAG: Upgrade B system
open uart2 finish
ZXM47D0N /> ota_file_type 0.
ota_file_size 16826880.
01-01 10:02:18 I/NO_TAG: find file m4_os.itb cpio data success
01-01 10:02:18 I/NO_TAG: Start upgrade to os_r, flag_cpio:0!
01-01 10:02:18 I/NO_TAG: Partition (os_r) find success!
01-01 10:02:18 I/NO_TAG: Start erase nand flash partition!
01-01 10:02:18 I/NO_TAG: Erase nand flash partition success! len = 32
01-01 10:02:18 I/NO_TAG: Start upgrade m4_os.itb!
Download: [====================================================================================================] 100%
01-01 10:02:24 I/NO_TAG: Sum check success!
01-01 10:02:24 I/NO_TAG: download m4_os.itb success!
01-01 10:02:24 I/NO_TAG: find file rodata.fatfs cpio data success
01-01 10:02:24 I/NO_TAG: Start upgrade to rodata_r, flag_cpio:1!
01-01 10:02:24 I/NO_TAG: Partition (rodata_r) find success!
01-01 10:02:25 I/NO_TAG: Start erase nand flash partition!
01-01 10:02:25 I/NO_TAG: Erase nand flash partition success! len = 64
01-01 10:02:25 I/NO_TAG: Start upgrade rodata.fatfs!
Download: [====================================================================================================] 100%
01-01 10:02:56 I/NO_TAG: Sum check success!
01-01 10:02:56 I/NO_TAG: download rodata.fatfs success!
01-01 10:02:56 I/NO_TAG: find file data.fatfs cpio data success
01-01 10:02:57 I/NO_TAG: Start upgrade to blk_data_r, flag_cpio:2!
01-01 10:02:57 I/NO_TAG: Partition (blk_data_r) find success!
01-01 10:02:57 I/NO_TAG: NFTL partition not need to erase!
01-01 10:02:57 I/NO_TAG: Start upgrade data.fatfs!
[ND]nftl start:120,51
[ND]nftl ok!
ota_rev_size 16826880=========================================================================================>] 099%
ota_file_size 16826880
Download: [====================================================================================================] 100%
01-01 10:03:29 I/NO_TAG: Sum check success!
01-01 10:03:29 I/NO_TAG: download data.fatfs success!
01-01 10:03:29 I/NO_TAG: find file TRAILER!!! cpio data success
update from ota ok.
01-01 10:03:29 I/NO_TAG:
01-01 10:03:29 I/NO_TAG: Download firmware to flash success.
01-01 10:03:29 I/NO_TAG: System now will restart...
01-01 10:03:29 I/NO_TAG: Next startup in B system
ota time:70.6
01-01 10:03:31 I/NO_TAG: Restarting system ...
备注
升级完成以后,自动重启,加载新代码启动
10.2.4.1.3. 升级判断
从程序打印log差异和文件系统中文件差异判断当前运行的版本
10.2.4.1.4. Boot 相关打印信息
Start-up from os/os_r
备注
os 表示从 os 分区读取数据启动 RTT 程序。
os_r 表示从 os_r 分区读取数据启动 RTT 程序。