SiliconLabs EFR gecko bootloader认识

《UG103.6: Application Development Fundamentals: Bootloading.pdf》

2.1.1  Field-Updateable

引导程序的固件更新功能被设计成两个部分,first stage bootloader和main stage。

First stage  Bootloader是固化在芯片中,不能被更新的;只用于从内部flash的指定的位置读写数据来更新主bootloader,不负责数据的接收,没有通信功能。正在运行的main bootloader会检验和认证新的bootlaoder更新镜像,把新的镜像写到内部flash的指定位置,并重启进入first stage bootloader。first stage bootloader在用心的main bootloader覆盖旧的main bootloader镜像前还会去检验main bootloader的完整性。


The main bootloader由common core、驱动、一些特别功能的插件组成;common core是通过预编译的库给出来的,插件是源码。common core主要功能就是解析GBL文件并把文件内容写到设备里。

3.1  Gecko Bootloader
The first stage 需要 2 kB空间.一般情况下,main bootloader 需要 14 kB 以上的空间,总计就是 16 kB.
Silicon Labs recommends reserving at least 16 kB for the bootloader.
On EFR32xG1 devices (Mighty Gecko, Flex Gecko, and Blue Gecko families), the bootloader resides in main flash.
• First stage bootloader @ 0x0
• Main bootloader @ 0x800
• Application @ 0x4000
On newer devices (EFR32xG12 and later), the bootloader resides in the bootloader area in the Information Block
• Application @ 0x0
• First stage bootloader @ 0x0FE10000
• Main bootloader @ 0x0FE10800

5.  Bootload File Formats(引导文件格式介绍)

----------------------------------------------------------------------------------------------

《UG266: Silicon Labs Gecko Bootloader User’s Guide.pdf》

standalone bootloader(独立式) 就是bootloader自己接收新镜像数据,并直接用新的镜像数据将原来的覆盖掉的更新方式,不需要额外的flash空间来存储,接收存储阶段不担心数据有问题,NCP就采用standalone bootloader方式。

The specifics of thereceive loop depend on the protocol. Received packets are passed to the image parser, a state machine that parses the data and returns a callback containing any data that should be acted upon
standalone bootloader在接收GBL文件数据时就将数据解析成bin数据了。


An application bootloader 需要额外的一块flash空间来存储镜像数据,新镜像数据由应用程序接收并存到新的flash空间,校验好了再将新镜像数据作为程序指令运行起来;运行新镜像有两种方式:a、校验成功后用新数据覆盖掉原来的数据(siliconlabs采用的方式);b、校验成功后直接从新数据的空间读取指令而不再用新数据覆盖掉原来的数据(rtl8195采用的方式)。

因为bootloader识别的是gbl格式数据

注意silicon的ota文件是ota头部+gbl文件,而不是传统的ota头部+bin文件!!!

最后介绍gecke bootloader工程的新建指导:

4. Getting Started with the Gecko Bootloader
 

猜你喜欢

转载自blog.csdn.net/H542723151/article/details/83039645