Compile latest dev fails with core 2.3.0
status 0 :Not possible compile error
USE VSC and compile dev with core 2.3.0 enabled
Compile without error
Linking .pioenvs/sonoff/firmware.elf
/home/gitpod/.platformio/packages/[email protected]/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/lib/libm.a(lib_a-ef_fmod.o):(.literal+0x0): undefined reference to `__ieee754_remainderf'
/home/gitpod/.platformio/packages/[email protected]/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/lib/libm.a(lib_a-ef_fmod.o): In function `__ieee754_fmodf':
ef_fmod.c:(.text+0x36): undefined reference to `__ieee754_remainderf'
collect2: error: ld returned 1 exit status
*** [.pioenvs/sonoff/firmware.elf] Error 1
===================================== [ERROR] Took 85.55 seconds =====================================
============================================= [SUMMARY] =============================================
Environment sonoff [ERROR]
Just a little info.
Yesterday I tried to build firmware on macOS Mojave + Atom (platformio) ... same error.
Today I tried using Windows x64 + VS Code (platformio) and it worked
Found the problem. Core 2.3.0 uses Xtensa build chain 1.408x
In this build chain the file c:\Users\account\.platformio\packages\toolchain-xtensa\xtensa-lx106-elf\lib\libm.a has not included the needed referenced function.
Replacing this file with file from Xtensa build chain 2.4x does solve the error.
Agh.
To solve this for arduino too we have to find the source for function fmodf as used in sonoff_float.ino and add it to this file.
Maybe this https://github.com/jcmvbkbc/newlib-xtensa/blob/xtensa/newlib/libm/math/ef_fmod.c
Won't work either as remainderf also is not in core 2.3.0 lib.
I have another solution and will release soon.
Seems to work :-)
It works!
Thanks ;)