ESP32 分区表

 

因为程序超过1M了,必须自己改分区表,factory没啥用,直接上OTA0 OTA1

 

因为存储数据比较多,我将nvs增大到0x73000,460K

OTA0,OTA1分别是1b400,1744K

OTA0地址是0x8000,OTA1地址是0x240000

注意 地址都要0x1000,也就是4K对齐....

# Name,   Type, SubType, Offset,   Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
#boot:  ## Label            Usage          Type ST Offset   Length
#boot:  0 nvs              WiFi data        01 02 00009000 00073000
#boot:  1 otadata          OTA data         01 00 0007c000 00002000
#boot:  2 phy_init         RF data          01 01 0007e000 00001000
#boot:  3 ota_0            OTA app          00 10 00080000 001b8000
#boot:  4 ota_1            OTA app          00 11 00240000 001b8000
nvs,      data, nvs,     ,        0x73000,
otadata,  data, ota,     ,        0x2000,
phy_init, data, phy,     ,        0x1000,
ota_0,    app,  ota_0,   ,        0x1b4000,
ota_1,    app,  ota_1,   ,        0x1b4000,

 

分区表可以自己进行编译,也可以直接copy到demo里面,改分区表,make的时候最后编译进去

手动将 CSV 转换为二进制:
python gen_esp32part.py input_partitions.csv binary_partitions.bin

二进制格式转换回 CSV:
python gen_esp32part.py binary_partitions.bin input_partitions.csv

在 stdout 上显示二进制分区表的内容(这是生成 make partition_table 时显示的摘要的方式:
python gen_esp32part.py binary_partitions.bin

  

 

posted @ 2019-03-11 15:14  XZHDJH  阅读(1379)  评论(0)    收藏  举报