VScode -> Platformio -> ESP32 -> Build failed : assembly debendencies?

i try do build the default INO on

  • Ubuntu
  • VScode
  • Platformio
    → platform = espressif32
    → board = esp32dev
    → framework = arduino
    → lib_deps = totemmaker/Totem Library@^1.0.6

My first Problem was:
“cannot find -lTotemX4 collect2: error: ld returned 1 exit status”

Solved by:
→ Library.json → “build flags” → “flags”: switching from windows notation “\” to linux notation “/”

My actual Problem is:
.pio/libdeps/esp32dev/Totem Library/src/esp32/libTotemX4.a(TotemX4.cpp.o):(.literal._ZN15FirmwareUpdater7collectEPKhj[FirmwareUpdater::collect(unsigned char const*, unsigned int)]+0x4): undefined reference to UpdateClass::begin(unsigned int, int, int, unsigned char)' .pio/libdeps/esp32dev/Totem Library/src/esp32/libTotemX4.a(TotemX4.cpp.o): In function FirmwareUpdater::collect(unsigned char const*, unsigned int)’:
D:\projects\arduino_x4\esp32/lib\TotemX4\src/TotemX4.cpp:278: undefined reference to `UpdateClass::begin(unsigned int, int, int, unsigned char)’
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32dev/firmware.elf] Error 1

Is there any dependecy which is miss?
Or is the Assembly not actual?

Thank you for your hint.


  • Arduino on Ubuntu does work in any case.
  • Arduino on Windows is pending
  • Platformio on Ubuntu (above) nearly finished compiling
  • Platformio on Windows is pending

Hi, we have switched to a new build system. “Totem Library” is deprecated.

Read this tutorial to setup environment: https://docs.totemmaker.net/setup/arduino-ide/

At the moment only Arduino IDE is supported. We will add PlatformIO later.

If you still want to use old implementation (e.g. to remote control X3 board), use this platformio.ini configuration:

platform = espressif32@3.0.0
board = esp32dev
framework = arduino
lib_deps = https://github.com/totemmaker/TotemArduino


Linux und Windows has the same Errors!
Platformio has another bug than the Arduino.

1st Arduino Error:
C:\Users\Aurora\Documents\Arduino\libraries\Totem_Library\src/interfaces/ble/TotemBLENetwork.h:22:10: fatal error: FreeRTOS.h: No such file or directory
#include <FreeRTOS.h>

Solved by:
#include <FreeRTOS.h> ==> #include <freertos/FreeRTOS.h>

2nd Arduino Error:
error: ‘string’ in namespace ‘std’ does not name a type
bool write(const char *command, const std::string value) {

Now i understand!

But than there is something with your Example for X3_FBI:

But the example for the X3 uses the Totem Library! But I must not insert it, because otherwise many things are defined twice.
If I delete the totem library from the example on the page, then this error occurs:
error: ‘Totem’ was not declared in this scope
Totem.BLE.begin(); // Start Bluetooth Low Energy interface

Thanks for a hint.

PS: I have an ESP32 Devkit Module here.

You are correct.

To clarify:

At the moment do not mix them between. Later we will update Totem Library to remove deprecated Totem.X4 implementation and add proper compatibility with latest ESP32 Arduino core.

THANK YOU ! for your quick reply.
We will try it tomorrow an fill come back!