Hello,
We are currently using the ESP32-WROVER-E board with code based on ESP-IDF 4.3.1, and we are planning to upgrade to ESP-IDF 5.1.1.
In our current partition setup, the bootloader is loaded at 0x1000, and the partition table is loaded at 0x9000. This means the bootloader size is limited to 32KB (0x8000 bytes). However, after upgrading to ESP-IDF 5.1.1, the bootloader size exceeds 32KB and is approximately 37KB.
Our concern is how to manage the same partition table for both old and new devices, given this increase in bootloader size.
Any advice or solutions on how to handle this situation would be greatly appreciated.
Thank you!
Chand Bhadaniya
Bootloader Size Increase when Upgrading from ESP-IDF 4.3.1 to 5.1.1
-
- Posts: 4
- Joined: Mon Jun 24, 2024 6:32 am
-
- Posts: 52
- Joined: Fri Aug 11, 2023 4:56 am
Re: Bootloader Size Increase when Upgrading from ESP-IDF 4.3.1 to 5.1.1
Have you modified the bootloader? Have you modified linker map or the build environment? That's an extremely common partition configuration. I'd expect if this problem were widespread that there would be panic in the streets.
I just looked at my own build and I'm seeing a 15k-17 bootloader.bin for WROVER on legacy ESP32 and 17k for ESP32-S3 board. So there's comfortable headroom (as expected) in a default build.
There's something unique about your build, your source, your setup, or generally your karma. It should be safely away from that breaking point.
15104 Jun 30 05:17 bootloader.bin # for a lilygo S3 board
17536 Jun 30 09:44 bootloader.bin # board = esp32dev
I'd check with a clean project and start diffing aspects of the trees and resulting object sizes.
I just looked at my own build and I'm seeing a 15k-17 bootloader.bin for WROVER on legacy ESP32 and 17k for ESP32-S3 board. So there's comfortable headroom (as expected) in a default build.
There's something unique about your build, your source, your setup, or generally your karma. It should be safely away from that breaking point.
15104 Jun 30 05:17 bootloader.bin # for a lilygo S3 board
17536 Jun 30 09:44 bootloader.bin # board = esp32dev
I'd check with a clean project and start diffing aspects of the trees and resulting object sizes.
-
- Posts: 4
- Joined: Mon Jun 24, 2024 6:32 am
Re: Bootloader Size Increase when Upgrading from ESP-IDF 4.3.1 to 5.1.1
Hey, First of all thanks for your response.
I have enabled below security features. If i disable it, my bootloader size decreases to 26.7 kB from 37.9kB means this almost make 11kB difference.
- Have you modified the bootloader?
No.
- Have you modified linker map or the build environment?
No.
I have enabled below security features. If i disable it, my bootloader size decreases to 26.7 kB from 37.9kB means this almost make 11kB difference.
#
# Security features
#
CONFIG_SECURE_BOOT_V1_SUPPORTED=y
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
# CONFIG_SECURE_BOOT is not set
CONFIG_SECURE_FLASH_ENC_ENABLED=y
# CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT is not set
CONFIG_SECURE_FLASH_ENCRYPTION_MODE_RELEASE=y
CONFIG_SECURE_FLASH_HAS_WRITE_PROTECTION_CACHE=y
CONFIG_SECURE_FLASH_CHECK_ENC_EN_IN_APP=y
# end of Security features
-
- Posts: 8
- Joined: Thu May 09, 2024 1:17 am
Re: Bootloader Size Increase when Upgrading from ESP-IDF 4.3.1 to 5.1.1
In "menuconfig" look for "Offset of partition table" and change it from 0x8000 to 0x10000.
That will give you enough room for flash encryption and secure boot code on the bootloader.
That will give you enough room for flash encryption and secure boot code on the bootloader.
-
- Posts: 4
- Joined: Mon Jun 24, 2024 6:32 am
Re: Bootloader Size Increase when Upgrading from ESP-IDF 4.3.1 to 5.1.1
Hi,
Of-course, it will give more space for bootloader. But the issue is that I have many devices on-site, so I can't change any addresses. I'm looking for a solution that will not affect my on-site devices, and I can OTA them with a new file.
In short, if I can reduce bootloader size, or find a relatable solution. I don't want to change my partition table.
@DreadNaught you can check my original question for more details. Let me know if you need more details.
Thanks for the response.
Of-course, it will give more space for bootloader. But the issue is that I have many devices on-site, so I can't change any addresses. I'm looking for a solution that will not affect my on-site devices, and I can OTA them with a new file.
In short, if I can reduce bootloader size, or find a relatable solution. I don't want to change my partition table.
@DreadNaught you can check my original question for more details. Let me know if you need more details.
Thanks for the response.
Who is online
Users browsing this forum: No registered users and 87 guests