RT-Thread OTA HTTP升级日志记录

在局域网下实现2个文件下载功能:

在这里插入图片描述
在这里插入图片描述

在RT-Thread Studio中配置其中一个URL:
在这里插入图片描述
则可以通过http_ota或者http_ota http://192.168.168.108:8080/file/download/cheche2.0.1.rbl 实现升级功能。

下面的日志中,第55行,138行,211行分别是三个不同版本固件的打印日志,可以验证升级成功。

[SFUD]Find a Winbond flash chip. Size is 16777216 bytes.
[SFUD]spi flash device is initialize success.

 __  ___     __   __   __  ___ 
|__)  |  __ |__) /  \ /  \  |  
|  \  |     |__) \__/ \__/  |  
2006 - 2019 Copyright by rt-thread team
                0.9.2 build Apr  4 2021
[D/FAL] (fal_flash_init:63) Flash device |    onchip_flash_16k_part | addr: 0x08000000 | len: 0x00020000 | blk_size: 0x00004000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |             onchip_flash | addr: 0x08020000 | len: 0x000e0000 | blk_size: 0x00020000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |                nor_flash | addr: 0x00000000 | len: 0x01000000 | blk_size: 0x00001000 |initialized finish.
[I/FAL] ==================== FAL partition table ====================
[I/FAL] | name     | flash_dev    |   offset   |    length  |
[I/FAL] -------------------------------------------------------------
[I/FAL] | app      | onchip_flash | 0x00000000 | 0x00060000 |
[I/FAL] | download | nor_flash    | 0x00400000 | 0x00200000 |
[I/FAL] | factory  | nor_flash    | 0x00600000 | 0x00200000 |
[I/FAL] =============================================================
[I/FAL] RT-Thread Flash Abstraction Layer (V0.4.0) initialize success.
[I/FAL] System initialization successful.
[I]RT-Thread OTA package(V0.2.1) initialize success.
[E]Get firmware header occur CRC32(calc.crc: 7b93c5c8 != hdr.info_crc32: ffffffff) error on 'download' partition!
[E]Get OTA download partition firmware header failed!
[E]Get firmware header occur CRC32(calc.crc: 7b93c5c8 != hdr.info_crc32: ffffffff) error on 'app' partition!
[I]Begin to execute the program on app partition.
[I/FAL] Find user firmware at app partition 0x08020000 successfully.
[I/FAL] Bootloader jumps to user firmware now.

 \ | /
- RT -     Thread Operating System
 / | \     4.0.2 build Apr  5 2021
 2006 - 2019 Copyright by rt-thread team
[I/sal.skt] Socket Abstraction Layer initialize success.
[SFUD] Find a Winbond flash chip. Size is 16777216 bytes.
[SFUD] W25Q128 flash device is initialize success.
[I/at.clnt] AT client(V1.3.0) on device uart3 initialize success.
[D/at.dev.esp] network interface device(esp0) set up status
[D/FAL] (fal_flash_init:63) Flash device |         onchip_flash_16k | addr: 0x08000000 | len: 0x00010000 | blk_size: 0x00004000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |         onchip_flash_64k | addr: 0x08010000 | len: 0x00010000 | blk_size: 0x00010000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |        onchip_flash_128k | addr: 0x08020000 | len: 0x00060000 | blk_size: 0x00020000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |                  W25Q128 | addr: 0x00000000 | len: 0x01000000 | blk_size: 0x00001000 |initialized finish.
[I/FAL] ==================== FAL partition table ====================
[I/FAL] | name       | flash_dev         |   offset   |    length  |
[I/FAL] -------------------------------------------------------------
[I/FAL] | bootloader | onchip_flash_16k  | 0x00000000 | 0x00010000 |
[I/FAL] | param      | onchip_flash_64k  | 0x00000000 | 0x00010000 |
[I/FAL] | app        | onchip_flash_128k | 0x00000000 | 0x00060000 |
[I/FAL] | easyflash  | W25Q128           | 0x00000000 | 0x00400000 |
[I/FAL] | download   | W25Q128           | 0x00400000 | 0x00200000 |
[I/FAL] | factory    | W25Q128           | 0x00600000 | 0x00200000 |
[I/FAL] | filesystem | W25Q128           | 0x00800000 | 0x00800000 |
[I/FAL] =============================================================
[I/FAL] RT-Thread Flash Abstraction Layer (V0.5.0) initialize success.
[D/main] Hello RT-Thread! 
[D/main] I'm haha.
[D/main] clock=168000000
[D/at.dev.esp] esp0 device initialize start.
msh >
msh >[I/at.dev.esp] esp0 device wifi is connected.
[D/at.dev.esp] AT version:1.7.0.0(Aug 16 2018 00:57:04)
[D/at.dev.esp] SDK version:3.0.0(e27cf60)
[D/at.dev.esp] compile time:Oct 30 2018 18:18:34

msh >
msh >
msh >ht
http_ota
msh >http_ota
using uri: http://192.168.168.108:8080/file/download/cheche2.0.0.rbl
[I/at.dev.esp] esp0 device wifi is connected.
[I/at.dev.esp] esp0 device network initialize successfully.
http file_size:133616
[I/http_ota] Start erase flash (download) partition!
[I/http_ota] Erase flash (download) partition success!
[I/http_ota] OTA file size is (133616)
[I/http_ota] Download: [====================================================================================================] 100%
[I/http_ota] Download firmware to flash success.
[I/http_ota] System now will restart...
[SFUD]Find a Winbond flash chip. Size is 16777216 bytes.
[SFUD]spi flash device is initialize success.

 __  ___     __   __   __  ___ 
|__)  |  __ |__) /  \ /  \  |  
|  \  |     |__) \__/ \__/  |  
2006 - 2019 Copyright by rt-thread team
                0.9.2 build Apr  4 2021
[D/FAL] (fal_flash_init:63) Flash device |    onchip_flash_16k_part | addr: 0x08000000 | len: 0x00020000 | blk_size: 0x00004000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |             onchip_flash | addr: 0x08020000 | len: 0x000e0000 | blk_size: 0x00020000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |                nor_flash | addr: 0x00000000 | len: 0x01000000 | blk_size: 0x00001000 |initialized finish.
[I/FAL] ==================== FAL partition table ====================
[I/FAL] | name     | flash_dev    |   offset   |    length  |
[I/FAL] -------------------------------------------------------------
[I/FAL] | app      | onchip_flash | 0x00000000 | 0x00060000 |
[I/FAL] | download | nor_flash    | 0x00400000 | 0x00200000 |
[I/FAL] | factory  | nor_flash    | 0x00600000 | 0x00200000 |
[I/FAL] =============================================================
[I/FAL] RT-Thread Flash Abstraction Layer (V0.4.0) initialize success.
[I/FAL] System initialization successful.
[I]RT-Thread OTA package(V0.2.1) initialize success.
[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: 1617613063) success.
(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: [====================================================================================================] 100%
[I]Verify 'app' partition(fw ver: 2.0.0, timestamp: 1617613063) success.
[I/FAL] Find user firmware at app partition 0x08020000 successfully.
[I/FAL] Bootloader jumps to user firmware now.

 \ | /
- RT -     Thread Operating System
 / | \     4.0.2 build Apr  5 2021
 2006 - 2019 Copyright by rt-thread team
[I/sal.skt] Socket Abstraction Layer initialize success.
[SFUD] Find a Winbond flash chip. Size is 16777216 bytes.
[SFUD] W25Q128 flash device is initialize success.
[I/at.clnt] AT client(V1.3.0) on device uart3 initialize success.
[D/at.dev.esp] network interface device(esp0) set up status
[D/FAL] (fal_flash_init:63) Flash device |         onchip_flash_16k | addr: 0x08000000 | len: 0x00010000 | blk_size: 0x00004000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |         onchip_flash_64k | addr: 0x08010000 | len: 0x00010000 | blk_size: 0x00010000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |        onchip_flash_128k | addr: 0x08020000 | len: 0x00060000 | blk_size: 0x00020000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |                  W25Q128 | addr: 0x00000000 | len: 0x01000000 | blk_size: 0x00001000 |initialized finish.
[I/FAL] ==================== FAL partition table ====================
[I/FAL] | name       | flash_dev         |   offset   |    length  |
[I/FAL] -------------------------------------------------------------
[I/FAL] | bootloader | onchip_flash_16k  | 0x00000000 | 0x00010000 |
[I/FAL] | param      | onchip_flash_64k  | 0x00000000 | 0x00010000 |
[I/FAL] | app        | onchip_flash_128k | 0x00000000 | 0x00060000 |
[I/FAL] | easyflash  | W25Q128           | 0x00000000 | 0x00400000 |
[I/FAL] | download   | W25Q128           | 0x00400000 | 0x00200000 |
[I/FAL] | factory    | W25Q128           | 0x00600000 | 0x00200000 |
[I/FAL] | filesystem | W25Q128           | 0x00800000 | 0x00800000 |
[I/FAL] =============================================================
[I/FAL] RT-Thread Flash Abstraction Layer (V0.5.0) initialize success.
[D/main] Hello RT-Thread! 
[D/main] I'm cheche 2.0.0.
[D/main] clock=168000000
[D/at.dev.esp] esp0 device initialize start.
msh >[I/at.dev.esp] esp0 device wifi is connected.
[D/at.dev.esp] AT version:1.7.0.0(Aug 16 2018 00:57:04)
[D/at.dev.esp] SDK version:3.0.0(e27cf60)
[D/at.dev.esp] compile time:Oct 30 2018 18:18:34
[I/at.dev.esp] esp0 device wifi is connected.
[I/at.dev.esp] esp0 device network initialize successfully.

msh >http_ota http://192.168.168.108:8080/file/download/cheche2.0.1.rbl 
http file_size:133616
[I/http_ota] Start erase flash (download) partition!
[I/http_ota] Erase flash (download) partition success!
[I/http_ota] Download: [====================================================================================================] 100%
[I/http_ota] Download firmware to flash success.
[I/http_ota] System now will restart...
[SFUD]Find a Winbond flash chip. Size is 16777216 bytes.
[SFUD]spi flash device is initialize success.

 __  ___     __   __   __  ___ 
|__)  |  __ |__) /  \ /  \  |  
|  \  |     |__) \__/ \__/  |  
2006 - 2019 Copyright by rt-thread team
                0.9.2 build Apr  4 2021
[D/FAL] (fal_flash_init:63) Flash device |    onchip_flash_16k_part | addr: 0x08000000 | len: 0x00020000 | blk_size: 0x00004000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |             onchip_flash | addr: 0x08020000 | len: 0x000e0000 | blk_size: 0x00020000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |                nor_flash | addr: 0x00000000 | len: 0x01000000 | blk_size: 0x00001000 |initialized finish.
[I/FAL] ==================== FAL partition table ====================
[I/FAL] | name     | flash_dev    |   offset   |    length  |
[I/FAL] -------------------------------------------------------------
[I/FAL] | app      | onchip_flash | 0x00000000 | 0x00060000 |
[I/FAL] | download | nor_flash    | 0x00400000 | 0x00200000 |
[I/FAL] | factory  | nor_flash    | 0x00600000 | 0x00200000 |
[I/FAL] =============================================================
[I/FAL] RT-Thread Flash Abstraction Layer (V0.4.0) initialize success.
[I/FAL] System initialization successful.
[I]RT-Thread OTA package(V0.2.1) initialize success.
[I]Verify 'download' partition(fw ver: 2.0.1, timestamp: 1617613095) success.
[I]OTA firmware(app) upgrade(2.0.0->2.0.1) startup.
[I]The partition 'app' is erasing.
[I]The partition 'app' erase success.
[I]OTA Write: [====================================================================================================] 100%
[I]Verify 'app' partition(fw ver: 2.0.1, timestamp: 1617613095) success.
[I/FAL] Find user firmware at app partition 0x08020000 successfully.
[I/FAL] Bootloader jumps to user firmware now.

 \ | /
- RT -     Thread Operating System
 / | \     4.0.2 build Apr  5 2021
 2006 - 2019 Copyright by rt-thread team
[I/sal.skt] Socket Abstraction Layer initialize success.
[SFUD] Find a Winbond flash chip. Size is 16777216 bytes.
[SFUD] W25Q128 flash device is initialize success.
[I/at.clnt] AT client(V1.3.0) on device uart3 initialize success.
[D/at.dev.esp] network interface device(esp0) set up status
[D/FAL] (fal_flash_init:63) Flash device |         onchip_flash_16k | addr: 0x08000000 | len: 0x00010000 | blk_size: 0x00004000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |         onchip_flash_64k | addr: 0x08010000 | len: 0x00010000 | blk_size: 0x00010000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |        onchip_flash_128k | addr: 0x08020000 | len: 0x00060000 | blk_size: 0x00020000 |initialized finish.
[D/FAL] (fal_flash_init:63) Flash device |                  W25Q128 | addr: 0x00000000 | len: 0x01000000 | blk_size: 0x00001000 |initialized finish.
[I/FAL] ==================== FAL partition table ====================
[I/FAL] | name       | flash_dev         |   offset   |    length  |
[I/FAL] -------------------------------------------------------------
[I/FAL] | bootloader | onchip_flash_16k  | 0x00000000 | 0x00010000 |
[I/FAL] | param      | onchip_flash_64k  | 0x00000000 | 0x00010000 |
[I/FAL] | app        | onchip_flash_128k | 0x00000000 | 0x00060000 |
[I/FAL] | easyflash  | W25Q128           | 0x00000000 | 0x00400000 |
[I/FAL] | download   | W25Q128           | 0x00400000 | 0x00200000 |
[I/FAL] | factory    | W25Q128           | 0x00600000 | 0x00200000 |
[I/FAL] | filesystem | W25Q128           | 0x00800000 | 0x00800000 |
[I/FAL] =============================================================
[I/FAL] RT-Thread Flash Abstraction Layer (V0.5.0) initialize success.
[D/main] Hello RT-Thread! 
[D/main] I'm cheche 2.0.1.
[D/main] clock=168000000
[D/at.dev.esp] esp0 device initialize start.
msh >[I/at.dev.esp] esp0 device wifi is connected.
[D/at.dev.esp] AT version:1.7.0.0(Aug 16 2018 00:57:04)
[D/at.dev.esp] SDK version:3.0.0(e27cf60)
[D/at.dev.esp] compile time:Oct 30 2018 18:18:34

msh >[I/at.dev.esp] esp0 device wifi is connected.
[I/at.dev.esp] esp0 device network initialize successfully.

msh >

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值