ESP32

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

ESP32

#1 Post by BertB » 29 Sep 2018, 12:59

Probably silly questions, but where can I find details on the ESP32 support and what is the esp32test_1m8_partition? What does it do?

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

Re: ESP32

#2 Post by TD-er » 29 Sep 2018, 19:34

BertB wrote: 29 Sep 2018, 12:59 Probably silly questions, but where can I find details on the ESP32 support and what is the esp32test_1m8_partition? What does it do?
Not a silly question at all :)
I did included a README.txt along with the ZIP file (or at least it was my intention it should be included)

The esp32test_1m8_partition is a testing(!!) build where almost all plugins from ESP8266 are included.
The only ones not included are the ones in need of serial connection and the BH1750, since they won't compile yet.
The included plugins are not tested for ESP32, they just compile :)
Some I2C plugins like BME280 and Framed OLED are running fine on my own setup.

Since we're now using core 1.3.0 (PlatformIO), the image has become larger. So large, the default partition for the sketch was too small to fit.
So I also increased the partition for the sketch and made the SPIFFS partition smaller.

Please note that flashing an image with different partition size will clear all settings too.

User avatar
budman1758
Normal user
Posts: 301
Joined: 15 Apr 2017, 05:13
Location: Riverside CA USA

Re: ESP32

#3 Post by budman1758 » 30 Sep 2018, 08:33

Does this also have the "fix" for I2c? There were a lot of problems with I2c and somewhere I read someone on Git had a work around or complete fix for that issue. :?: :?:
"The glass is twice as big as it needs to be".

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

Re: ESP32

#4 Post by grovkillen » 30 Sep 2018, 08:59

The new core library fixed the i2c issue. It should work good now. But please test and report back :)
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:

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: ESP32

#5 Post by BertB » 30 Sep 2018, 09:44

I have a Windows 10 pc. What is the best way to upload to the esp32? Platformio?
What flavour of profile should I use after pressing F7?

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

Re: ESP32

#6 Post by grovkillen » 30 Sep 2018, 10:54

I use platformio for the ESP32. I need to fix myself a flasher tool for the ESP32. Mine doesn't work for the big brother.
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:

reinhold
Normal user
Posts: 15
Joined: 19 Jun 2017, 22:52
Location: Vienna, Austria
Contact:

Re: ESP32

#7 Post by reinhold » 30 Sep 2018, 12:31

To Flash the smd modules before soldering (or to use it as a dev board without soldering At all, I bought one of these :
https://m.aliexpress.com/item/32865415365.html

To play around with the capabilities, I have the following Dec board with a LiPo battery, USB chip for flashing and an OLED display:
https://m.aliexpress.com/item/32905330340.html

Flashing with PlatformIO in Visual Studio Code under Linux works out of the box, but Espeasy does not detect the OLED and other I2c devices (a custom test sketch works fine, so it's really an issue with espeasy}

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

Re: ESP32

#8 Post by TD-er » 30 Sep 2018, 22:12

Did you check the set pins for the I2C at the Hardware tab?

epost
Normal user
Posts: 33
Joined: 09 Feb 2018, 20:04

Re: ESP32

#9 Post by epost » 01 Oct 2018, 11:24

I got an ESP32 (Lolin32 Lite) working with ESPFlashDownloadTool_v3.6.4 with the following settings some time ago.
Now I would like to use the esp32test_1M8_partition.bin, but this does not work with the same settings. First I erased the memory with blank_4Mb.
What should I change in ESPFlashDownloadTool_v3.6.4 settings?
Attachments
Knipsel.PNG
Knipsel.PNG (37.49 KiB) Viewed 20691 times

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

Re: ESP32

#10 Post by TD-er » 01 Oct 2018, 12:55

I am not familiar with that tool (haven't used it myself)
But the offsets look like what is set in the partition description here:
https://github.com/letscontrolit/ESPEas ... fs316k.csv
I will also add the default partition table, just for reference.

This is the default partition: https://github.com/espressif/arduino-es ... efault.csv

epost
Normal user
Posts: 33
Joined: 09 Feb 2018, 20:04

Re: ESP32

#11 Post by epost » 01 Oct 2018, 19:10

TD-er, thank You for your quick response.
The tool is the official Espressif programming tool.
I already found the .csv files from your answer, but how to translate that into the tool is not clear to me.
Another way of programming the ESP32 is unknown to me, and I can not find it on the Internet either. Maybe someone can explain to me how I can program an ESP32?

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

Re: ESP32

#12 Post by grovkillen » 01 Oct 2018, 19:22

If you feel like it you can install platformio and flash from there.
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:

epost
Normal user
Posts: 33
Joined: 09 Feb 2018, 20:04

Re: ESP32

#13 Post by epost » 01 Oct 2018, 19:38

grovkillen, I am not a programmer and a previous attempt has failed, but I will try again.
Thanks for your help.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: ESP32

#14 Post by BertB » 02 Oct 2018, 17:36

Before I start another issue:
I now have the ESP32 loaded with esp32test_1M8_partion from the Release mega-20181002 package.
I used Platformio.

Per haps I am messing up things, so:

When the ESP32 is just doing its internal things, I get the following via serial:

Code: Select all

[E][vfs_api.cpp:27] open(): TmplStd.htm does not start with /
[E][vfs_api.cpp:27] open(): esp.css does not start with /
[E][vfs_api.cpp:27] open(): esp.png does not start with /
[E][vfs_api.cpp:27] open(): TmplStd.htm does not start with /
331709 : WD   : Uptime 6 ConnectFailures 0 FreeMem 182972
331709 : UDP  : Send Sysinfo message
332598 : LoopStats: shortestLoop: 86 longestLoop: 131087 avgLoopDuration: 134.19 loopCounterMax: 348837 loopCounterLast: 220550 countFindPluginId: 0
332599 : Plugin call 50 p/s   stats: Count: 1494 Avg/min/max 90.18/69/1447 usec
332599 : Plugin call 10 p/s   stats: Count: 300 Avg/min/max 88.12/72/142 usec
332599 : Plugin call 10 p/s U stats: Count: 300 Avg/min/max 467.45/341/2891 usec
332599 : Plugin call  1 p/s   stats: Count: 30 Avg/min/max 360.43/276/642 usec
332599 : setNewTimerAt()      stats: Count: 1946 Avg/min/max 55.42/43/131 usec
332599 : timeDiff()           stats: Count: 484802 - CPU cycles per call: 24.70
332600 : Scheduler stats: (called/tasks/max_length/idle%) 220550/1946/6/96.60
334059 : UDP  : 18:FE:34:9E:76:1A,192.168.0.71,11
[E][vfs_api.cpp:27] open(): TmplStd.htm does not start with /
[E][vfs_api.cpp:27] open(): esp.css does not start with /
[E][vfs_api.cpp:27] open(): esp.png does not start with /
[E][vfs_api.cpp:27] open(): TmplStd.htm does not start with /
[E][vfs_api.cpp:27] open(): TmplStd.htm does not start with /
[E][vfs_api.cpp:27] open(): esp.css does not start with /
[E][vfs_api.cpp:27] open(): esp.png does not start with /
[E][vfs_api.cpp:27] open(): TmplStd.htm does not start with /
338667 : UDP  : 5C:CF:7F:83:0D:F8,192.168.0.66,6
[E][vfs_api.cpp:27] open(): TmplStd.htm does not start with /
[E][vfs_api.cpp:27] open(): esp.css does not start with /
[E][vfs_api.cpp:27] open(): esp.png does not start with /
[E][vfs_api.cpp:27] open(): TmplStd.htm does not start with /
341804 : FILE : Saved /config.dat
342120 : FILE : Saved /config.dat
342208 : FILE : Saved /config.dat
342790 : FILE : Saved /config.dat
So, I guess it is not very happy.

Now, when I create an Oled device, I get the following:

Code: Select all

Guru Meditation Error: Core  1 panic'ed (Unhandled debug exception)
Debug exception reason: Stack canary watchpoint triggered (loopTask) 
Core 1 register dump:
PC      : 0x4008265c  PS      : 0x00060036  A0      : 0x3ffb00f0  A1      : 0x3ffb0030  
A2      : 0x00000000  A3      : 0x3ffb02e4  A4      : 0x00000000  A5      : 0x3f402ab5  
A6      : 0x3ffb0480  A7      : 0x00000008  A8      : 0x3ffb0400  A9      : 0x3ffb00e0  
A10     : 0x3ffb0100  A11     : 0x3ff9c510  A12     : 0x000000ff  A13     : 0x0000ff00  
A14     : 0x00ff0000  A15     : 0xff000000  SAR     : 0x0000000a  EXCCAUSE: 0x00000001  
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff  

Backtrace: 0x4008265c:0x3ffb0030 0x3ffb00ed:0x3ffb0400 0x400dc511:0x3ffb04c0 0x400f62f1:0x3ffb04e0 0x400f6405:0x3ffb0530 0x400f9a45:0x3ffb0560 0x400f9d55:0x3ffb05c0 0x400f9e1e:0x3ffb0600 0x400f9eb7:0x3ffb0640 0x400fa32a:0x3ffb0670 0x400f0857:0x3ffb09e0 0x4010b941:0x3ffb0a90 0x401c5a79:0x3ffb1e20 0x400d60a2:0x3ffb1e40 0x400dd175:0x3ffb1e60 0x400dd1c2:0x3ffb1e90 0x400dd31e:0x3ffb1ee0 0x4012c273:0x3ffb1f30 0x401437b4:0x3ffb1f50 0x40143d81:0x3ffb1f70 0x401a7c36:0x3ffb1fa0

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:952
load:0x40078000,len:6084
load:0x40080000,len:7944
entry 0x40080310
⸮U23 : 


INIT : Booting version:  (ESP32 SDK v3.2-dev-39-gaaf12390)
24 : INIT : Cold Boot - Restart Reason: CPU0: Software reset[E][WiFiUdp.cpp:219] parsePacket(): could not receive data: 9
 CPU CPU1: Software reset CPU
25 : FS   : Mounting...
50 : CRC  : No program memory checksum found. Check output of crc2.py
64 : CRC  : SecuritySettings CRC   ...OK 
120 : INIT : Free RAM:234044
120 : INIT : I2C
120 : INIT : SPI not enabled
139 : INFO : Plugins: 63 [Normal] (ESP32 SDK v3.2-dev-39-gaaf12390)
140 : EVENT: System#Wake
155 : WIFI : Set WiFi to STA
254 : WIFI : Connecting Spoon3 attempt #0
255 : IP   : Static IP : xx.xx.xx.xx GW: xx.xx.xx.xx SN:xx.xx.xx.xx DNS: xx.xx.xx.xx
260 : OTA  : Arduino OTA enabled on port 3232
372 : EVENT: System#Boot
1708 : WD   : Uptime 0 ConnectFailures 0 FreeMem 191044
3440 : WIFI : Static IP: xx.xx.xx.xx (ESP32-2-2) GW: xx.xx.xx.xx SN: xx.xx.xx.xx   duration: 3439 ms
3451 : EVENT: WiFi#Connected
3457 : Webserver: start
3458 : WIFI  : Arduino wifi status: WL_CONNECTED ESPeasy internal wifi status: ESPEASY_WIFI_SERVICES_INITIALIZED
3550 : MQTT : Intentional reconnect
3579 : MQTT : Connected to broker with client ID: ESPClient_30:AE:A4:3C:70:28
3581 : Subscribed to: domoticz/out
3582 : EVENT: MQTT#Connected
3587 : EVENT: MQTT#Connected Processing time:5 milliSeconds
4153 : NTP  : NTP host xx.xx.xx.xx (xx.xx.xx.xx) queried
4175 : NTP  : NTP replied: 20 mSec
4177 : Current Time Zone:  DST time start: 2018-03-25 02:00:00 offset: 120 minSTD time start: 2018-10-28 03:00:00 offset: 60 min
4177 : EVENT: Time#Initialized
4179 : EVENT: Time#Initialized Processing time:2 milliSeconds
4182 : EVENT: Clock#Time=Tue,17:27
4183 : EVENT: Clock#Time=Tue,17:27 Processing time:1 milliSeconds
I think the ESP is even less happy.

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

Re: ESP32

#15 Post by TD-er » 02 Oct 2018, 19:54

It is somewhat of a known issue that ESP32 may reboot when saving (larger) settings.
I've had the same when changing the settings of the OLED Framed plugin.
The only way I could get it to save was to enter everything, save it and then enable it and save it.
Or do it all at once, including enabling the plugin.

I have not really a clue why it crashes, but at least with that plugin it is somewhat reproducible.
If you enable "RTOS" in the advanced settings, you have a bigger stack and it crashes less when saving then.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: ESP32

#16 Post by BertB » 02 Oct 2018, 23:18

Unfortunately, this behaviour is persistant.
I will try again tomorrow with another ESP32.

zkmythesp
New user
Posts: 2
Joined: 12 Oct 2018, 03:25

Re: ESP32

#17 Post by zkmythesp » 12 Oct 2018, 03:29

Just to complete the above discussion here is a partition bin file that can be used to flash the larger firmware.
Attachments
partiitions2.zip
(296 Bytes) Downloaded 454 times

axelmilb
Normal user
Posts: 16
Joined: 14 Jul 2018, 18:53

Re: ESP32

#18 Post by axelmilb » 12 Oct 2018, 10:56

zkmythesp wrote: 12 Oct 2018, 03:29 Just to complete the above discussion here is a partition bin file that can be used to flash the larger firmware.
Thx :D

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: ESP32

#19 Post by BertB » 12 Oct 2018, 11:34

How can i upload the bin in win 10?

axelmilb
Normal user
Posts: 16
Joined: 14 Jul 2018, 18:53

Re: ESP32

#20 Post by axelmilb » 12 Oct 2018, 13:03

BertB wrote: 12 Oct 2018, 11:34 How can i upload the bin in win 10?
https://mega.nz/#!u11UmYDa!x9ZI32Xm4xrU ... uIHnU23TzE


esptool.exe --chip esp32 --port COM3 --baud 256000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x8000 partitions2.bin 0xe000 boot_app0.bin 0x1000 bootloader.bin 0x10000 ESP_Easy_mega-xxxxxxxx_esp32test_1M8_partition.bin

Craft if you like a Flash.cmd
Last edited by axelmilb on 13 Oct 2018, 07:39, edited 2 times in total.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: ESP32

#21 Post by BertB » 12 Oct 2018, 16:48

axelmilb wrote: 12 Oct 2018, 13:03
BertB wrote: 12 Oct 2018, 11:34 How can i upload the bin in win 10?
https://drive.google.com/file/d/1xfKL-b ... sp=sharing


esptool.exe --chip esp32 --port COM3 --baud 256000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x8000 partitions2.bin 0xe000 boot_app0.bin 0x1000 bootloader.bin 0x10000 ESP_Easy_mega-xxxxxxxx_esp32test_1M8_partition.bin.bin

Craft if you like a Flash.cmd
Computer says:
We're sorry. You can't access this item because it is in violation of our Terms of Service.

Find out more about this topic at the Google Drive Help Centre.

axelmilb
Normal user
Posts: 16
Joined: 14 Jul 2018, 18:53

Re: ESP32

#22 Post by axelmilb » 12 Oct 2018, 20:13

BertB wrote: 12 Oct 2018, 16:48
axelmilb wrote: 12 Oct 2018, 13:03
BertB wrote: 12 Oct 2018, 11:34 How can i upload the bin in win 10?
https://drive.google.com/file/d/1xfKL-b ... sp=sharing


esptool.exe --chip esp32 --port COM3 --baud 256000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x8000 partitions2.bin 0xe000 boot_app0.bin 0x1000 bootloader.bin 0x10000 ESP_Easy_mega-xxxxxxxx_esp32test_1M8_partition.bin

Craft if you like a Flash.cmd
Computer says:
We're sorry. You can't access this item because it is in violation of our Terms of Service.

Find out more about this topic at the Google Drive Help Centre.
Okay, so off to the Mega.nz server.
the link is updated
https://mega.nz/#!u11UmYDa!x9ZI32Xm4xrU ... uIHnU23TzE
Last edited by axelmilb on 13 Oct 2018, 07:41, edited 1 time in total.

whatsupskip
Normal user
Posts: 125
Joined: 28 Feb 2018, 07:40
Location: Melbourne, Australia

Re: ESP32

#23 Post by whatsupskip » 13 Oct 2018, 04:25

axelmilb wrote: 12 Oct 2018, 13:03 esptool.exe --chip esp32 --port COM3 --baud 256000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x8000 partitions2.bin 0xe000 boot_app0.bin 0x1000 bootloader.bin 0x10000 ESP_Easy_mega-xxxxxxxx_esp32test_1M8_partition.bin.bin
I assume there is only meant to be one ."bin" on the end of this as the single one worked.

There probably needs to be something in the readme.txt file about not using the "FlashESP8266.exe" to flash the ESP32.
Friends with kangaroos and some time koala rescuer.

axelmilb
Normal user
Posts: 16
Joined: 14 Jul 2018, 18:53

Re: ESP32

#24 Post by axelmilb » 13 Oct 2018, 07:42

:shock: Yes

legalo
New user
Posts: 3
Joined: 24 Dec 2016, 10:37
Location: france lunel

Re: ESP32

#25 Post by legalo » 13 Oct 2018, 08:27

Hello, sorry for my English here is a modified and functional version.

Laurent.


https://mega.nz/#!SWhyDSgb!Mtepp4OXXsTy ... 0GtW278nxU

axelmilb
Normal user
Posts: 16
Joined: 14 Jul 2018, 18:53

Re: ESP32

#26 Post by axelmilb » 13 Oct 2018, 09:32

legalo wrote: 13 Oct 2018, 08:27 Hello, sorry for my English here is a modified and functional version.

Laurent.


https://mega.nz/#!SWhyDSgb!Mtepp4OXXsTy ... 0GtW278nxU
The file is not mine.
Have you given everything you need, just customize ComPort and firmware name in the 2 cmd files

rol-rider
Normal user
Posts: 43
Joined: 02 Oct 2016, 12:36

Re: ESP32

#27 Post by rol-rider » 15 Oct 2018, 18:54

Hello, sorry for my English ... google translation and congratulations for the devellopement of ESPEasy.

I am testing ESP32 on ESP32DEVKITV1 card.

i flashed
(--chip esp32 --port COM3 --baud 256000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_fo 80m --flash_size detect 0x8000 partitions2.bin 0xe000 boot_app0.bin 0x1000 bootloader .bin 0x10000 ESP_Easy_mega- xxxxxxxx _esp32test_1M8_partition.bin)

AP mode ---- OK ---- + reset --- OK
192.168.4.1 ---------- OK
wifi configuration ---- OK
ESPEasy configuration --- OK ---- + reset --- OK
configuration device 18b20 --- OK --- + reset - NOK

After configuring the device, you can not restart the ESP!

rst: 0x10 (RTCWDT_RTC_RESET), boot: 0x33 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ands Jun 8 2016 00:22:57

Do you have a solution ?
sorry for my English ! i use google translat.

zkmythesp
New user
Posts: 2
Joined: 12 Oct 2018, 03:25

Re: ESP32

#28 Post by zkmythesp » 15 Oct 2018, 20:23

My guess would be that there is an issue with DS18B20 on ESP32

see this

https://github.com/letscontrolit/ESPEasy/issues/1833

to quote "Please note that the set of plugins included in the esp32test_1M8_partition is highly experimental."

If you want to recover your ESP32 you can do a chip erase

--chip esp32 --port COM3 erase_flash

then reflash as before but do not add a DS18B20, at least until that plugin is fixed.

We should start a thread for people to post what IS working on ESP32?

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 24 guests