使用HTTP进行OTA升级有时成功,有时失败,CRC校验提示是什么...

发布于 2020-02-13 12:00:59
    本帖最后由 面码1314 于 2020-2-13 12:15 编辑


整个升级过程如下,从bootloader烧录开始
1.bootloader烧录
21.png
[E]Get firmware header occurCRC32(calc.crc: 7b93c5c8 != hdr.info_crc32: ffffffff) error on 'download'partition![E]Get OTA download partition firmwareheader failed![E]Getfirmware header occur CRC32(calc.crc: 7b93c5c8 != hdr.info_crc32: ffffffff)error on 'app' partition


2.下载1.00程序
22.png


[I]RT-Thread OTA package(V0.2.1) initializesuccess.[E]Get firmware header occurCRC32(calc.crc: 7b93c5c8 != hdr.info_crc32: ffffffff) error on 'download'partition![E]Get OTA download partition firmwareheader failed![E]Get firmware header occurCRC32(calc.crc: 7b93c5c8 != hdr.info_crc32: ffffffff) error on 'app' partition!

3.打包2.00程序 用于HTTP升级
打包信息如下
27.png


挂上服务器进行下载 进行升级为2.0.0版本

28.png


[I]RT-Thread OTA package(V0.2.1) initializesuccess.[E]Get firmware header occurCRC32(calc.crc: 7b93c5c8 != hdr.info_crc32: ffffffff) error on 'app' partition![E]Get 'app' partition firmware headerfailed! This partition will be forced to upgrade.[I]Verify 'download' partition(fw ver:2.0.0, timestamp: 1581565642) success.[E]Get firmware header occurCRC32(calc.crc: 7b93c5c8 != hdr.info_crc32: ffffffff) error on 'app' partition![I]OTA firmware(app) upgrade startup.[I]The partition 'app' is erasing.[I]The partition 'app' erase success.[I]OTA Write: [> ]0%[I][2A[I]OTAWrite: [===>
29.png


[I]OTA Write:[==============================================================================================> ] 94%[I][2A[I]OTA Write:[================================================================================================> ] 96%[I][2A[I]OTA Write:[===================================================================================================>]99%[I][2A[I]OTA Write:[====================================================================================================]100%[I]Verify 'app' partition(fw ver: 2.0.0,timestamp: 1581565642) success.[32;22m[I/FAL] Find user firmware at apppartition 0x08010000 successfully.[0m[32;22m[I/FAL] Bootloader jumps to userfirmware now.[0m \ |/- RT - Thread Operating System / |\ 4.0.2 build Feb 12 2020 2006- 2019 Copyright by rt-thread team[32m[2] I/at.clnt: AT client(V1.3.0) ondevice uart2 initialize success. [0m[32m[10] I/sal.skt: Socket AbstractionLayer initialize success. [0m[D/FAL] (fal_flash_init:61) Flash device| onchip_flash | addr:0x08000000 | len: 0x00080000 | blk_size: 0x00000800 |initialized finish.[32;22m[I/FAL] ==================== FALpartition table ====================[0m[32;22m[I/FAL] | name | flash_dev | offset | length |[0m[32;22m[I/FAL]-------------------------------------------------------------[0m[32;22m[I/FAL] | bl | onchip_flash | 0x00000000 | 0x00010000|[0m[32;22m[I/FAL] | app | onchip_flash | 0x00010000 | 0x00030000|[0m[32;22m[I/FAL] | download | onchip_flash |0x00040000 | 0x00038000 |[0m[32;22m[I/FAL]=============================================================[0m[32;22m[I/FAL] RT-Thread Flash AbstractionLayer (V0.4.99) initialize success.[0m

看到最后成功升级到2.0.0版本


4.打包3.00程序 用于HTTP升级
打包信息如下
30.png


升级失败
31.png


发现这里的校验和之前的不同
[I]RT-Thread OTA package(V0.2.1) initialize success.
[E]Verify firmware CRC32(calc.crc: 45b1a272 != hdr.crc: cc630c22) failed on partition 'download'.
[I]Verify 'app' partition(fw ver: 2.0.0, timestamp: 1581565642) success.
[I/FAL] Find user firmware at app partition 0x08010000 successfully.

不是!= hdr.info_crc32: ffffffff




多次尝试都是这样,有时可以升级 有时不可以,但是一旦出现一次吗,没有升级成功 ,就再也升级不成功了




查看更多

关注者
0
被浏览
566
6 个回答
面码1314
面码1314 2020-02-13
对比过 每次升级下载的数据和 rtthread.rbl数据。打印出来数据一致
面码1314
面码1314 2020-02-13
[E]Get firmware header occurCRC32(calc.crc: 7b93c5c8 != hdr.info_crc32: ffffffff) error on 'app' partition!
[E]Get 'app' partition firmware headerfailed! This partition will be forced to upgrade.
[I]Verify 'download' partition(fw ver:2.0.0, timestamp: 1581565642) success.
[E]Get firmware header occurCRC32(calc.crc: 7b93c5c8 != hdr.info_crc32: ffffffff) error on 'app' partition!

升级成功,是在获取“app”分区固件头失败后,app分区被强制升级的。
这种获取"app"分区固件头失败,是正常情况吗
面码1314
面码1314 2020-02-13
shao7936626 发表于 2020-2-13 14:22
检查一下flash


请问是 检查关于FLASH的设置分区吗
面码1314
面码1314 2020-02-13
重新回到最初的使用 Ymodem 升级固件

发现虽然是成功升级 但是 依然有强制升级的提示

32.png

33.png

[E]Get firmware header occur CRC32(calc.crc: 7b93c5c8 != hdr.info_crc32: ffffffff) error on 'app' partition!
[E]Get 'app' partition firmware header failed! This partition will be forced to upgrade.
[I]Verify 'download' partition(fw ver: 2.0.0, timestamp: 1581583155) success.
[E]Get firmware header occur CRC32(calc.crc: 7b93c5c8 != hdr.info_crc32: ffffffff) error on 'app' partition!
[I]OTA firmware(app) upgrade startup.


依然是
E] 获取固件头occurc32(calc.crc:7b93c5c8!=hdr.info_crc32:ffffffff)app分区出错!

[E] 获取“app”分区固件头失败!此分区将被强制升级。



对比了一下官网上的采用这个升级的程序的图片
34.png
感觉虽然也是获取app头失败 但是没有进行强制升级

面码1314
面码1314 2020-02-13
有点怀疑是自己在做分区的时候的问题。
采用的STM32F103ZET6 512KFLASH 64KRAM

app分区 和download分区

41.png


预留64K 作为BootLoader 。 全部使用内部FLASH

APP 192K
Download 224K


42.png

{FAL_PART_MAGIC_WORD, "bl", "onchip_flash", 0, 64*1024, 0}, \
{FAL_PART_MAGIC_WORD, "app", "onchip_flash", 64*1024, 192*1024, 0}, \
{FAL_PART_MAGIC_WORD, "download", "onchip_flash", 256*1024, 224*1024, 0}, \


不知道我这里理解对了没有 ,第一个 “bl” 分区 是保留分区 , 存放BootLoader

后面依次递增的为 app分区 download分区

43.png


撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友