I have been trying on and off for months to install platformio on my Mac so I can build this project GitHub - esprfid/esp-rfid: ESP8266 RFID (RC522, PN532, Wiegand, RDM6300) Access Control system featuring WebSocket, JSON, NTP Client, Javascript, SPIFFS
After some help from platformio I managed to dothis last week, I had too many versions of python installed.
I download the code and built it nut it generated these errors,
/home/pi/.platformio/packages/framework-arduinoespressif8266@2.20502.0/cores/esp8266/Arduino.h:270:12: error: ‘isinf’ has not been declared in ‘std’
270 | using std::isinf;
I then realised I could install platform io CLI on my raspberry PI 4, which I did and the project built with no errors.
Then I ran this command “pio upgrade” and this package was updated
Updating platformio/toolchain-xtensa 2.40802.200502 @ <3 [Updating to 2.100100.200706]
Tool Manager: Installing platformio/toolchain-xtensa @ 2.100100.200706
Now when I build the project I get the same errors as per my MAC.
So my question is, have I found a bug or more likely as I am a newcomer to platformio is there something wrong with my setup?
Can I roll back to the previous version on both my PI and preferable my MAC so I can use VScode editor?
Is there something else I can do to investigate the problem?
Steve
The platformio.ini
in the “dev” branch actually seems more sensible than that in the stable / main branch, since it fixes the version of the Espressif8266 platform. Stable uses bleeding edge (antipattern…)
Thus it seems like issues with the same root cause as in Not able to build "dev" branch with new "Platform" settings in platformio.ini · Issue #354 · esprfid/esp-rfid · GitHub.
When I do a git checkout dev
in the project folder to switch to the branch, and then Build / pio run
PLATFORM: Espressif 8266 (2.3.2) > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 160MHz, 80KB RAM, 4MB Flash
PACKAGES:
- framework-arduinoespressif8266 2.20603.191216 (2.6.3)
- tool-esptool 1.413.0 (4.13)
- tool-esptoolpy 1.20800.0 (2.8.0)
- toolchain-xtensa 2.40802.200502 (4.8.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
...
RAM: [===== ] 51.5% (used 42192 bytes from 81920 bytes)
Flash: [====== ] 63.8% (used 666472 bytes from 1044464 bytes)
Creating BIN file ".pio\build\generic\firmware.bin" using ".pio\build\generic\firmware.elf"
after_build(["buildprog"], [".pio\build\generic\firmware.bin"])
============================================= [SUCCESS] Took 77.30 seconds =============================================
all is fine.
Switching back to stable
branch gives
PLATFORM: Espressif 8266 (2.6.2+sha.468a625) > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 160MHz, 80KB RAM, 4MB Flash
PACKAGES:
- framework-arduinoespressif8266 3.20704.0 (2.7.4)
- tool-esptool 1.413.0 (4.13)
- tool-esptoolpy 1.30000.201119 (3.0.0)
- toolchain-xtensa 2.40802.200502 (4.8.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
..
RAM: [===== ] 50.7% (used 41540 bytes from 81920 bytes)
Flash: [====== ] 63.1% (used 658748 bytes from 1044464 bytes)
Creating BIN file ".pio\build\generic\firmware.bin" using "C:\Users\Max\.platformio\packages\framework-arduinoespressif8266\bootloaders\eboot\eboot.elf" and ".pio\build\generic\firmware.elf"
after_build(["buildprog"], [".pio\build\generic\firmware.bin"])
============== [SUCCESS] Took 36.57 seconds ==============
… also a successfull compilation! 
This version is not found / correct in any of the two compilations.
I’d suggest you
-
rm -rf ~/.platformio/packages/framework-arduinoespressif8266*
(to get rid of all versions of the Arduino-ESP8266 framework, they’ll be automatically reinstalled later)
-
pio upgrade --dev
to get the latest PIO core version
- try and build the
stable
branch again
- try and build the
dev
branch
Thanks,
That sorted it on my PI and MAC, now to have a look at the project.
Thanks for quick response,
Steve