Greeting!
I have just succeeded in flashing esp-wrover-kit development board under esp-idf. Now trying do the same thing under Arduino. I would ask for your help to fix the issue. May I report my procedure 1 stpe by 1 as below?
1, Following the guide on "Installation instructions for Debian / Ubuntu OS" (https://github.com/espressif/arduino-es ... _ubuntu.md), I went through the following steps.
1.1, "Install latest Arduino IDE from arduino.cc". The root directory that Arduino IDE is installed is ~/arduino-1.8.5.
1.2, "git clone arduino-esp32.git". The directory ~/Arduino is created at this step. And the git repository is cloned into ~/Arduino/hardware/espressif/esp32.
1.3, "Restart Arduino IDE". I think that we need to import "esp-wrover-kit" board by selecting "Tools -> Board ...", right? But I couldn't find the board type over there. Where can I find a guidance to add the board into Arduino IDE?
2, As introduced at https://github.com/espressif/arduino-es ... cs/make.md, using makeEspArduino "instead of the Arduino IDE makes it easier to do automated and production builds."
I prefer to use makeEspArduino, as well. So, tried steps as below.
2.1, git clone https://github.com/plerup/makeEspArduino.git. Then directory "makeEspArduino" is created.
2.2, I didn't install arduino-esp32 again since I had installed it at step 1.2.
2.3, changed DEFAULT_PORT to /dev/ttyUSB1 in makeEspArduino/tools/esptool.py
2.4, connected esp-wrover-kit dev board to my laptop via USB cable. I had succeeded in flashing the borad by typing the following command under ~/esp/esp-idf/examples/get-started/blink
make flash
That is, the physical connection works under esp-idf environment.
2.4,
cd makeEspArduino
make -f makeEspArduino.mk ESP_ROOT=~/Arduino/hardware/espressif/esp32 CHIP=esp32 DEMO=1 flash
2.5, I got log:
make -f makeEspArduino.mk ESP_ROOT=~/Arduino/hardware/espressif/esp32 CHIP=esp32 DEMO=1 flash
esp32-hal-time.c
esp32-hal-adc.c
Stream.cpp
main.cpp
esp32-hal-timer.c
esp32-hal-bt.c
Esp.cpp
WString.cpp
WMath.cpp
cencode.c
cdecode.c
esp32-hal-i2c.c
IPv6Address.cpp
cbuf.cpp
IPAddress.cpp
Print.cpp
esp32-hal-touch.c
StreamString.cpp
base64.cpp
esp32-hal-uart.c
esp32-hal-sigmadelta.c
esp32-hal-ledc.c
wiring_pulse.c
esp32-hal-spi.c
esp32-hal-misc.c
HardwareSerial.cpp
stdlib_noniso.c
MD5Builder.cpp
esp32-hal-matrix.c
wiring_shift.c
esp32-hal-gpio.c
esp32-hal-dac.c
WiFiScan.ino
WiFiServer.cpp
WiFiGeneric.cpp
WiFiUdp.cpp
WiFiMulti.cpp
WiFiSTA.cpp
WiFiAP.cpp
WiFi.cpp
WiFiScan.cpp
ETH.cpp
WiFiClient.cpp
Creating core archive
Linking /tmp/mkESP/WiFiScan_esp32/WiFiScan.bin
Versions: 146b2f6-dirty, 146b2f6-dirty
esptool.py v2.1
Memory usage
Ram: 37028 bytes
Flash: 497874 bytes
Build complete. Elapsed time: 5 seconds
esptool.py v2.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
makeEspArduino.mk:270: recipe for target 'flash' failed
make: *** [flash] Error 2
That proves that the same physical connection can make “flash” successful under esp-idf but get failure with arduino-esp32.
Could you check the log then let me know how to flash the board successfully under arduino-esp32 environment? And where is the app that “DEMO=1” points to?
Thanks!
Failure with flashing esp-wrover-kit dev board under Arduino-esp32
-
- Posts: 16
- Joined: Sun Feb 25, 2018 12:12 pm
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: Failure with flashing esp-wrover-kit dev board under Arduino-esp32
Hi huaxiaozhong1,
Have you verified that you are using the same serial port number as you did when loading from esp-idf?
The only difference in loading procedure I see is that arduino-esp32 is currently using esptool.py v2.1 while esp-idf esptool.py v2.2.1.
Have you verified that you are using the same serial port number as you did when loading from esp-idf?
The only difference in loading procedure I see is that arduino-esp32 is currently using esptool.py v2.1 while esp-idf esptool.py v2.2.1.
-
- Posts: 16
- Joined: Sun Feb 25, 2018 12:12 pm
Re: Failure with flashing esp-wrover-kit dev board under Arduino-esp32
Thanks for your rapid feedback. To keep the serial port as same, I changed the DEFAULT_PORT of USB port name from /dev/ttyUSB0 to /dev/ttyUSB1 in esptool.py. Let me try esptool.py v2.2.1 to arduino-esp32, to see what will happen
-
- Posts: 16
- Joined: Sun Feb 25, 2018 12:12 pm
Re: Failure with flashing esp-wrover-kit dev board under Arduino-esp32
Hi krzychb,
I have just taken the following actions.
1, copied esptool.py from esp/esp-idf/components/esptool_py/esptool to ~/Arduino/hardware/espressif/esp32/tools, and changed DEFAULT_PORT to /dev/ttyUSB1.
2, cd makeEspArduino
3, make -f makeEspArduino.mk ESP_ROOT=~/Arduino/hardware/espressif/esp32 CHIP=esp32 DEMO=1 flash
4, The log that I got is below.
make -f makeEspArduino.mk ESP_ROOT=~/Arduino/hardware/espressif/esp32 CHIP=esp32 DEMO=1 flash
esp32-hal-time.c
esp32-hal-adc.c
Stream.cpp
esp32-hal-bt.c
Esp.cpp
esp32-hal-misc.c
Print.cpp
WString.cpp
cbuf.cpp
main.cpp
cencode.c
IPv6Address.cpp
base64.cpp
cdecode.c
esp32-hal-uart.c
IPAddress.cpp
wiring_shift.c
wiring_pulse.c
esp32-hal-timer.c
esp32-hal-i2c.c
StreamString.cpp
esp32-hal-touch.c
esp32-hal-spi.c
WMath.cpp
esp32-hal-ledc.c
MD5Builder.cpp
esp32-hal-matrix.c
stdlib_noniso.c
esp32-hal-dac.c
WiFiGeneric.cpp
HardwareSerial.cpp
WiFiServer.cpp
WiFiScan.ino
esp32-hal-gpio.c
esp32-hal-sigmadelta.c
WiFiMulti.cpp
WiFiUdp.cpp
WiFiScan.cpp
ETH.cpp
WiFiSTA.cpp
WiFi.cpp
WiFiAP.cpp
WiFiClient.cpp
Creating core archive
Linking /tmp/mkESP/WiFiScan_esp32/WiFiScan.bin
Versions: 146b2f6-dirty, 146b2f6-dirty
esptool.py v2.2.1
Memory usage
Ram: 37028 bytes
Flash: 497874 bytes
Build complete. Elapsed time: 5 seconds
esptool.py v2.2.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
makeEspArduino.mk:270: recipe for target 'flash' failed
make: *** [flash] Error 2
It is really like what I got under esp-idf environment when USB device name was set as /dev/ttyUSB0.
What next step would you suggest us to go?
Thanks,
I have just taken the following actions.
1, copied esptool.py from esp/esp-idf/components/esptool_py/esptool to ~/Arduino/hardware/espressif/esp32/tools, and changed DEFAULT_PORT to /dev/ttyUSB1.
2, cd makeEspArduino
3, make -f makeEspArduino.mk ESP_ROOT=~/Arduino/hardware/espressif/esp32 CHIP=esp32 DEMO=1 flash
4, The log that I got is below.
make -f makeEspArduino.mk ESP_ROOT=~/Arduino/hardware/espressif/esp32 CHIP=esp32 DEMO=1 flash
esp32-hal-time.c
esp32-hal-adc.c
Stream.cpp
esp32-hal-bt.c
Esp.cpp
esp32-hal-misc.c
Print.cpp
WString.cpp
cbuf.cpp
main.cpp
cencode.c
IPv6Address.cpp
base64.cpp
cdecode.c
esp32-hal-uart.c
IPAddress.cpp
wiring_shift.c
wiring_pulse.c
esp32-hal-timer.c
esp32-hal-i2c.c
StreamString.cpp
esp32-hal-touch.c
esp32-hal-spi.c
WMath.cpp
esp32-hal-ledc.c
MD5Builder.cpp
esp32-hal-matrix.c
stdlib_noniso.c
esp32-hal-dac.c
WiFiGeneric.cpp
HardwareSerial.cpp
WiFiServer.cpp
WiFiScan.ino
esp32-hal-gpio.c
esp32-hal-sigmadelta.c
WiFiMulti.cpp
WiFiUdp.cpp
WiFiScan.cpp
ETH.cpp
WiFiSTA.cpp
WiFi.cpp
WiFiAP.cpp
WiFiClient.cpp
Creating core archive
Linking /tmp/mkESP/WiFiScan_esp32/WiFiScan.bin
Versions: 146b2f6-dirty, 146b2f6-dirty
esptool.py v2.2.1
Memory usage
Ram: 37028 bytes
Flash: 497874 bytes
Build complete. Elapsed time: 5 seconds
esptool.py v2.2.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
makeEspArduino.mk:270: recipe for target 'flash' failed
make: *** [flash] Error 2
It is really like what I got under esp-idf environment when USB device name was set as /dev/ttyUSB0.
What next step would you suggest us to go?
Thanks,
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: Failure with flashing esp-wrover-kit dev board under Arduino-esp32
Hi huaxiaozhong1 againhuaxiaozhong1 wrote: 1, copied esptool.py from esp/esp-idf/components/esptool_py/esptool to ~/Arduino/hardware/espressif/esp32/tools, and changed DEFAULT_PORT to /dev/ttyUSB1.
Reading https://github.com/plerup/makeEspArduin ... e-makefile it looks to me that you need to set UPLOAD_PORT in your makefile, not DEFAULT_PORT.
-
- Posts: 16
- Joined: Sun Feb 25, 2018 12:12 pm
Re: Failure with flashing esp-wrover-kit dev board under Arduino-esp32
Hi krzychb,
Your guidance is really helpful!
The esp-wrover-kit dev board has been proved to work under EspArduino environment. My first evidence was got through the following steps.
1, The new actions should be taken based at all procedures ahead that I listed yesterday. Those include cloning arduino-esp32.git into directory ~/Arduino, installing arduino into ~/arduino-1.8.5, installing esp into ~/esp, cloning makeEspArduino.git into …/makeEspArduino and running some esp32 examples. E.g., “blink” can be built and flash under …/examples/blink.
2, alias espmake32="make -f ~/makeEspArduino/makeEspArduino.mk CHIP=esp32 ESP_ROOT=~/Arduino/hardware/espressif/esp32"
3,
cd ~/arduino-1.8.5/examples/01.Basics/Blink
4, Replace all “LED_BUILTIN”s with “2” in Blink.ino
Note: the test wants to blink green LED on the board. By analyzing ~/esp/esp-idf/examples/get-started/blink, the value should be set as “2”.
5, At ~/arduino-1.8.5/examples/01.Basics/BlinkHi krzychb,
Your guidance is really helpful!
The esp-wrover-kit dev board has been proved to work under EspArduino environment. My first evidence was got through the following steps.
1, The new actions should be taken based at all procedures ahead that I listed yesterday. Those include cloning arduino-esp32.git into directory ~/Arduino, installing arduino into ~/arduino-1.8.5, installing esp into ~/esp, cloning makeEspArduino.git into …/makeEspArduino and running some esp32 examples. E.g., “blink” can be built and flash under …/examples/blink.
2, alias espmake32="make -f ~/makeEspArduino/makeEspArduino.mk CHIP=esp32 ESP_ROOT=~/Arduino/hardware/espressif/esp32"
3,
cd ~/arduino-1.8.5/examples/01.Basics/Blink
4, Replace all “LED_BUILTIN”s with “2” in Blink.ino
Note: the test wants to blink green LED on the board. By analyzing ~/esp/esp-idf/examples/get-started/blink, the value should be set as “2”.
5, At ~/arduino-1.8.5/examples/01.Basics/Blink
espmake32 flash
The green LED on the board started to blink
It is saying that the board could work with EspArduino.
Thank!
Now the case can be closed.
espmake32 flash
The green LED on the board started to blink
It is saying that the board could work with EspArduino.
Thank!
Now the case can be closed.
Your guidance is really helpful!
The esp-wrover-kit dev board has been proved to work under EspArduino environment. My first evidence was got through the following steps.
1, The new actions should be taken based at all procedures ahead that I listed yesterday. Those include cloning arduino-esp32.git into directory ~/Arduino, installing arduino into ~/arduino-1.8.5, installing esp into ~/esp, cloning makeEspArduino.git into …/makeEspArduino and running some esp32 examples. E.g., “blink” can be built and flash under …/examples/blink.
2, alias espmake32="make -f ~/makeEspArduino/makeEspArduino.mk CHIP=esp32 ESP_ROOT=~/Arduino/hardware/espressif/esp32"
3,
cd ~/arduino-1.8.5/examples/01.Basics/Blink
4, Replace all “LED_BUILTIN”s with “2” in Blink.ino
Note: the test wants to blink green LED on the board. By analyzing ~/esp/esp-idf/examples/get-started/blink, the value should be set as “2”.
5, At ~/arduino-1.8.5/examples/01.Basics/BlinkHi krzychb,
Your guidance is really helpful!
The esp-wrover-kit dev board has been proved to work under EspArduino environment. My first evidence was got through the following steps.
1, The new actions should be taken based at all procedures ahead that I listed yesterday. Those include cloning arduino-esp32.git into directory ~/Arduino, installing arduino into ~/arduino-1.8.5, installing esp into ~/esp, cloning makeEspArduino.git into …/makeEspArduino and running some esp32 examples. E.g., “blink” can be built and flash under …/examples/blink.
2, alias espmake32="make -f ~/makeEspArduino/makeEspArduino.mk CHIP=esp32 ESP_ROOT=~/Arduino/hardware/espressif/esp32"
3,
cd ~/arduino-1.8.5/examples/01.Basics/Blink
4, Replace all “LED_BUILTIN”s with “2” in Blink.ino
Note: the test wants to blink green LED on the board. By analyzing ~/esp/esp-idf/examples/get-started/blink, the value should be set as “2”.
5, At ~/arduino-1.8.5/examples/01.Basics/Blink
espmake32 flash
The green LED on the board started to blink
It is saying that the board could work with EspArduino.
Thank!
Now the case can be closed.
espmake32 flash
The green LED on the board started to blink
It is saying that the board could work with EspArduino.
Thank!
Now the case can be closed.
Who is online
Users browsing this forum: No registered users and 29 guests