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

Fix ESP-12E flash size #333

Closed
wants to merge 11 commits into from
Closed

Fix ESP-12E flash size #333

wants to merge 11 commits into from

Conversation

celsworth
Copy link

I believe this 512k maximum_size is in error; the 4M ldscript is used just above, and I had to manually bodge esptool's -bz parameter to play with ArduinoOTA.

This should set it to 4M correctly.

@celsworth
Copy link
Author

Er sorry I've no idea how all those branches got merged in..

@celsworth celsworth changed the title Fix esp12e flashsize Fix ESP-12E flash size Nov 22, 2015
@ivankravets ivankravets added this to the 2.3.6 milestone Nov 23, 2015
@ivankravets
Copy link
Member

I had to manually bodge esptool's -bz parameter to play with ArduinoOTA.

What do you mean under it? You can use own extra_script.

@celsworth
Copy link
Author

I'm not sure what you mean. The -bz parameter to esptool sets the size of the flash, right? It is set to 512k on an ldscript that is configured for 4M, I thought they were supposed to match.

@valeros valeros closed this in 970ddd4 Nov 23, 2015
@celsworth celsworth deleted the fix-esp12e-flashsize branch November 23, 2015 17:50
@celsworth
Copy link
Author

Thanks for merging this. However it seems to have produced a new issue:

/home/chris/.platformio/packages/tool-esptool/esptool -eo /home/chris/.platformio/packages/framework-arduinoespressif/bootloaders/eboot/eboot.elf -bo .pioenvs/esp12/firmware.bin -bm dio -bf 80 -bz 4096K -bs .text -bp 4096 -ec -eo .pioenvs/esp12/firmware.elf -bs .irom0.text -bs .text -bs .data -bs .rodata -bc -ec
error: invalid flash size value: 4096K
scons: *** [.pioenvs/esp12/firmware.bin] Error 255

It needs to be 4M rather than 4096K; this works:

/home/chris/.platformio/packages/tool-esptool/esptool -eo /home/chris/.platformio/packages/framework-arduinoespressif/bootloaders/eboot/eboot.elf -bo .pioenvs/esp12/firmware.bin -bm dio -bf 80 -bz 4M -bs .text -bp 4096 -ec -eo .pioenvs/esp12/firmware.elf -bs .irom0.text -bs .text -bs .data -bs .rodata -bc -ec

esptool seems to need the M suffix for anything bigger than 1M. I don't know where this should be fixed in platformio though.

(reference: https://github.com/igrr/esptool-ck/blob/master/binimage/esptool_binimage.c#L312)

@ivankravets ivankravets assigned ivankravets and unassigned valeros Nov 24, 2015
ivankravets added a commit that referenced this pull request Nov 24, 2015
@ivankravets
Copy link
Member

Fixed in development version http://docs.platformio.org/en/latest/installation.html#development-version

Please re-test it. Thanks.

@celsworth
Copy link
Author

Thanks, all working now!

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

Successfully merging this pull request may close these issues.

3 participants