ESP32 V2, cant upload from Platform.io

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
WallyAtTEAGUE
 
Posts: 10
Joined: Mon Jul 20, 2015 7:09 pm

ESP32 V2, cant upload from Platform.io

Post by WallyAtTEAGUE »

I have a new Feather ESP32 V2 that powers on and that I can use the serial monitor. I have loaded the VCP drivers successfully.
My project builds (compiles) no problem with the current configuration but fails on upload with the following error:

Code: Select all

Connecting....
Chip is ESP32-PICO-V3-02 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, Embedded PSRAM, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: e8:9f:6d:20:2e:94
Uploading stub...

A fatal error occurred: Failed to write to target RAM (result was 01070000: Operation timed out)
*** [upload] Error 2
I'm on a Mac, I'm using VSCode with Platform.IO with the following platformio.ini.

Code: Select all

[env:adafruit_feather_esp32_v2] 
platform = espressif32@^4.4.0
framework = arduino
board = adafruit_feather_esp32_v2
monitor_speed = 115200
upload_port = /dev/cu.usbmodem54790484761
I looked at the Espressif32 v4.4.0 repository on GitHub and the JSON file for the Feather ESP32 V2 is the same as the development branch so it is the most recent. Any ideas what I'm missing? Thanks in advance for any assistance.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: ESP32 V2, cant upload from Platform.io

Post by mikeysklar »

The error code:
Failed to write to target RAM (result was 01070000: Operation timed out)
There is a closed espressif github issue. Several Mac users were struggling with serial drivers.

https://github.com/espressif/esptool/issues/280

Do you think you have the correct VCP drives installed? This board uses the CP2102N serial converter.

Are you using USB3 or USB2 to upload? Powered hub? Have you tried a lower baudrate?

User avatar
WallyAtTEAGUE
 
Posts: 10
Joined: Mon Jul 20, 2015 7:09 pm

Re: ESP32 V2, cant upload from Platform.io

Post by WallyAtTEAGUE »

Thanks so much for the reply. Let me address your questions.
1. I'm using the CH34xVCPDriver linked in the product page. I can successfully use serial monitoring at 115200 so I think the driver works?
2. Upload is direct USB3 using a USBC-C cable directly connected to my MacBook. I also tried using a USB2 port on my monitor (powered USB hub) and got the same error.
3. I changed my upload speed down to 115200 and it didn't help.

Code: Select all

upload_speed = 115200
Thanks for the GitHub issue link. I read through it quickly and didn't see anything obvious. I'll give it another read.

User avatar
adafruit2
 
Posts: 22146
Joined: Fri Mar 11, 2005 7:36 pm

Re: ESP32 V2, cant upload from Platform.io

Post by adafruit2 »

best bet is to ask platformio - we know it works with arduino IDE for programming, all boards are tested by programming so we were able to program it with esptool!

User avatar
WallyAtTEAGUE
 
Posts: 10
Joined: Mon Jul 20, 2015 7:09 pm

Re: ESP32 V2, cant upload from Platform.io

Post by WallyAtTEAGUE »

- SOLVED -

I went back and did some digging in the Platformio forums and also did some testing in the Arduino IDE.

The board presents 2 USB ports and by using the second one I was able to upload successfully. The new Platformio.INI references the "wchusbserial" port which I believe means this is specifically using the CH34x driver package. But I'm not sure about that.

Thank you all for the helpful suggestions!

User avatar
kikolobo
 
Posts: 9
Joined: Wed Apr 01, 2015 3:46 pm

Re: ESP32 V2, cant upload from Platform.io

Post by kikolobo »

Having same issue here with uFL version.

In my case, this issue is only encountered with the uFL version not with the normal V2 version.
I bought about 5 Feathers and all experience the same issue. The ones without uFL do not have issues and program as expected.

In case of the ones with uFL can't even program with Arduino IDE.

Can I exchange them for the normal version ones?

User avatar
kikolobo
 
Posts: 9
Joined: Wed Apr 01, 2015 3:46 pm

Re: ESP32 V2, cant upload from Platform.io

Post by kikolobo »

Found a solution for Mac/platformIO.

Download the latest drivers from WCH-IC:

http://www.wch-ic.com/downloads/CH34XSER_MAC_ZIP.html

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”