Skip to content

Instantly share code, notes, and snippets.

@shadowandy
Last active February 9, 2023 10:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shadowandy/af468d38ed7ab3ff718b to your computer and use it in GitHub Desktop.
Save shadowandy/af468d38ed7ab3ff718b to your computer and use it in GitHub Desktop.
Using esptool for Arduino IDE
Just open platform.txt located at
/Users/$USER/Library/Arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/platform.txt
and move to the end of file. Then you will see this line.
tools.esptool.upload.pattern="{path}/{cmd}" {upload.verbose} -cd {upload.resetmethod} -cb {upload.speed} -cp "{serial.port}" -ca 0x00000 -cf "{build.path}/{build.project_name}.bin"
Change it like this way
#tools.esptool.upload.pattern="{path}/{cmd}" {upload.verbose} -cd {upload.resetmethod} -cb {upload.speed} -cp "{serial.port}" -ca 0x00000 -cf "{build.path}/{build.project_name}.bin"
tools.esptool.upload.pattern="/Users/shadowandy/Documents/Arduino/esptool/esptool.py" --port "{serial.port}" write_flash 0x00000 "{build.path}/{build.project_name}.bin"
You can change the full path to esptool.py to wherever you installed esptool.py on your system.
@andreyvit
Copy link

Note to whoever is still using this: to avoid errors when programming boards that don't support QIO (e.g. NodeMCU from Amica), you need -fm dio in the command line, so adjust like this:

tools.esptool.upload.pattern="/usr/local/bin/esptool.py" --port "{serial.port}" --baud {upload.speed} write_flash -fm {build.flash_mode} 0x00000 "{build.path}/{build.project_name}.bin"

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