Uploading to ESP32 failed - SOLVED

So I posted in GitHub regarding my problem, but so far no success in solving it. The reason I post here too is somebody may experience the same and maybe help to find a solution. Here are the details:
OS: Windows 10 Pro
IDE: VSCode and Atom (tried both, same result)
PlatformIO version: 3.5.0
After updating to this version, I can compile but cannot upload to my ESP 32 (Espressif ESP32 Dev Module).
Here’s my platformio.ini file:

; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; Redirecting...

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino

and here’s the output from executing “pio run -v -t upload” command:

[01/02/18 08:28:34] Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)

Collected 18 compatible libraries
Looking for dependencies…
Library Dependency Graph ( Library Dependency Finder (LDF) — PlatformIO latest documentation )
|-- <MD_DS1307> v1.3.1 (C:\Users\USER.platformio\lib\MD_DS1307_ID1392)
| |-- v1.0 (C:\Users\USER.platformio\packages\framework-arduinoespressif32\libraries\Wire)
MethodWrapper([“upload”], [“.pioenvs\esp32dev\firmware.bin”])
Auto-detected: COM9
“c:\users\USER.platformio\penv\scripts\python.exe” “C:\Users\USER.platformio\packages\framework-arduinoespressif32\tools\esptool.py” --before default_reset
–after hard_reset --chip esp32 --port “COM9” --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 C:\Users\USER.platformio\packages\framework-arduinoespressif32\tools\sdk\bin\bootloader_dio_40m.bin 0x8000 D:\Test.pioenvs\esp32dev\partitions.bin 0xe000 C:\Users\USER.platformio\packages\framework-arduinoespressif32\tools\partitions\boot_app0.bin 0x10000 .pioenvs\esp32dev\firmware.bin
usage: esptool write_flash [-h] [–flash_freq {keep,40m,26m,20m,80m}]
[–flash_mode {keep,qio,qout,dio,dout}]
[–flash_size FLASH_SIZE]
[–spi-connection SPI_CONNECTION] [–no-progress]
[–verify] [–compress | --no-compress]

[ ...] esptool write_flash: error: argument : Address "Controller" must be a number *** [upload] Error 2

My project stalls because of this error. Uploading via Arduino IDE is possible, but quite a pain as every time I decide to upload, have to rename my main.cpp to .ino, copy my whole file structure to the new folder (Arduino IDE requires the .ino to reside in its own folder), try to recompile the project and upload. And it was that easy with VSCode and PlatformIO. Hope this problem will be solved soon enough…

Sorry for duplicating this in both here and GitHub, but I really need this fix ASAP :slight_smile:

I found the source of the error and managed to fix it. The reason for the error was Espressif32 Platform and especially version 0.11.0 (probably “Use new toolchain v1.22.0-75 for Arduino framework”). Downgrading to version 0.10.0 seems to fix my problem and now I’m able to upload again to my ESP32 Dev module.
Thank me for digging that deep, reinstalling VSCode, Atom, PlatformIO and everything that was possible…

Just FYI for anyone that visits this post in the future (as I have), platform/espressif32 had a patch release on Feb 8, 2018 in which they reverted the change to the new toolchain. This was then fixed in the next release, 0.12.0.

Does it work with the latest upstream version Espressif 32 — PlatformIO latest documentation ?