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

Faster flashing for ESP8266 (and CC3200) boards #592

Closed
georgkreimer opened this issue Mar 22, 2016 · 5 comments
Closed

Faster flashing for ESP8266 (and CC3200) boards #592

georgkreimer opened this issue Mar 22, 2016 · 5 comments

Comments

@georgkreimer
Copy link

Flashing of the ESP8266 boards takes a while. Anybody who has flashed some of them noticed it's about a minute. I saw this post blog today. Those guys at Cesanta Software have created a modified version of the esptool but also have another flash tool called Flash'N'Chips which reduces the flash times significantly. It would be great to have the flash time reduced for PlatformIO using these 2 options.

@ivankravets
Copy link
Member

Anybody who has flashed some of them noticed it's about a minute.

What is your board? Do you use specific LD script?

@ivankravets ivankravets changed the title ESP8266 fast flashing Faster flashing for ESP8266 (and CC3200) boards Mar 22, 2016
@georgkreimer
Copy link
Author

Just verified with huzzah and NodeMCU breakout boards. It's around 40 sec for me. I'm using the default settings with the PlatformIO IDE

@Jorgen-VikingGod
Copy link

maybe this article could help to improve the flashing speed
https://blog.cesanta.com/esp8266-superfast-flashing-flash-esp-in-5-seconds

@eni23
Copy link

eni23 commented Aug 21, 2016

+1 for the idea that @Jorgen-VikingGod suggested. Using the modified esptool.py from the Mongoose platform (Source: https://github.com/cesanta/mongoose-flashing-tool/blob/master/common/platforms/esp8266/stubs/esptool.py) speeds up flashing a lot compared to the one shipped with PlatformIO:

PlatformIO esptool: 0m16.152s
Modded esptool.py: 0m4.345s
upload_speed: 3000000

Until this or another fast flasher is integrated, one could do a workaround like this (only tested with PlatformIO 3):

Place the modded esptool to tools/esptool-cesanta.py

platformio.ini

[env:nodemcuv2]
platform = espressif
framework = arduino
board = nodemcuv2
upload_speed = 3000000
extra_script = tools/custom_uploader.py

tools/custom_uploader.py

import os
from SCons.Script import DefaultEnvironment

env = DefaultEnvironment()
esptool_mod = "{0}/tools/esptool-cesanta.py".format(env['PROJECT_DIR'])
env.Replace(UPLOADER=esptool_mod)
env.Replace(UPLOADERFLAGS=[
    '--port',
    '$UPLOAD_PORT',
    'write_flash',
    '--flash_baud=$UPLOAD_SPEED',
    '0'
])
env.Replace(UPLOADCMD='$UPLOADER $UPLOADERFLAGS $SOURCE')

@ivankravets
Copy link
Member

Moved to platformio/platform-espressif8266#15

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

No branches or pull requests

4 participants