Skip to content

Commit

Permalink
adding workaround for esptool-ck issues on OSX 10.9+ with PL2303 based
Browse files Browse the repository at this point in the history
USB-serial adapter:
igrr/esptool-ck#9

implementing workaround using esptool.py as mentioned in:
http://hpclab.blogspot.com/2015/06/esp8266-arduino-ide-on-mac-os-x.html
  • Loading branch information
jimmec committed Mar 10, 2016
1 parent 8d22591 commit e10d939
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion platformio/builder/scripts/espressif.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ def _get_board_f_flash(env):
"-cb", "$UPLOAD_SPEED",
"-cp", "$UPLOAD_PORT"
],
UPLOADERFLAGS_PY=[
"--port", "$UPLOAD_PORT"
],
UPLOADEROTAFLAGS=[
"--debug",
"--progress",
Expand All @@ -129,6 +132,7 @@ def _get_board_f_flash(env):

UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS -cf $SOURCE',
UPLOADOTACMD='"$PYTHONEXE" "$UPLOADEROTA" $UPLOADEROTAFLAGS -f $SOURCE',
UPLOADCMD_PY='esptool.py $UPLOADERFLAGS_PY write_flash 0x00000 $SOURCE',

#
# Misc
Expand Down Expand Up @@ -338,8 +342,16 @@ def _fetch_spiffs_size(target, source, env):
target_upload = env.Alias(
["upload", "uploadlazy", "uploadfs"], target_firm,
[lambda target, source, env: env.AutodetectUploadPort(), "$UPLOADCMD"])
env.AlwaysBuild(target_upload)
#env.AlwaysBuild(target_upload)

#
# Adding custom upload Target
#

target_upload_2 = env.Alias(
["upload-py"], target_firm,
[lambda target, source, env: env.AutodetectUploadPort(), "$UPLOADCMD_PY"])
env.AlwaysBuild(target_upload_2)

#
# Target: Define targets
Expand Down

0 comments on commit e10d939

Please sign in to comment.