Firmware build from source error Resolved


#1

I tried to do a firmware build from the latest source code using VS Code and platformio but I’m getting an error during linking. Anyone have the same issue or know what the problem is? Here’s the last part of the build before it fails.


Compiling .pioenvs\iotawatt\FrameworkArduino\spiffs\spiffs_gc.c.o
Compiling .pioenvs\iotawatt\FrameworkArduino\spiffs\spiffs_hydrogen.c.o
Compiling .pioenvs\iotawatt\FrameworkArduino\spiffs\spiffs_nucleus.c.o
Compiling .pioenvs\iotawatt\FrameworkArduino\spiffs_api.cpp.o
Compiling .pioenvs\iotawatt\FrameworkArduino\spiffs_hal.cpp.o
Compiling .pioenvs\iotawatt\FrameworkArduino\time.c.o
Compiling .pioenvs\iotawatt\FrameworkArduino\uart.c.o
Compiling .pioenvs\iotawatt\FrameworkArduino\umm_malloc\umm_malloc.c.o
Archiving .pioenvs\iotawatt\libFrameworkArduino.a
Linking .pioenvs\iotawatt\firmware.elf
.pioenvs\iotawatt\src\samplePower.cpp.o:(.text._Z11samplePhasehht+0x2c): undefined reference to xbuf::readString()' .pioenvs\iotawatt\src\samplePower.cpp.o: In functionsamplePhase(unsigned char, unsigned char, unsigned short)’:
samplePower.cpp:(.text._Z11samplePhasehht+0x5a1): undefined reference to `xbuf::readString()’
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\iotawatt\firmware.elf] Error 1
======================================================================= [ERROR] Took 188.35 seconds =======================================================================

================================================================================ [SUMMARY] ================================================================================
Environment iotawatt [ERROR]
Environment iotawatt_staging [SKIP]
======================================================================= [ERROR] Took 188.36 seconds =======================================================================
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.


#2

ok, I found the issue. I updated the dependency in the platformio.ini file for asyncHTTPrequest to ver 1.1.10 (was 1.1.9) and that corrected the issue.


[common]
lib_deps = ArduinoJson@5.13.1
WifiManager@0.14
RTClib@1.2.1
Crypto@0.1.3
ESPAsyncTCP@1.1.3
asyncHTTPrequest@1.1.10