esp32 the same time turn on Bluetooth, wifi and after ota program can not start too large

Preface

esp32 if the use of Bluetooth module, wifi module and ota words are likely to cause the program is too large (more than 1M), the system unbootable. Here to provide a method for expanding the storage space program by modifying the partition table to avoid this problem. This solution is also the case for the program only because other problems caused by too much.

 

phenomenon

After power esp32 screen will restart, if observed at this time 0 turned serial print content. If the log will open in Figure 1, Figure 2 otherwise

        Figure 1 Figure 2

 

 solve

The reason for this phenomenon is beyond the flash program pre-allocated program memory space (1M), can be resolved by modifying the partition table. Proceed as follows:

1. Create your partition table .CSV file

2.make menuconfig menu Partition Table -> Partition Table select Custom partition table CSV, Custom partition CSV file CSV file specified address.

 

Here I provide a partition table:

nvs, data, nvs, , 0x4000,
otadata, data, ota, , 0x2000,
phy_init, data, phy, , 0x1000,
factory, app, factory, , 0x14F000,
ota_0, app, ota_0, , 0x14F000,
ota_1, app, ota_1, , 0x14F000,

have to be aware of is:

1, the partition table when the allocated space must 4k if the integral multiple of which is: 4096 = 0% of storage space. This is because a flash block is 4k.

2, ota partition (ota_0, ota_1) original space and the best program (Factory) identical

 

Guess you like

Origin www.cnblogs.com/zornlink/p/11408925.html