OTA(Over the Air),即空中下载技术,可实现远程升级固件,避免现场烧录的麻烦。
参考资料:工程基于stm32F103ZET6
1.官方资料 https://www.rt-thread.org/document/site/application-note/system/rtboot/an0028-rtboot/
2.论坛中遇到的BUG与解决方案https://club.rt-thread.org/ask/question/12241.html
3.Tools下载:
a:通用Bootloader生成网址http://iot.rt-thread.com/#/homePage,注意版本号、解压缩、密码必须相同
b: 固件打包器https://gitee.com/jzhiyu/ota_downloader?utm_source=aladin&utm_campaign=repo
c: fal_cfg.h文件
#ifndef _FAL_CFG_H_ #define _FAL_CFG_H_
#include <rtthread.h> #include <board.h>
extern const struct fal_flash_dev stm32_onchip_flash; //#define RT_APP_PART_ADDR 0x08040000 //app中添加或此处添加,需要地址相同 /* flash device table */ #define FAL_FLASH_DEV_TABLE \ { \ &stm32_onchip_flash, \ } /* ====================== Partition Configuration ========================== */ #ifdef FAL_PART_HAS_TABLE_CFG
/* partition table */ #define FAL_PART_TABLE \ { \ {FAL_PART_MAGIC_WROD, "app", "onchip_flash", 256* 1024, 128 * 1024, 0}, \ {FAL_PART_MAGIC_WROD, "download", "onchip_flash", 128* 1024 , 128 * 1024, 0}, \ {FAL_PART_MAGIC_WROD, "factory", "onchip_flash", 384* 1024 , 128 * 1024, 0}, \ } #endif /* FAL_PART_HAS_TABLE_CFG */ #endif /* _FAL_CFG_H_ */
|