Guidance on ESP-01 PUYA Board Flashing Set Up

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
DonV
New user
Posts: 7
Joined: 20 Jun 2018, 20:51

Guidance on ESP-01 PUYA Board Flashing Set Up

#1 Post by DonV » 20 Jun 2018, 21:54

Hi, love ESP Easy! Was able to use the tutorial at https://www.letscontrolit.com/wiki/inde ... are_Upload to successfully install Arduino IDE 1.6.12 on my Mint LMDE linux box and then flash several 1-2 year+ old blue PCB ESP-01 modules with the stable Build: 120 Core Version: 2_3_0 ESP Easy. Went with stable because I noted all the cautions about the development, etc. builds and stable met my needs. Those units are working great sending DHT-22 and DS18B20 data to Domoticz.

Unfortunately one of the ESP-01 tested/went bad for accessing the IO and I need to replace it. I'd ordered some new black PCB ESP-01s and they just arrived. Tried flashing with the same SW set up above and it won't work, I'm getting the following messages in the IDE when attempting to upload (there were additional bits about memory address(es) the first time) after multiple tries:

Code: Select all

warning: espcomm_sync failed
An error occurred while uploading the sketch
error: espcomm_open failed
error: espcomm_upload_mem failed
The module fits on my home made flash jig and the reset pin seems to be working normally. Reading up here and elsewhere I see the PUYA memory issue (and that's what's on my boards) so I modified flash mode setting to DOUT and memory to 1M (128k SPIFFS) with no success in flashing. Reading up, I'm confused what versions of the various software pieces I need to have to flash these boards and whether these can coexist on my linux box with what's already installed. Can someone please confirm:
  • What ESP Easy download version I should use for the above (DS18B20 Temp, DHT-22 Temp/Hum feeding Domoticz) application on a PUYA memory fitted version ESP-01?
  • What Arduino IDE version is required to flash that version of ESPEasy (on Debian-based linux)? (I had originally tried latest Arduino IDE to flash stable ESP Easy and ran into issues - so I know I need a compatible version.)
  • Do I need to remove the existing versions before installing the above or is it advisable to do so?
Thanks!

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Guidance on ESP-01 PUYA Board Flashing Set Up

#2 Post by TD-er » 20 Jun 2018, 22:11

There are "PUYA" builds in the nightly builds.
I have not tested them recently though, so if you have problems flashing them, please try some build from 20180322. Around that time we got some build-issues and did change something in the build-process.
It should still work, but I have not tested those PUYA's myself since then.

DonV
New user
Posts: 7
Joined: 20 Jun 2018, 20:51

Re: Guidance on ESP-01 PUYA Board Flashing Set Up

#3 Post by DonV » 20 Jun 2018, 22:29

Thanks. And will that work with my existing Arduino IDE version?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Guidance on ESP-01 PUYA Board Flashing Set Up

#4 Post by grovkillen » 20 Jun 2018, 23:21

The nightly releases are compiled bin files and can be used with "any" flash tool
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Guidance on ESP-01 PUYA Board Flashing Set Up

#5 Post by TD-er » 21 Jun 2018, 00:46

DonV wrote: 20 Jun 2018, 22:29 Thanks. And will that work with my existing Arduino IDE version?
Building your own "Puya" versions will be quite hard.
Currently we patch the core library files during build.

DonV
New user
Posts: 7
Joined: 20 Jun 2018, 20:51

Re: Guidance on ESP-01 PUYA Board Flashing Set Up

#6 Post by DonV » 21 Jun 2018, 05:05

Thanks for your replies. I'll give it a go with the bin file then.

DonV
New user
Posts: 7
Joined: 20 Jun 2018, 20:51

Re: Guidance on ESP-01 PUYA Board Flashing Set Up

#7 Post by DonV » 27 Jun 2018, 01:32

Well I'm still running into a roadblock trying to flash the device. I'm using the Thonshic script posted at https://www.letscontrolit.com/wiki/inde ... ript_linux under a Debian variant. I had to make some tweaks to the script to:
- have it pick up the firmware file in the selection list (the naming of the current download did not match the script pattern)
- add the DOUT mode selection for esptool (-bm dout).

I tried the revised script both with and without the DOUT option setting and it fails each time in a similar way, pretty much a similar error as I encountered in the use of the Arduino IDE flashing attempts for the stable image. The terminal log is below. I'd appreciate any guidance or correction on my approach. Thanks.

Code: Select all

./FlashScript.sh
found esptool: /home/donv/.arduino15/packages/esp8266/tools/esptool/0.4.9/esptool
using esptool /home/donv/.arduino15/packages/esp8266/tools/esptool/0.4.9/esptool
serial device, (USB2serial devices: /dev/ttyUSB1):/dev/ttyUSB1

 ┌──────────────────────────────────────────────────────────────────────────┐
 │ Select firmware                                                          │  
 │ ┌──────────────────────────────────────────────────────────────────────┐ │  
 │ │(*) ESP_Easy_mega-20180621_dev_ESP8266ESP_Easy_mega-20180621_dev_ESP82│ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ │                                                                      │ │  
 │ └──────────────────────────────────────────────────────────────────────┘ │  
 ├──────────────────────────────────────────────────────────────────────────┤  
 │                       <  OK  >            <Cancel>                       │  
 └──────────────────────────────────────────────────────────────────────────┘  
   
----
flash ESP_Easy_mega-20180621_dev_ESP8266PUYA_1024.bin? [Y/n]Y
ESPtool executable: /home/donv/.arduino15/packages/esp8266/tools/esptool/0.4.9/esptool
esptool v0.4.9 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
	setting board to nodemcu
	setting baudrate from 115200 to 115200
setting flash mode from qio to dout
	setting port from /dev/ttyUSB0 to /dev/ttyUSB1
	setting address from 0x00000000 to 0x00000000
	espcomm_upload_file
	espcomm_upload_mem
opening port /dev/ttyUSB1 at 115200
	tcgetattr
	tcsetattr
	serial open
opening bootloader
resetting board
trying to connect
	espcomm_send_command: sending command header
	espcomm_send_command: sending command payload
trying to connect
	espcomm_send_command: sending command header
	espcomm_send_command: sending command payload
	espcomm_send_command: receiving 2 bytes of data
	espcomm_send_command: receiving 2 bytes of data
	espcomm_send_command: receiving 2 bytes of data
	espcomm_send_command: receiving 2 bytes of data
	espcomm_send_command: receiving 2 bytes of data
	espcomm_send_command: receiving 2 bytes of data
	espcomm_send_command: receiving 2 bytes of data
	espcomm_send_command: receiving 2 bytes of data
Uploading 778768 bytes from ./ESP_Easy_mega-20180621_dev_ESP8266PUYA_1024.bin to flash at 0x00000000
	erasing flash
	size: 0be210 address: 000000
	first_sector_index: 0
	total_sector_count: 191
	head_sector_count: 16
	adjusted_sector_count: 175
	erase_size: 0af000
	espcomm_send_command: sending command header
	espcomm_send_command: sending command payload
	setting timeout 15000
	setting timeout 100
	espcomm_send_command: receiving 2 bytes of data
	writing flash
.....warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x04
closing bootloader
error: espcomm_upload_mem failed

Lars
New user
Posts: 1
Joined: 08 Nov 2018, 14:34

Re: Guidance on ESP-01 PUYA Board Flashing Set Up

#8 Post by Lars » 08 Nov 2018, 15:07

Hello everyone!

i have got the same issue.
i finished my plugin and test it sucsessfully on a wmos d1 mini.
since the wmos is only my testbench, i need to build the firmware for the esp-07 wich i build in my device.
unfortunadedly my build did not work.
after flashing it to the esp, it continously stuck in a reboot loop, telling my about the wrong PID and so on...
i build it with platformio via PIO Build (dev_ESP8266PUYA_1024), like the one i choose if i flash a pre build image.
what ever, if i first flash the pre build image, than my build over it, i once have the chance to boot the esp. as i'm configure it, the esp tell me it can not save the config file.
after reboot i get the same reboot loop, telling my about the wrong PID and so on.

it would be greate to learn how to build a clean image for the esp with puya flash, like TD-er mentioned.
maby i will do some more changes and build it again frequently when it is in the device.
for that case, the OTA would be greate. i like to learn how to do that with the esp-07 puya, too.

i plan to share my plugin with you, but i need to do a little dokumentation (wiki article)
my code has lots of comments, but it's in german.
the plugin is a regulator wich controlls GPIOs in respect to one ore more potentiometers, reading through the internal adc for absolut position. (blinds, window openers, etc)

hope someone can help me out.
i was googling so hard, but this is the closest i get.

Post Reply

Who is online

Users browsing this forum: No registered users and 43 guests