I am trying to compile the gateway for the Bee S3 board (ESP32 S3) with a custom build configuration in PlatformIO. However, the compilation fails during linking because of multiple definitions of a public variable in Espressif Framework and OpenMQTTGateway:
/home/gitpod/.platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld: .pio/build/bee-openhab/libFrameworkArduino.a(USBCDC.cpp.o):/home/gitpod/.platformio/packages/framework-arduinoespressif32/cores/esp32/USBCDC.cpp:25: multiple definition of devices; .pio/build/bee-openhab/src/main.ino.cpp.o:/workspace/OpenMQTTGateway/main/ZgatewayBT.ino:70: first defined here
collect2: error: ld returned 1 exit status
*** [.pio/build/bee-openhab/firmware.elf] Error 1
I can avoid this error by defines vector<BLEdevice*> devices; as external in ZgatewayBT.ino. However, after deploying the firmware to the board, the board gets stuck in a boot loop, most presumably because the USBC code also uses a variable that’s called devices.
Has anybody of you ran into similar issues and knows how to resolve this?
Hi Florian, I tried compiling your environment and can confirm the linking error. As a quick hack I tried to rename “devices” in ZgatewayBT.ino . It compiled but I do not have the means of testing it. You can find the new .ino file in tryZgatewayBT.ino.zip, just a trial.
I tried the firmware. It compiles. However, it still gets stuck in a reboot loop after deployment. I, unfortunately, can’t read the serial port because as soon as the system detects the board on the COM4 port, the board reboots.
Any further ideas on how to find out what could be wrong?
I can confirm that the LED is on GPIO48. I tested this with a Hello World already that ships with the board. Regardless, will disable it and try to rebuild.