I have a project targeting ESP32 platform using arduino frameworks. My co-worker ported it to STM32 and broke the ESP32 compatibility.
As I try to fix it, an error that is not present before showed up:
error: 'to_string' is not a member of 'std'
A few mouth ago I was able to compile for ESP32 without this ERROR. After searching this forum, I fixed this by adding:
platform_packages =
toolchain-xtensa32@~2.80400.0
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.0
The 2nd line in platform_packages was always there. Just the 1st line was added. this fixed the std::to_string error.
But at linking I got:
collect2.exe: error: ld returned 1 exit status
As this compiles of for STM32, I think this may not be a problem in the code.
Do you guys know the way out?
Thank you for the help.
One strange thing to note is that, this code worked on ESP32 a few mouth ago, with std::to_string.
But back then I was using:
platform_packages =
; use a special branch
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#idf-release/v4.0
but this does not work now as I got:
fatal: Remote branch idf-release/v4.0 not found in upstream origin
That’s why I changed to https://github.com/espressif/arduino-esp32.git#2.0.0
, the #2.0.0
does not matter, remove it will produce same result.
Correct, they deleted it, but someone backed it up at framework-arduinoespressif32 @ https://github.com/marcovannoord/arduino-esp32.git#idf-release/v4.0
.
Great thanks, I was able to build finally, using this
platform_packages =
toolchain-xtensa32@~2.80400.0
framework-arduinoespressif32 @ https://github.com/marcovannoord/arduino-esp32.git#idf-release/v4.0