Project build error with new_allocator.h

Hi everyone,

I faced with esp32 compilation problem on one of my PCs, on another one I don’t have it.
Could you help find reason why is this happens?

I have this error:

c:\users\den\.platformio\packages\toolchain-xtensa32\xtensa-esp32-elf\include\c++\5.2.0\ext\new_allocator.h:120:4: error: no matching function for call to 'String(const char*&, unsigned int&)'
c:\users\den\.platformio\packages\toolchain-xtensa32\xtensa-esp32-elf\include\c++\5.2.0\ext\new_allocator.h:120:4: error: invalid conversion from 'const char*' to 'unsigned int' [-fpermissive]

platformio.ini file config:

[platformio]
;default_envs = development, production

; custom common options
[env]
platform = espressif32@3.5.0
board = esp-wrover-kit
framework = arduino

monitor_speed = 921600
monitor_port = COM53
;upload_port = COM53

; FTP Server Config
;https://docs.python.org/3/library/ftplib.html
; Dev Ota
custom_ftp_server = ftp.blablabla.com
custom_ftp_user = blablabla
custom_ftp_pwd = blablabla


; Firmware and JSON config folders on webserver.
custom_ftp_json_dir = /json/
custom_ftp_fw_dir = /fw/

; Version Config
custom_prog_version = 1.0.1 ; using in project binary file and for creating artifacts for FW update JSON and also in binary name.
custom_prog_name = new_device ; using for binary file prefix
custom_board_name = new_device ; using for FW Update json Board field
custom_hardware_version = Rev.1111
; Create binary file url base on defined variables.
;custom_ota_protocol = 
custom_ota_url = ${this.custom_ftp_server}${this.custom_ftp_json_dir}${this.custom_prog_name}.json
custom_ota_local_folder_name = _ota_files
	
	
;build_type = debug
monitor_filters = 
	esp32_exception_decoder
	default   ; Remove typical terminal control codes from input
	;time      ; Add timestamp with milliseconds for each new line
	;log2file  ; Log data to a file β€œplatformio-device-monitor-*.log” located in the current working directory

;board_build.partitions = no_ota.csv
board_build.partitions = default_8MB.csv


[env:development]

; Something for debug config only
build_flags =
  -D FW_VERSION=${this.custom_prog_version}
  -D HW_VERSION=${this.custom_hardware_version}
  -D DEV_NAME=${this.custom_prog_name}
  -D COMPILE_UNIX_TIME=$UNIX_TIME
  -D OTA_URL=${this.custom_ota_url}
  '-D SERIAL_DEBUG'
  '-D SIM800L_IP5306_VERSION_20200811'
  ;-DCORE_DEBUG_LEVEL=5
  -DCONFIG_ARDUHAL_LOG_COLORS
  -DCONFIG_TASK_WDT_TIMEOUT_S=20
  -DENABLE_OTA_UPDATE
  -std=gnu++11 
  -DARDUINOJSON_ENABLE_ARDUINO_STRING=1


lib_deps = 
	ESP8266WiFi
	https://github.com/tzapu/WiFiManager.git
	milesburton/DallasTemperature@^3.11.0
	; https://github.com/PaulStoffregen/OneWire/issues/58
	; paulstoffregen/OneWire@^2.3.7 we put manually 2.1 version, because on the latest we have problem with 85 *C
	https://github.com/me-no-dev/ESPAsyncWebServer.git
	adafruit/Adafruit Unified Sensor@^1.1.9
	marcoschwartz/LiquidCrystal_I2C@^1.1.4
 	https://github.com/bblanchon/ArduinoJson#v5.13.4
	https://github.com/adafruit/RTClib#2.1.2
	https://github.com/adafruit/Adafruit_ADS1X15.git#2.4.1
	https://github.com/adafruit/Adafruit_BME280_Library#2.2.3
	https://github.com/plerup/espsoftwareserial#8.0.3
	https://github.com/xreef/PCF8574_library
	https://github.com/Freenove/Freenove_WS2812_Lib_for_ESP32#v1.0.5
	https://github.com/claws/BH1750
	https://github.com/Xinyuan-LilyGO/LilyGo-T-Call-SIM800.git
  	https://github.com/vshymanskyy/TinyGSM.git
  	https://github.com/vshymanskyy/StreamDebugger.git

extra_scripts = 
	reset_target.py

Are you sure you want to use such an ancient version?
That is Espressif Arduino 1.0.6 based on ESP-IDF 3.3.5!!!

The latest official available platform-espressif32 version is 6.10.0 which will give you
Espressif Arduino 2.0.17 based on ESP-IDF 4.4.7

If you want to know more about these version numbers
and / or how to get the latest Espressif Arduino 3.1.3 check this list.

1 Like

This does not make any sense in an ESP32 based project!

Also there are quite a lot of other settings as well as an (for us unknown) β€œreset_target” script. Do you really need all those settings and you you know whey they are set and what they are doing?

1 Like

Thanks a lot, this helps.
Changed platform = espressif32@3.5.0 to platform = espressif32 and project compiled successfully.
Tomorrow I gonna check this on the ESP32 hardware.

Strange that the same configuration works for another project.

Without specifying an exact version number, the highest version installed on your system will be used. Better you stick it to a specific version.

1 Like

You’ll see the version used in the first few output lines when compiling the project.

PLATFORM: Espressif 32 (6.10.0)
1 Like

Your advice helped me compile it, but the chip no longer runs. I can see trash in the terminal:
β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’
I’ve tried platform = espressif32@4.0.0 and latest platform = espressif32@6.10.0.
I don’t know why, only 3.5.1 works at me, but I can compile this on my second PC.

I found the problem. In my platformio.ini file, there also was missing partitions config

board_build.partitions = default_8MB.csv

When I added this, the firmware runs appropriately.