letscontrolit / ESPEasy

Easy MultiSensor device based on ESP8266/ESP32
http://www.espeasy.com
Other
3.26k stars 2.21k forks source link

ESP32 stop working after mega-20180705 #1553

Closed flexiti closed 6 years ago

flexiti commented 6 years ago

Should I change anything else? The program after loading does not work

TD-er commented 6 years ago

There is a problem somewhere and I have been looking into it the last 2 evenings (last night was 2:30 am when I gave up). I am not sure what causes it, but it looks like PlatformIO is having troubles parsing the precompiler defines. For example when building the ESP82xx projects, it stops on ESP32 specific code. But that code is wrapped with #ifdef ESP32 checks, so it should not be used in the compile for non-ESP32 builds. Even wrapping that code with #if false and #endif does result in the same errors.

If it is happening in that direction, then also ESP8266-specific code can be used to compile for ESP32, which will also result in issues if it can be compiled at all.

I already opened an issue about this with the PlatformIO guys, but so far no answer. I also built on Linux and the same happens and also with the latest Travis builds.

TL;DR There is some issue with compiling and I have no clue what it is, but it will make building for ESP32 and ESP82xx impossible right now.

TD-er commented 6 years ago

Last night I finally found the issue why there were compiler issues. It appears there is no define of ESP32 anymore (???). Still there is another issue with the latest ESP32 core libs and that's about SPIFFS. When saving something to an existing file, data gets corrupted. Not sure if the data is written incorrect, or reading is causing the garbage.

See also: https://github.com/espressif/esp-idf/issues/1610 And probably related: https://github.com/me-no-dev/arduino-esp32fs-plugin/issues/6

flexiti commented 6 years ago

I do not know if I understood correctly, but the last version still does not work

Grovkillen commented 6 years ago

No the main problem is still there (corruption when interacting with the SPIFF). Only the build is now compiling, thanks to @TD-er s clean up of PlatformIO.ini

flexiti commented 6 years ago

But:

"Only the build is now compiling"

.... Strange, but there was no problem with the compilation on my side so far, only the program did not start (as I wrote at the beginning off this isue)

TD-er commented 6 years ago

Then you are probably using the Arduino IDE? With PlatformIO, it was no longer possible to build it after the last update of PlatformIO. Not on my machine and not on the Travis builder.

What remains is the issue with the SPIFF where the settings are stored. And I would really like to continue using the latest ESP32 core, since in there a lot should be changed (and fixed I hope) regarding the I2C. Also the (lots of) extra free RAM is welcome and the ability to start remote debugging from within the IDE is something I really would like to use. That would speed-up my development a lot.

flexiti commented 6 years ago

I am using Atom and PlatfprmIO

TD-er commented 6 years ago

Then you've probably not updated PlatformIO to the latest version. As you can see in the history of the builds, the build a few days ago has not resulted in a ZIP file.

vmfs1968 commented 6 years ago

Hello I made a total erase to my esp32 with esptool and then with the aton I made a pio upload esp32dev, and it is to boot well the problem is that the web is very slow and does not open the devices page

TD-er commented 6 years ago

Not being able to open the devices page is a known issue and is reported at the release notes.

vmfs1968 commented 6 years ago

OK with the version of Release mega-20180625 works well

rieders commented 6 years ago

Hello I also have the problem with the ESP32 that the I2C bus is constantly gone or the devices are no longer there when scanning. It struck me that if I have not activated a controller the devices are there for a long time. I try to activate a controller, in my case FHEM then the devices are gone. They will not come back when I remove the controller. Since hilt only factory setting or software re-play. Funny is the ESPeasy the PWM motor Shild (PCF8574) recognizes several times. I would like to use the ESP32 because it is faster and can manage more than 12 devices. I hope that there is a solution to the problems.

Greetings André

vmfs1968 commented 6 years ago

my esp32 is working fine with i2c to two days with a bme280 and was compiled with aton

TD-er commented 6 years ago

The problem with I2C and ESP32 is a known issue. It works fine with only 1 I2C device connected, but as soon as you add (and enable) >1, the I2C bus seems to be locked and a reset is needed to get it to work again.

This I2C problem is one of the reasons I updated the ESP32 core library, but it is not yet working like it should (due to SPIFF writing issues and thus crashing).

waspie commented 6 years ago

the esp32 core fork by stickbreaker fixed the i2c issues for me but enough stuff was still broken/unstable that i had to leave esp32 for now. is the corruption of SPIFF data why submitting a device or even loading a device would result in a crash?

if that could be fixed i would try going back to it and then coming here to report other bugs :rofl:

( i do appreciate all the work you do! without it i couldn't have achieved the level of automation i have at home. please understand i'm only lightly poking fun!)

TD-er commented 6 years ago

Well the ESP32 support is "it compiles" right now. And I really want to use it a bit more. Especially with the new WROVER version with 4 MB PSRAM, which can be used as normal RAM and a lot more interrupt based serial ports.

rieders commented 6 years ago

That would interest me too. Which WROVER version is interesting? I found these here. There can also be inserted an SD card. http://www.ebay.de/itm/like/323331372667?clk_rvr_id=1594997557788&vectorid=229487&lgeo=1&item=323331372667&rmvSB=true I would then if several I2C devices are possible on the ESP 32 WROVER switch.

Greetings André

TD-er commented 6 years ago

I recently bought the dev kit with the WROVER, in the hope I could do some proper debugging. But until now, I was not able yet to get this debugging to work (I do have a pro account on PlatformIO) There is a number of boards coming using this new (larger) module. Also with external antenna option.

rieders commented 6 years ago

the dev board with the 2 "TFT is too expensive for me at the moment. I found that with ali. https://de.aliexpress.com/item/LOLIN-D32-Pro-V2-0-0-wifi-bluetooth-board-basierend-ESP-32-esp32-Rev1-ESP32-WROVER/32883116057.html?spm= a2g0x.search0104.3.71.28fd3b92TYbiLU & ws_ab_test = searchweb0_0% 2Csearchweb201602_3_10320_10152_10151_10065_10321_10344_10068_10342_10547_10343_10322_10340_10548_10341_10696_10084_10083_10618_10304_10307_10820_10821_10302_10846_10843_10059_100031_10319_10103_524_10624_10623_10622_10621_10620% 2Csearchweb201603_2% 2CppcSwitch_5 & algo_expid = ba7a0e81-d243-4f1e-8a21-ffca1ad794d6-10 & algo_pvid = ba7a0e81-d243-4f1e-8a21-ffca1ad794d6 & priceBeautifyAB = 0 I would be happy if it can operate 4 i2c devices. I hope it somehow compiles with Atom. But I believe that the WROVER models are still too new.

TD-er commented 6 years ago

The only difference with the WROVER and the WROOM versions is the size of the heatspreader (and thus the module) and the extra 4 MB SPI PSRAM. This extra RAM should be able to be used as normal RAM in the latest IDF core libraries.

rieders commented 6 years ago

OK. That sounds good. So should not there be any problems? what would you recommend for a device?

TD-er commented 6 years ago

Well there are still the other issues ESP32 related, like I2C and currently the SPIFF issues. Lolin has a few nice boards (previously known as Wemos). Some even have a LiPo connector.

rieders commented 6 years ago

I have already seen that. But if the i2c and the other problems are not solved that makes no sense. after all, it has to be stable. I want to control an aquarium with it. everything should go there.

TD-er commented 6 years ago

Then I would wait until that's stable. You don't want to use ESP32 yet for situations where stability is a must.

rieders commented 6 years ago

How long can it take until the errors are fixed?

TD-er commented 6 years ago

I really don't know, since I am also depending on the fixes of others. And there is also a 40-hour a week job, a family and some other issues taking a lot of time and energy.

rieders commented 6 years ago

I think that there is hardly any time left. I hope the manufacturer judges it.

Greetings from Germany André

Grovkillen commented 6 years ago

Here's a good unit to start ESP32:ing with.

flexiti commented 6 years ago

I have also problem to start esp_easy on fresh new unit 8266 (Sonoff ). Accidental convergence (some kind of my mistake) or the problem of the new version also ?

TD-er commented 6 years ago

@flexiti The ESP8266 and ESP32 use different core libraries and these problems should not occur on the ESP82xx versions. Maybe it is best to start investigate that issue of yours on the forum and if it really is an issue, then open a new issue here on Github. Github issues should be a "todo" list to fix things or add new features and the forum is more to discuss how to get things working.

Grovkillen commented 6 years ago

@TD-er I'm in favor of closing this one and open a new issue if there's really a problem on our side

flexiti commented 6 years ago

By the way,the problem is not dependent on the type of flash memory on board? (I do not mean size) ??

TD-er commented 6 years ago

There was some issue a while ago with PUYA chips. But if an older build works fine, then it is probably not related to those issues.

flexiti commented 6 years ago

has not changed the way you use the flash? transmission speed etc? ESP8266 also according to it works badly - see #1565 @TD-er .. by the way, it would also be good if I the dev_ESP32.bin versions as well will be generated (as in the case of ESP8266), it's easier to check back problems

flexiti commented 6 years ago

some logs from esp32

INIT : Booting version:  (ESP32 SDK v3.2-dev-39-gaaf12390)
25 : INIT : Cold Boot - Restart Reason: CPU0: Software reset CPU CPU1: Software reset CPU
29 : FS   : Mounting...
124 : CRC  : No program memory checksum found. Check output of crc2.py
134 : CRC  : SecuritySettings CRC   ...OK 
381 : INIT : Free RAM:232916
381 : INIT : I2C
381 : INIT : SPI not enabled
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x40163c7a  PS      : 0x00060d30  A0      : 0x800d5d86  A1      : 0x3ffb1af0  
A2      : 0x3ffc9c84  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3ffb209c  
A6      : 0x0000000a  A7      : 0x00000000  A8      : 0x8000beca  A9      : 0x3ffb1b10  
A10     : 0x3ffb209c  A11     : 0x3ffb2230  A12     : 0x3ffb41e8  A13     : 0x00000001  
A14     : 0x00000001  A15     : 0x00000015  SAR     : 0x0000001b  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000138  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffe  

Backtrace: 0x40163c7a:0x3ffb1af0 0x400d5d83:0x3ffb1b20 0x400e6148:0x3ffb1ba0 0x400eb9e0:0x3ffb1bc0 0x400ef194:0x3ffb1c00 0x400e6f3d:0x3ffb1e40 0x400e70c6:0x3ffb1ee0 0x40111085:0x3ffb1f00 0x4017d7cb:0x3ffb1fa0

Rebooting...
ets Jun  8 2016 00:22:57
TD-er commented 6 years ago

That looks like the same crash when accessing the devices tab in the browser, when using ESP32. And that is very likely related to the SPIFF.

flexiti commented 6 years ago

Looks so now ESP32 working again, so I close it

TD-er commented 6 years ago

I changed the core lib back to 0.12 for now in the PlatformIO.ini.

You may also want to have a look at the sysinfo page. I did some experiments with SVGs :)

dony71 commented 5 years ago

hi there, I'm new on this any instruction how to compile espeasy for esp32 4MB using platformio?

TD-er commented 5 years ago

hi there, I'm new on this any instruction how to compile espeasy for esp32 4MB using platformio?

Well for starters it is perhaps not the best idea to ask these questions in closed topics. Also this really isn't a bug or feature request, so those questions are better asked at the forum. And building in PlatformIO isn't that hard. Make sure you have PlatformIO installed in your editor (Atom/VScode) and load this project (clone or download the whole repository from Git). Then in Atom you can select at the lower left corner what build you like to make (ESP32 has a separate build defined in platformio.ini)

dony71 commented 5 years ago

I have posted in forum a while ago, but nobody answers https://www.letscontrolit.com/forum/viewtopic.php?f=4&t=6664&p=36677#p36677 Anyway, I couldn't find option in platformio to build esp32 based on ESP32-WROOM-32 module (Lolin D32 board) ..................... How to?

TD-er commented 5 years ago

That board should just work with the included esp32test_1M8_partition environment configuration in platformio.ini.

Installing platformio is quite simple in an editor like Atom. installation in Atom N.B. You maybe need to restart Atom after installing platformIO. Then load the folder in which you placed this entire repository.

After that, just simply click in the lower left corner to select what you want to do. (build/upload and what environment) PlatformIO will then on the first build download and install all you need to build it.

In the new window that will appear you can type part of the environment you want to do stuff with, like:

image

For future posts (here), please do not start asking unrelated questions in already closed issues. That makes it hard (if not impossible) to find them again. And questions about how to do things are not for Github, since these issues are about things that need to be changed, added or bug reports.