jeelabs / esp-link

esp8266 wifi-serial bridge, outbound TCP, and arduino/AVR/LPC/NXP programmer
Other
2.82k stars 720 forks source link

Custom HTML file size limit #415

Open Blimpyway opened 5 years ago

Blimpyway commented 5 years ago

Hi,

I'm currently using 1Mbyte flash ESP-01 with a custom html page with javascript which talks further to serial port. (using the same calls as esp-link uC console uses to retrieve and send serial data)

This custom file space size is limited 8kbytes, what should I attempt for more space available?

I know e.g. 4Mbyte ESP-12 has a lot more file space (3MBytes I think) but I am constrained by a PCB with the ESP-01 4x2 pin socket format.

I can afford to:

What do you recommend?

Thanks, Cezar

uzi18 commented 5 years ago

You can also change flash chip on esp module to 32Mbit

uzi18 commented 5 years ago

I think it is also possible to. integrate some html files in to firmware.

Blimpyway commented 5 years ago

Thanks, I'll try a software solution, since once the flash binary is compiled it should work on all ESP-01/01S/01M .. I wanted to avoid installing esp tools, dig into sources and re-compiling but I guess I need to do that anyway. I'll keep you updated if I succeed.

Blimpyway commented 5 years ago

@uzi18 - I need the ability to update a user page.html not just a larger one.

Blimpyway commented 5 years ago

Ok, I had to install the docker image and compile sources. I managed a workaround by editing esp-link/config.c source, specifically in function getUserPageSectionStart() where user flash area start address could be lowered, because FIRMWARE_SIZE is set in Makefile by ESP_FLASH_MAX as 503808 bytes. Having the actual compiled user1.bin of 344kbytes, I expect no problem to allocate user space immediately after the space occupied by user1.bin.

Regards, and thanks for this great tool.

uzi18 commented 5 years ago

it is ok if you not use user2.bin