Skip to content
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 table too small for newer esp-idf #44

Closed
FredrikFornstad opened this issue Sep 10, 2018 · 4 comments
Closed

Partition table too small for newer esp-idf #44

FredrikFornstad opened this issue Sep 10, 2018 · 4 comments

Comments

@FredrikFornstad
Copy link
Contributor

FredrikFornstad commented Sep 10, 2018

Hi,
Using the latest esp-idf (and libwebsockets) master (todays date) causes the lws-esp32-factory.bin to be around 1 072 000 bytes, which is larger than the 1M allocated in the partition.csv file. It does work to flash and run, but when flashing the lws-esp32-test-server-demos app, parts of the factory app will be overwritten and after that the factory app starts looking weird...

Proposed solution: Increase the factory partition to 0x110000 in size and shrink the ota partition with 0x10000 in the csv file.

A side note: The partition.csv file for the lws-esp32-test-server-demos app is different. Not sure if it matters in this case. But it looks a bit odd in my Eyes.

@FredrikFornstad
Copy link
Contributor Author

Oh, I almost forgot: The libwebsockets/scripts/esp32.mk need to have its lws_flash_ota address adjusted accordingly. With my suggested change of increasing the factory partition with 0x10000 the line

write_flash 0x110000 $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin should be changed to
write_flash 0x120000 $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin

lws-team added a commit that referenced this issue Sep 11, 2018
#44

Thanks to Fredrik Fornstad
lws-team added a commit to warmcat/lws-esp32-test-server-demos that referenced this issue Sep 11, 2018
@lws-team
Copy link
Member

Thanks... yes there's no point having a partition.csv in the test app, I removed it.

I followed your suggestion and added 64KB to the factory partition, shrinking the OTA (and the erase ota) accordingly.

Your following and reporting on esp-idf is really useful, I appreciate the reports.

lws-team added a commit to warmcat/lws-esp32-test-server-demos that referenced this issue Sep 11, 2018
lws-team added a commit that referenced this issue Sep 12, 2018
#44

Thanks to Fredrik Fornstad
lws-team added a commit to warmcat/lws-esp32-test-server-demos that referenced this issue Sep 12, 2018
@FredrikFornstad
Copy link
Contributor Author

The test-app does not compile out of the box anymore. The user will need to run "make menuconfig" first and set the partition table to one of the defaults. Otherwise the compiler will stop, complaining that it cannot find partitions.csv ... Sure, the user can do this, but I think it is nice if this was done already in the source files. It certainly gives a better impression to a new user that is trying this out for the first time.

lws-team added a commit to warmcat/lws-esp32-test-server-demos that referenced this issue Sep 12, 2018
@lws-team
Copy link
Member

Yeah it shouldn't break it. I replaced it with a copy of the -factory one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants