Page 1 of 1

Generating partition-table.bin failed

Posted: Fri Jan 21, 2022 10:29 pm
by BB1964
We have been using docker to compile our ESP32 projects. Our current docker image of IDF 4.2 has been working for a while. We want to upgrade to IDF 4.4 but when I try to compile it, it fails to create the partition-table.bin for our custom partition table.

-------------------------------
Our custom partition table:

# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, , 128K,
otadata, data, ota, , 32k,
phy_init, data, phy, , 256K,
factory, app, factory, , 3M,
ota_0, app, ota_0, , 3M,
ota_1, app, ota_1, , 3M,
storage, data, spiffs, , 6M,

--------------------------------
Here is the compiler messages under IDF 4.2 (Compiles successfully)

[1/1250] Generating project_elf_src.c
[2/1250] Generating linker script...
[3/1250] Generating ../../ota_data_initial.bin
[4/1250] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,128K,
otadata,data,ota,0x29000,32K,
phy_init,data,phy,0x31000,256K,
factory,app,factory,0x80000,3M,
ota_0,app,ota_0,0x380000,3M,
ota_1,app,ota_1,0x680000,3M,
storage,data,spiffs,0x980000,6M,
*******************************************************************************

[5/1250] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/aesni.c.obj
[6/1250] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/arc4.c.obj

--------------------------------
Here is the compiler message under IDF 4.4 (Fails to compile)

[1/1323] Generating project_elf_src_esp32.c
[2/1323] Generating memory.ld linker script...
[3/1323] Generating ../../ota_data_initial.bin
[4/1323] Generating ../../partition_table/partition-table.bin
FAILED: partition_table/partition-table.bin
cd /project/build/esp-idf/partition_table
&& /opt/esp/python_env/idf4.4_py3.6_env/bin/python /opt/esp/idf/components/partition_table/gen_esp32part.py
-q --offset 0x8000 --flash-size 16MB /project/Duo_partitions_two_ota.csv /project/build/partition_table/partition-table.bin
&& /opt/esp/tools/cmake/3.20.3/bin/cmake
-E echo "Partition table binary generated. Contents:
" && /opt/esp/tools/cmake/3.20.3/bin/cmake -E echo "*******************************************************************************"
&& /opt/esp/python_env/idf4.4_py3.6_env/bin/python /opt/esp/idf/components/partition_table/gen_esp32part.py
-q --offset 0x8000 --flash-size 16MB /project/build/partition_table/partition-table.bin
&& /opt/esp/tools/cmake/3.20.3/bin/cmake -E
echo "*******************************************************************************"
otadata,data,ota,0x29000,32K,
otadata partition must have size = 0x2000

[5/1323] Building C object esp-idf/mbedtls/mbedtls/library/CMakeFiles/mbedcrypto.dir/arc4.c.obj
[6/1323] Building C object esp-idf/mbedtls/mbedtls/library/CmakeFiles/mbedcrypto.dir/aria.c.obj

--------------------------------
Can anyone tell me why the IDF 4.4 can not compile our custom partition or is there some other issue I'm missing?
I did a full clean multiple time and that did not work.

Re: Generating partition-table.bin failed

Posted: Sat Jan 22, 2022 1:10 am
by boarchuz
BB1964 wrote:
Fri Jan 21, 2022 10:29 pm
otadata partition must have size = 0x2000

Re: Generating partition-table.bin failed

Posted: Sat Jan 22, 2022 3:55 pm
by BB1964
That did it. Thank you for your help.