[Answered] How to build a subset of the possible components in ESP-IDF?
Re: [Answered] How to build a subset of the possible components in ESP-IDF?
To work in this space, I recommend you read the Partition Tables documentation found here:
http://esp-idf.readthedocs.io/en/latest ... ables.html
Have a good read at that and let it sink in for a bit.
While an ESP32 flash memory is typically 4MB, you will find that some portion is reserved for ESP32 usage for areas like NVS and bootloader. I also hear stories that the 4MByte of flash is only the common story ... but we can go as high as 16MByte (from memory) in flash.
http://esp-idf.readthedocs.io/en/latest ... ables.html
Have a good read at that and let it sink in for a bit.
While an ESP32 flash memory is typically 4MB, you will find that some portion is reserved for ESP32 usage for areas like NVS and bootloader. I also hear stories that the 4MByte of flash is only the common story ... but we can go as high as 16MByte (from memory) in flash.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: [Answered] How to build a subset of the possible components in ESP-IDF?
Hi,
I tried out my custom partition.
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
factory, app, factory, 0x10000, 1M
ota_0, app, ota_0,0x110000 , 0x140000
ota_1, app, ota_1,0x250000 , 0x140000
because my main application is more than 1MB.
Still total size is within 4MB Flash.
No luck. my application does not start.
Any idea?
I tried out my custom partition.
# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
factory, app, factory, 0x10000, 1M
ota_0, app, ota_0,0x110000 , 0x140000
ota_1, app, ota_1,0x250000 , 0x140000
because my main application is more than 1MB.
Still total size is within 4MB Flash.
No luck. my application does not start.
Any idea?
Re: [Answered] How to build a subset of the possible components in ESP-IDF?
Factory partition is still 1M, and that's where the application is being flashed when you run "make flash".
Re: [Answered] How to build a subset of the possible components in ESP-IDF?
Are you saying Factory partition , OTA0 and OTA1 needs to be same size?
Re: [Answered] How to build a subset of the possible components in ESP-IDF?
No, he's asking where you are flashing your app because your factory partition is 1M and you claim your app is bigger. A "make flash" will by default burn the factory partition, so your app needs to fit. You say the app won't start, but you provide no log that would give the info needed to even begin to answer why. Is it booting from the factory partition that is too small for your app? Or is it booting from one of the OTA partitions?snahmad75 wrote:Are you saying Factory partition , OTA0 and OTA1 needs to be same size?
Your factory partition can be smaller than your OTA if you only plan to burn an app small enough to fit it in and then OTA a bigger app.
John A
-
- Posts: 17
- Joined: Wed May 02, 2018 4:26 pm
Re: [Answered] How to build a subset of the possible components in ESP-IDF?
Sorry to hijack this thread back to something closer to its original topic ... but has there been any progress with LTO support in the past year? I use (Clang's) LTO in my iOS projects and it helps quite a bit with performance as well as code size.
Re: [Answered] How to build a subset of the possible components in ESP-IDF?
Please excuse my ignorance ... but what is LTO?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
- martinayotte
- Posts: 141
- Joined: Fri Nov 13, 2015 4:27 pm
Re: [Answered] How to build a subset of the possible components in ESP-IDF?
I presume it is "Link Time Optimisation" ...kolban wrote:Please excuse my ignorance ... but what is LTO?
Re: [Answered] How to build a subset of the possible components in ESP-IDF?
No support for LTO yet, unfortunately.
Regarding the original post's question of building with a subset of components, doing this is a lot smoother in the new CMake preview branch. You can supply a minimal list of components you need in your build (as little as one or two) in the COMPONENTS, and the build system will automatically expend prerequisites to produce a working binary.
Regarding the original post's question of building with a subset of components, doing this is a lot smoother in the new CMake preview branch. You can supply a minimal list of components you need in your build (as little as one or two) in the COMPONENTS, and the build system will automatically expend prerequisites to produce a working binary.
Re: [Answered] How to build a subset of the possible components in ESP-IDF?
Any chance -flto will ever be implemented? It's not like you all don't have enough on your place, but in our internal projects, we've found up to a 40% reduction in binary size when link-time optimizations are added.
Who is online
Users browsing this forum: Google [Bot] and 254 guests