Compiling error

Hi,

I started to see this warning, is there something I have to do to fix it? or is something in the ESPHome queue that will be addressed with the next release?

Compiling /data/esp32-01/.pioenvs/esp32-01/FrameworkArduino/esp32-hal-spi.c.o
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c: In function 'spiTransferBytesNL':
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_out8 = &result[c_longs-1];
                                       ^
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_data8 = &last_data;
                                    ^

I have the same problem. PRogramming interupted with ESP32.

I found a similar message on another library

Compiling /data/esp32-01/.pioenvs/esp32-01/FrameworkArduino/esp32-hal-time.c.o
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c: In function 'spiTransferBytesNL':
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_out8 = &result[c_longs-1];
                                       ^
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_data8 = &last_data;
                                        ^

I have this message also, and the ESP32 complied code does not boot correctly after flashing the binary via USB serial.
Here is a snippet from the compiler log including a couple of lines before and after the error, plus some of the ESP32 serial log.

Source code verifies fine in ESPhome. Is this likely to be a coding problem in my ESPhome code, or the compiler ?

Compiling /data/irrigation-controller/.pioenvs/irrigation-controller/FrameworkArduino/esp32-hal-sigmadelta.c.o
Compiling /data/irrigation-controller/.pioenvs/irrigation-controller/FrameworkArduino/esp32-hal-spi.c.o
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c: In function 'spiTransferBytesNL':
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_out8 = &result[c_longs-1];
                                       ^
/data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
                 uint8_t * last_data8 = &last_data;
                                        ^
Compiling /data/irrigation-controller/.pioenvs/irrigation-controller/FrameworkArduino/esp32-hal-time.c.o
Compiling /data/irrigation-controller/.pioenvs/irrigation-controller/FrameworkArduino/esp32-hal-timer.c.o

Compiling does complete, but I get this from serial terminal after the ESP32 reboots.

Connecting.......%)Writing at 0x000f2f64... (100 %)Wrote 952576 bytes (539127 compressed) at 0x00010000 in 12.7 seconds (effective 601.4 kbit/s)...
Hash of data verified.

Leaving...
Hard Resetting...
Hard resetting via RTS pin...
Done! Flashing is complete!

Showing logs:
[13:56:49]***ERROR*** A stack overflow in task loopTask has been detected.
[13:56:49]abort() was called at PC 0x400896c4 on core 1
[13:56:49]
[13:56:49]ELF file SHA256: 0000000000000000
[13:56:49]
[13:56:49]Backtrace: 0x40089430:0x3ffafdc0 0x400896ad:0x3ffafde0 0x400896c4:0x3ffafe00 0x4008b2b7:0x3ffafe20 0x4008cea8:0x3ffafe40 0x4008ce5e:0x62dcaaa2
[13:56:49]
[13:56:49]Rebooting...
[13:56:49]ets Jun  8 2016 00:22:57
[13:56:49]
[13:56:49]rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
[13:56:49]configsip: 0, SPIWP:0xee
[13:56:49]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:56:49]mode:DIO, clock div:2
[13:56:49]load:0x3fff0018,len:4
[13:56:49]load:0x3fff001c,len:1044
[13:56:49]load:0x40078000,len:8896
[13:56:49]load:0x40080400,len:5828
[13:56:49]entry 0x400806ac
[13:56:50][I][logger:214]: Log initialized
[13:56:50]Guru Meditation Error: Core  1 panic'ed (Unhandled debug exception)
[13:56:50]Debug exception reason: Stack canary watchpoint triggered (loopTask) 
[13:56:50]Core 1 register dump:
[13:56:50]PC      : 0x40110d60  PS      : 0x00060b36  A0      : 0x8011654d  A1      : 0x3ffaff60  
[13:56:50]A2      : 0x00000208  A3      : 0x000001e4  A4      : 0xffffffff  A5      : 0x3ffb0400  
[13:56:50]A6      : 0x3ffb03d0  A7      : 0x00000010  A8      : 0x3ffb0270  A9      : 0x3ffaff50  
[13:56:50]A10     : 0x3ffaff70  A11     : 0x3ff9c510  A12     : 0x000000ff  A13     : 0x0000ff00  
[13:56:50]A14     : 0x00ff0000  A15     : 0xff000000  SAR     : 0x00000004  EXCCAUSE: 0x00000001  
[13:56:50]EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff  
[13:56:50]
[13:56:50]ELF file SHA256: 0000000000000000
[13:56:50]
[13:56:50]Backtrace: 0x40110d60:0x3ffaff60 0x4011654a:0x3ffb0270 0x40116586:0x3ffb0300 0x400d8915:0x3ffb0340 0x400d8b4a:0x3ffb0370 0x400e09c1:0x3ffb0390 0x400e09ee:0x3ffb03c0 0x400d98cd:0x3ffb0420 0x400e47ca:0x3ffb0460 0x400f3e7a:0x3ffb1fb0 0x4008a6be:0x3ffb1fd0
[13:56:50]
[13:56:50]Rebooting...

Hey can anyone recommend where I should repost this sort of low level issue ?

I’ve checked over my ESPhome code as best as I can, and it Validates fine, but as above, it hits a compiler error AND the binary does not run on the ESP32. I need to find some help to progress to a solution, just not sure where to ask as it seems here might not be the best place in hindsight…

Martin

1 Like

I have the same issue and found this on Github:

It seems like the fix is simple and already in place in arduino-esp32 version 2.0+. Not sure where and how to have ESPHome pick up that new version.

having same issue

if I do the initial esp32 install it works just fine , do a edit that involves a rebuild it just gets stuck in a boot loop