Platformio firmware error compilation

hello,
i have just received the ringo phone, it works well. Now i’m trying to modify the firmware … but i have some errors while compiling …
i have followed the official tutorial, and this one.
but i always have the same erros …

Processing lolin32 (platform: espressif32; board: lolin32; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/lolin32.html
PLATFORM: Espressif 32 (3.3.1) > WEMOS LOLIN32
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, 
tumpa)
PACKAGES:
 - framework-arduinoespressif32 3.10006.210326 (1.0.6)
 - tool-esptoolpy 1.30100.210531 (3.1.0)
 - toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 29 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Ringo by CircuitMess Library> 1.0.5
|   |-- <FS> 1.0
|   |-- <Wire> 1.0.1
|   |-- <SD(esp32)> 1.0.5
|   |   |-- <FS> 1.0
|   |   |-- <SPI> 1.0
|   |-- <SPIFFS> 1.0
|   |   |-- <FS> 1.0
|   |-- <SPI> 1.0
|   |-- <EEPROM> 1.0.3
|   |-- <HTTPClient> 1.2
|   |   |-- <WiFi> 1.0
|   |   |-- <WiFiClientSecure> 1.0
|   |   |   |-- <WiFi> 1.0
|   |-- <Update> 1.0
|   |-- <WiFi> 1.0
|   |-- <WiFiClientSecure> 1.0
|   |   |-- <WiFi> 1.0
Building in release mode
Compiling .pio\build\lolin32\src\main.cpp.o
Archiving .pio\build\lolin32\lib7a3\libSD.a
Archiving .pio\build\lolin32\lib043\libSPIFFS.a
Archiving .pio\build\lolin32\libaf3\libEEPROM.a
Compiling .pio\build\lolin32\libcd3\WiFi\ETH.cpp.o
Compiling .pio\build\lolin32\libcd3\WiFi\WiFi.cpp.o
Compiling .pio\build\lolin32\libcd3\WiFi\WiFiAP.cpp.o
Compiling .pio\build\lolin32\libcd3\WiFi\WiFiClient.cpp.o
Compiling .pio\build\lolin32\libcd3\WiFi\WiFiGeneric.cpp.o
Compiling .pio\build\lolin32\libcd3\WiFi\WiFiMulti.cpp.o
Compiling .pio\build\lolin32\libcd3\WiFi\WiFiSTA.cpp.o
In file included from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:20:0,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:32,
                 from src\main.cpp:1:
src\main.cpp: In function 'void setup()':
src\main.cpp:2201:42: error: 'EFUSE_BLK0_RDATA3_REG' was not declared in this scope
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                                          ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_assert.h:29:38: note: in definition of macro 'TRY_STATIC_ASSERT'     
             if (__builtin_constant_p(CONDITION) && !(CONDITION)) {          \
                                      ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:151:57: note: in expansion of macro 'IS_DPORT_REG'
 #define ASSERT_IF_DPORT_REG(_r, OP)  TRY_STATIC_ASSERT(!IS_DPORT_REG(_r), (Cannot use OP for DPORT registers use DPORT_##OP));
                                                         ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:194:13: note: in expansion of macro 'ASSERT_IF_DPORT_REG'        
             ASSERT_IF_DPORT_REG((_r), REG_GET_FIELD);                                                                  \
             ^
src\main.cpp:2201:28: note: in expansion of macro 'REG_GET_FIELD'
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                            ^
In file included from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\lwip/arch/cc.h:39:0,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\lwip/lwip/arch.h:48,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\lwip/lwipopts.h:403,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\lwip/lwip/opt.h:51,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\lwip/lwip/ip_addr.h:40,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\tcpip_adapter/tcpip_adapter.h:24,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_event_legacy.h:23,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp_event/esp_event.h:26,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_event_loop.h:22,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src/WiFiGeneric.h:27,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src/WiFiSTA.h:28,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src/WiFi.h:32,
                 from lib\MAKERphone\src/MAKERphone.h:58,
                 from src\main.h:4,
                 from src\main.cpp:2:
src\main.cpp:2201:42: error: 'EFUSE_BLK0_RDATA3_REG' was not declared in this scope
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                                          ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\newlib/assert.h:16:24: note: in definition of macro 'assert'
 # define assert(__e) ((__e) ? (void)0 : __assert_func (__FILE__, __LINE__, \
                        ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:151:38: note: in expansion of macro 'TRY_STATIC_ASSERT'
 #define ASSERT_IF_DPORT_REG(_r, OP)  TRY_STATIC_ASSERT(!IS_DPORT_REG(_r), (Cannot use OP for DPORT registers use DPORT_##OP));
                                      ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:151:57: note: in expansion of macro 'IS_DPORT_REG'
 #define ASSERT_IF_DPORT_REG(_r, OP)  TRY_STATIC_ASSERT(!IS_DPORT_REG(_r), (Cannot use OP for DPORT registers use DPORT_##OP));
                                                         ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:194:13: note: in expansion of macro 'ASSERT_IF_DPORT_REG'        
             ASSERT_IF_DPORT_REG((_r), REG_GET_FIELD);                                                                  \
             ^
src\main.cpp:2201:28: note: in expansion of macro 'REG_GET_FIELD'
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                            ^
In file included from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:20:0,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:32,
                 from src\main.cpp:1:
src\main.cpp:2201:42: error: 'EFUSE_BLK0_RDATA3_REG' was not declared in this scope
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                                          ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_assert.h:29:38: note: in definition of macro 'TRY_STATIC_ASSERT'
             if (__builtin_constant_p(CONDITION) && !(CONDITION)) {          \
                                      ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:151:57: note: in expansion of macro 'IS_DPORT_REG'
 #define ASSERT_IF_DPORT_REG(_r, OP)  TRY_STATIC_ASSERT(!IS_DPORT_REG(_r), (Cannot use OP for DPORT registers use DPORT_##OP));
                                                         ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:164:13: note: in expansion of macro 'ASSERT_IF_DPORT_REG'
             ASSERT_IF_DPORT_REG((_r), REG_READ);                                                                       \
             ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:195:15: note: in expansion of macro 'REG_READ'
             ((REG_READ(_r) >> (_f##_S)) & (_f##_V));                                                                   \
               ^
src\main.cpp:2201:28: note: in expansion of macro 'REG_GET_FIELD'
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                            ^
In file included from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\lwip/arch/cc.h:39:0,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\lwip/lwip/arch.h:48,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\lwip/lwipopts.h:403,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\lwip/lwip/opt.h:51,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\lwip/lwip/ip_addr.h:40,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\tcpip_adapter/tcpip_adapter.h:24,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_event_legacy.h:23,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp_event/esp_event.h:26,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/esp_event_loop.h:22,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src/WiFiGeneric.h:27,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src/WiFiSTA.h:28,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src/WiFi.h:32,
                 from lib\MAKERphone\src/MAKERphone.h:58,
                 from src\main.h:4,
                 from src\main.cpp:2:
src\main.cpp:2201:42: error: 'EFUSE_BLK0_RDATA3_REG' was not declared in this scope
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                                          ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\newlib/assert.h:16:24: note: in definition of macro 'assert'
 # define assert(__e) ((__e) ? (void)0 : __assert_func (__FILE__, __LINE__, \
                        ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:151:38: note: in expansion of macro 'TRY_STATIC_ASSERT'
 #define ASSERT_IF_DPORT_REG(_r, OP)  TRY_STATIC_ASSERT(!IS_DPORT_REG(_r), (Cannot use OP for DPORT registers use DPORT_##OP));
                                      ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:151:57: note: in expansion of macro 'IS_DPORT_REG'
 #define ASSERT_IF_DPORT_REG(_r, OP)  TRY_STATIC_ASSERT(!IS_DPORT_REG(_r), (Cannot use OP for DPORT registers use DPORT_##OP));
                                                         ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:164:13: note: in expansion of macro 'ASSERT_IF_DPORT_REG'        
             ASSERT_IF_DPORT_REG((_r), REG_READ);                                                                       \
             ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:195:15: note: in expansion of macro 'REG_READ'
             ((REG_READ(_r) >> (_f##_S)) & (_f##_V));                                                                   \
               ^
src\main.cpp:2201:28: note: in expansion of macro 'REG_GET_FIELD'
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                            ^
In file included from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\esp32/rom/ets_sys.h:21:0,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOSConfig.h:120,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\freertos/freertos/FreeRTOS.h:99,
                 from C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\cores\esp32/Arduino.h:32,
                 from src\main.cpp:1:
src\main.cpp:2201:42: error: 'EFUSE_BLK0_RDATA3_REG' was not declared in this scope
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                                          ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:165:37: note: in definition of macro 'REG_READ'
             (*(volatile uint32_t *)(_r));                                                                              \
                                     ^
src\main.cpp:2201:28: note: in expansion of macro 'REG_GET_FIELD'
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                            ^
src\main.cpp:2201:65: error: 'EFUSE_RD_BLK3_PART_RESERVE_S' was not declared in this scope
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                                                                 ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:195:32: note: in definition of macro 'REG_GET_FIELD'
             ((REG_READ(_r) >> (_f##_S)) & (_f##_V));                                                                   \
                                ^
src\main.cpp:2201:65: error: 'EFUSE_RD_BLK3_PART_RESERVE_V' was not declared in this scope
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                                                                 ^
C:\Users\ewaca\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\soc/soc/soc.h:195:44: note: in definition of macro 'REG_GET_FIELD'
             ((REG_READ(_r) >> (_f##_S)) & (_f##_V));                                                                   \
                                            ^
src\main.cpp:2201:96: error: invalid operands of types 'void' and 'int' to binary 'operator=='
  if(EEPROM.readBool(33) && REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_BLK3_PART_RESERVE) == 1)
                                                                                                ^
*** [.pio\build\lolin32\src\main.cpp.o] Error 1

it seems to be due to ESP-IDF SDK difference between firmware and platformio.

can you help me plz ?

Hey ewaca,

It seems there is an error in the code since the ESP32 core was updated recently and some errors popped up because of that.

To fix the compilation errors, just add this line next to the other includes in the MAKERphone.h file:

#include <soc/efuse_reg.h>

We’ll make sure to fix this issue in the Ringo library as soon as we can!

I hope this helps!
-Emil from CM

1 Like

it works ! thank you :slight_smile: