ESP-WROOM-32 don't flash

rcosta
Posts: 3
Joined: Sun Jun 11, 2017 4:33 pm

ESP-WROOM-32 don't flash

Postby rcosta » Mon Jun 12, 2017 11:11 pm

Hello Guys,

Please, I need a help.

I started using ESP this week, but so far I have not even been able to download hello_word to flash.

I'm using Ubuntu 16.04 and the environment is set up properly. With the putty terminal emulator I access the serial port and when giving reset it is displaying the information below:

--- BEGIN ----------------------
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling [/i][/i]back to built-in command interpreter.
OK
>ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3ffc0000,len:0
load:0x3ffc0000,len:2304
load:0x40078000,len:3788
ho 0 tail 12 room 4
load:0x40098000,len:532
entry 0x4009813c
**************************************
* hello espressif ESP32! *
* 2nd boot is running! *
* version (V0.1) *
**************************************
compile time 18:16:58

SPI Speed : 40MHz
SPI Mode : DIO
SPI Flash Size : 4MB
Partition Table:
## Label Usage Type ST Offset Length
0 factory factory app 00 00 00010000 00100000
1 rfdata RF data 01 01 00110000 00040000
2 wifidata WiFi data 01 02 00150000 00040000
End of partition table
Loading app partition at offset 00010000
section 0: paddr=0x00000020 vaddr=0x00000000 size=0x0ffe8 ( 65512)
section 1: paddr=0x00010010 vaddr=0x3f400010 size=0x05b64 ( 23396) map
section 2: paddr=0x00015b7c vaddr=0x3ffba720 size=0x01378 ( 4984) load
section 3: paddr=0x00016efc vaddr=0x40080000 size=0x00400 ( 1024) load
section 4: paddr=0x00017304 vaddr=0x40080400 size=0x126ac ( 75436) load
section 5: paddr=0x000299b8 vaddr=0x00000000 size=0x06658 ( 26200)
section 6: paddr=0x00030018 vaddr=0x400d0018 size=0x325b4 (206260) map
start: 0x400807ac

Initializing heap allocator:
Region 19: 3FFBBA98 len 00024568 tag 0
Region 25: 3FFE8000 len 00018000 tag 1
Pro cpu up.
Pro cpu start user code
nvs_flash_init
frc2_timer_task_hdl:3ffbc564, prio:22, stack:2048
tcpip_task_hdlxxx : 3ffbeca8, prio:20,stack:2048
phy_version: 80, Aug 26 2016, 13:04:06, 0
pp_task_hdl : 3ffc34f0, prio:23, stack:8192

:>enter uart init
uart init wait fifo succeed
exit uart init

IDF version : master(db93bceb)

WIFI LIB version : master(934d079b)

ssc version : master(r283 4d376412)

!!!ready!!!
mode : softAP(32:ae:a4:03:01:70)
dhcp server start:(ip: 192.168.4.1, mask: 255.255.255.0, gw: 192.168.4.1)

+WIFI:AP_START
--- END ----------------------

Now when I try to write to the flash it presents the error below. What could it be?

---- BEGIN ------------------
sudo "PATH=$PATH" -E python /home/rcosta/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 /home/rcosta/esp/esp-idf/examples/get-started/hello_world/build/bootloader/bootloader.bin 0x10000 /home/rcosta/esp/esp-idf/examples/get-started/hello_world/build/hello-world.bin 0x8000 /home/rcosta/esp/esp-idf/examples/get-started/hello_world/build/partitions_singleapp.bin
esptool.py v2.0-beta3
Connecting........_____....._____..
Traceback (most recent call last):
File "/home/rcosta/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2349, in <module>
_main()
File "/home/rcosta/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2342, in _main
main()
File "/home/rcosta/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2073, in main
esp.connect(args.before)
File "/home/rcosta/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 348, in connect
last_error = self._connect_attempt(mode=mode, esp32r0_delay=False)
File "/home/rcosta/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 327, in _connect_attempt
self.sync()
File "/home/rcosta/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 280, in sync
self.command(self.ESP_SYNC, b'\x07\x07\x12\x20' + 32 * b'\x55')
File "/home/rcosta/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 237, in command
p = self.read()
File "/home/rcosta/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 203, in read
return next(self._slip_reader)
File "/home/rcosta/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 1408, in slip_reader
waiting = port.inWaiting()
File "/usr/local/lib/python2.7/dist-packages/serial/serialutil.py", line 588, in inWaiting
return self.in_waiting
File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 467, in in_waiting
s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)
IOError: [Errno 5] Input/output error
--- END -----------------------

Thanks in advance.

Regivaldo Costa
--

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP-WROOM-32 don't flash

Postby ESP_Sprite » Tue Jun 13, 2017 8:58 am

What hardware (on the ESP32 side) do you use? Are you sure there's nothing else (e.g. a still-running Putty session) interfering with the serial port?

User avatar
rudi ;-)
Posts: 1730
Joined: Fri Nov 13, 2015 3:25 pm

Re: ESP-WROOM-32 don't flash

Postby rudi ;-) » Tue Jun 13, 2017 10:02 am

rcosta wrote:
I'm using Ubuntu 16.04 and the environment is set up properly. With the putty terminal emulator I access the serial port ....
hi rcosta,

does this access the serial port match with the esptool serial port?

Code: Select all

--port /dev/ttyUSB0
can you check/compare that the esptool serial port is same like accessed serial port.

how you open your putty terminal emulatot and what is standing on serial port to use

perhabs this helps second

the most mistake is allways that the com port is "open" and was forget to close ( ESP_Sprite posted )
check this too ( have you close your session on putty? )

best wishes
rudi ;-)
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

Who is online

Users browsing this forum: No registered users and 91 guests