I’m doing a servo application for a Wemos d1-mini board.
There is a bug in the https://github.com/esp8266/Arduino 2.1 library, that makes it crash frequently.
The issue https://github.com/esp8266/Arduino/issues/1742 describes the problem, and that the core lib can be downgraded to version 2.0 to solve it. The lib describes how to do this on Arduino IDE.
But how do I install an earlier version of this lib on PlatformIO? PlaformIO currently uses the problematic 2.1 lib.
PlatformIO is awesome!
Regards,
Dag
Here is an explanation how to use an own version of Arduino Framework for ESP8266.
Thank you!
I tried but got another error. I’m on a mac, and did:
cd ~/.platformio/packages
rm -rf framework-arduinoespressif/
git clone https://github.com/esp8266/Arduino.git framework-arduinoespressif
cd framework-arduinoespressif/
git checkout tags/2.0.0
echo 2.0.0 >version.txt
Then in my project dir:
cd ~/work/annase
platformio run
And got the following error:
[Sun Apr 17 15:45:20 2016] Processing d1_mini (platform: espressif, board: d1_mini, framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------
xtensa-lx106-elf-g++ -o .pioenvs/d1_mini/firmware.elf -Os -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy -Wl,-T"esp8266.flash.4m1m.ld" .pioenvs/d1_mini/src/tmp_ino_to.o -L/Users/dag/.platformio/packages/framework-arduinoespressif/tools/sdk/lib -L/Users/dag/.platformio/packages/ldscripts -L.pioenvs/d1_mini -Wl,--start-group .pioenvs/d1_mini/libFrameworkArduinoVariant.a .pioenvs/d1_mini/libFrameworkArduino.a -lmesh -lwpa2 -lsmartconfig -lpp -lmain -lwpa -llwip -lnet80211 -lwps -lcrypto -lphy -lhal -laxtls -lgcc -lm .pioenvs/d1_mini/libESP8266WiFi.a .pioenvs/d1_mini/libESP8266WebServer.a .pioenvs/d1_mini/libServo.a -Wl,--end-group
/Users/dag/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lmesh
/Users/dag/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find -lwpa2
collect2: error: ld returned 1 exit status
scons: *** [.pioenvs/d1_mini/firmware.elf] Error 1
==================================================== [ ERROR ] Took 0.72 seconds ====================================================
To follow the instruction you linked to, I opened my proj in Arduino iDE and in Boards Manager selected version 2.0.0 of esp8266, and my app compiled and executed reliably.
My proj platformio.ini:
[env:d1_mini]
platform = espressif
framework = arduino
board = d1_mini
Regards,
Dag
Sorry, please place here ~/.platformio/packages/framework-arduinoespressif/tools/sdk/lib
You can find this library in 2.1 version.
P.S: The correct solution in this situation is PlatformIO 3.0. However, we haven’t released it yet. In PlatformIO 3.0 users be able to create own development platform, fork and modify existing and etc.
Now it built without errors!
Thank you!
Regards,
Dag
Hi, what would be the best course of action in the same case as mentioned here now? I am trying to downgrade framework-arduinoespressif to version 2.0.0 coming from latest 2.3.0.
Ultimately I would like to create my own development platform for NodeMCU that will use 2.0.0 branch instead of the latest one, while other projects will be normally built using the master(latest) branch.
My previous attempts:
Thank you!