-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partition tables #2171
Partition tables #2171
Conversation
4571890
to
dc4e5c9
Compare
I dislike the .csv format. It's easy to make mistakes and inflexible. Entries have to be in the correct order. Instead of this:
Add the information to a hardware configuration file:
It's clearer, multi-arch and we can add other fields as required (e.g. comments). One file contains all appropriate settings. The build system would generate this for the user application, The address is the most important field, so that goes first, but the user can place fields in any order they like. Generating this from our fixed configuration variables is also much simpler. The partition tool(s) could probably do with a rewrite... Additional note: At present the linkage between partitions and content is very indistinct. For example, we generate a SPIFFS image but the image builder doesn't/shouldn't know or care where it's going to be written. (It may have specific offset requirements but that's another matter.) With the JSON format we can connect the image file to the partition. |
Instead of just a partition table configuration file, let's make it part of a 'hardware configuration' file. Post updated. |
For info. I'm currently porting https://github.com/espressif/esp-idf/tree/85cb1e8ca37302d282b041fc5768a2d248e08a32/components/nvs_flash for Sming. It's mainly C++, which is nice :-) |
5c194cb
to
483f1ab
Compare
@slaff The CodeQL is currently failing, probably because it's trying to use python2... |
15c78c2
to
f021f7e
Compare
d89f943
to
b6f1d68
Compare
b6f1d68
to
9e276cc
Compare
@mikee47 Do you want to add something more before I merge this PR? |
@slaff Few more fixes, but that should be it unless I find anything else. |
cf936d1
to
2e76211
Compare
@slaff OK, good to go. |
@mikee47 Is it possible to change the location of the partition table? I can see that it is possible to set {
"partition_table_offset": "0x3fa000", // <-- HERE
"name": "SmartGuard V1 Partition Table",
"base_config": "spiffs",
"devices": {
"spiFlash": {
"size": "4M"
}
},
But after that the calculations are not accounting for this. For example I get:
And also the
|
@slaff Nope. The partition table offset is adjustable to make more (or less!) space for the bootloader but must be before any defined partitions. This is a requirement for ESP32 so we need to enforce it generally. Is that a problem? |
I'll look at improving the handling of this and adding a note in the documentation. |
No, not really.... I was hoping to be able to put the partition somewhere else so that I can have bigger roms. With the current state I should decrease the maximum rom size with 4K which can be a problem in the future... |
I guess you're referring to the restricted memory paging capability of the ESP8266? You've probably already figured that moving
So there's easily enough space to squash them together like this. If you feel there's a use case for this then perhaps open an issue and we can take a look at how it might be achieved? |
Yep.
It's ok as it is for now. Thanks for pointing out what is the |
Implement class-based API for Sming with support for all architectures.
See #1676 for discussion.
Summary of changes:
Storage
component and port low-level Esp32 partition supportgen_esp32part.py
tool as basis for newhwconfig.py
tool. Integrate into build system. Add new targets.Partition::SubType::App
andPartition::SubType::Data
are strong enums used to identify all the standard types, but the base API still uses type/subtype so custom types can be accommodated.sysParam
data partition sub-type used for esp8266 system parameters and RF calibration data.Storage
partition type. Applications register aStorage::Device
object implementation with the Partition API to register these external devices with a C++ interface for them.out/.../hwconfig.mk
). Preserve existing build variables where possible, document changes.Basic_Storage
sample to more thoroughly demonstrate usageDISABLE_SPIFFS
,SPI_SIZE
andSPIFF_SIZE
build variables from all samples, including those in submodules.For other PR:
rBoot
andOtaUpgrade
to make more effective use of partitions.