我尝试用bl602做wifi模组,给下面的mcu升级。
bl602通过url向服务区请求到固件之后,通过串口下发给下面的mcu。
整个路径就是
(服务器)--http-->(bl602模组)---串口---->(设备的MCU)
我需要对固件的完整性做一个校验,这里就需要把整个固件先暂时存到bl602上,然后校验成功再下发。
我查看flash和ota的例程,因为我需要对固件存在哪里做分配,但是我不知道怎么实现。
我看到了partition_cfg_2M.cfg这个是分区表,但是我不知道这个表里面的是什么意思,以及它是如何在SDK里面被体现的。
比如我看到了默认的cfg文件。能完整的解释一下它是什么含义吗》
它里面的type 和name是什么?
这里的[[pt_entry]]我都能自定义使用吗?会不会和某些固定的用法冲突了?
[pt_table]
#partition table is 4K in size
address0 = 0xE000
address1 = 0xF000
[[pt_entry]]
type = 0
name = "FW"
device = 0
address0 = 0x10000
size0 = 0x111000
address1 = 0x121000
size1 = 0xA0000
# compressed image must set len,normal image can left it to 0
len = 0
[[pt_entry]]
type = 2
name = "factory"
device = 0
address0 = 0x1C1000
size0 = 0x4000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0
[[pt_entry]]
type = 3
name = "media"
device = 0
address0 = 0x1C5000
size0 = 0x2000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0
[[pt_entry]]
type = 4
name = "chipdef"
device = 0
address0 = 0x1C7000
size0 = 0x2000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0
[[pt_entry]]
type = 5
name = "mfg"
device = 0
address0 = 0x121000
size0 = 0xA0000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0
[[pt_entry]]
type = 6
name = "othdef"
device = 0
address0 = 0x1C9000
size0 = 0x32000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0
[[pt_entry]]
type = 7
name = "PARAM1"
device = 0
address0 = 0x1FB000
size0 = 0x1000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0
[[pt_entry]]
type = 8
name = "PARAM2"
device = 0
address0 = 0x1FC000
size0 = 0x2000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0
[[pt_entry]]
type = 9
name = "PARAM3"
device = 0
address0 = 0x1FE000
size0 = 0x1000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0
[[pt_entry]]
type = 10
name = "PARAM4"
device = 0
address0 = 0x1FF000
size0 = 0x1000
address1 = 0
size1 = 0
# compressed image must set len,normal image can left it to 0
len = 0