CLI CI build fails on Arduino project

I’ve added

#include <Arduino.h> 

to my sketch as done by the platformio importer. Build in the platformio IDE is fine. CI build however fails (run via platformio ci --project-conf ./platformio.ini .):

.pioenvs/base/src/src/.pioenvs/base/FrameworkArduino/core_esp8266_main.o:(.text._ZL12loop_wrapperv+0x4):
undefined reference to `setup'
.pioenvs/base/src/src/.pioenvs/base/FrameworkArduino/core_esp8266_main.o:(.text._ZL12loop_wrapperv+0x8):
undefined reference to `loop'
.pioenvs/base/src/src/.pioenvs/base/FrameworkArduino/core_esp8266_main.o: In function `loop_wrapper()':
core_esp8266_main.cpp:(.text._ZL12loop_wrapperv+0x21): undefined reference to `setup'
core_esp8266_main.cpp:(.text._ZL12loop_wrapperv+0x2d): undefined reference to `loop'
collect2: error: ld returned 1 exit status
scons: *** [.pioenvs/base/firmware.elf] Error 1

Apparently the ci builder doesn’t like the arduino references. Can I fix this in order to get travis build running?

You must implement loop and setup prototypes in the one of source file.

Oh, they are of course in the main vzero.ino file. As I’ve said- compile is fine in the Ide, too. The error is specific to cli build only. I’ve only seen it when preparing platformio for travis biild.

Feel free to checkout GitHub - andig/vzero: VZero - the Wireless zero-config controller for volkszaehler.org

This is a bug. Thanks. Fixed in:

The new version 2.11.1 is going to be released tomorrow.

Nevertheless, you can try the latest Redirecting...

:moneybag: THANKS A LOT FOR DONATION! :moneybag:

:blush:

1 Like

PlatformIO CLI 2.11.1 is released!

Just checked- confirmed fixed, thanks!