-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
RFC: SPIFFS config for SDK 3.0 builds #2960
Comments
|
@jmattsson Johny, In practice I think that we have 3 main usecases for SPIFFS:
In terms of the hex location, etc, the whole idea of having a nodemcu-partition tool is that this allows you to configure the partitions, so I use:
to image my devices for testing. The SPIFFS image itself is PIC so I don't see the point in labelling it with an address, the tool will load it at the correct location. |
@albarrett @KT819GM @momkey02 @HHHartmann @devsaurus et al: any views here? |
@TerryE
|
I think we also have to look at the SPIFFS configuration if no image is given. It should be configurable the same way. It should also allow for an "all available ram" option as is now. It might also make sense to be able to configure the size in the code itself. Allowing for generic builds by say docker. Maybe it makes sense to still generate multiple images if no configuration is given, based on different flash sizes. We could also allow giving a flash size instead of SPIFFS size and calculate according to the rules above. I like the idea of placing the SPIFFS image above 1 MB so it is persisted when updating the firmware. Maybe it would also make sense to place LFS at the upper boundary of the 1st MB |
@HHHartmann LFS must be inside the first 1Mb because it is accessed through ICACHE mapping; The SPIFFS content is accessed through the SPIread API and so can be anywhere. Using the "remaining space" in the 1Mb configs is a little dangerous since devs might want to split this between LFS and SPIFFS. I suggest that we add a |
@TerryE I know LFS must be below 1MB, I meant to align it at the 1MB border and have it downwards from there. |
I want to move this one forward, and of the suggestions above, I feel on balance that we should:
Setting the "max within N Mb flash" is problematic as the build process doesn't know the size of the target Flash memory nor the LFS partition size. Any suggestions on how to work around this? |
As long as building the SPIFFS image is the last thing in the build process, it should be doable I think? The last used (mapped) address can be read from the |
Johny, with SDK 3.0 the firmware uses the PT settings and nothing else. You have the options of reconfiguring the PT when downloading the firmware or even reconfiguring it through the node API on the provisioned ESP. The user_config settings are really a legacy option to set up a default PT. If we now want 3 ways of doing this, then which takes precedence? If we aren't careful, then we will just end up with a buggers muddle that will just confuse everyone. 💩 I am getting confused.💩 Maybe it would be better just to merge the 5.3 support PT into dev, and let one of the other committers take point on sorting out SPIFFS. |
Ah, I keep forgetting about the partition table support. Yeah, that really makes "max within N MB flash" hard. I don't suppose there's a |
Sorry J. Late night. We had a lot of feedback that the user_config config process was too inflexible for cloud builders, hence on SDK 3.0 version, I added the ability to use / edit the PT througha utility. Also requests to be able to do this at runtime, hence adding this to the node API. Maybe doing these was a mistake since they don't seem to be really used and people still want the full feature functionality or more through user_config. The whole system is just getting layers of complexity IMO. Maybe we need a rethink and simplification |
Background
The current make includes a target within the tools directory which I think that I broke with the SDK 3.0 changes. I want to fix this but before I do so I would like to establish a consensus view on what we should be doing here.
The SDK 2.x release behaviour was to build 3 SPIFFS if the directory
local/fs
exists and contains files. This images were sized to start immediately after the end of the firmware and fill the remaining flash size (½, 1 and 4 Mb).Issues
The text was updated successfully, but these errors were encountered: