-
Notifications
You must be signed in to change notification settings - Fork 282
Description
onewire.ino cannot build because checkSwSerial
is not generated after .ino -> .cpp conversion
xtensa-lx106-elf-g++ -o .pio/build/nodemcuv2/FrameworkArduino/LwipDhcpServer.cpp.o -c -fno-rtti -std=gnu++17 -fno-exceptions -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections -Wall -Werror=return-type -free -fipa-pta -DPLATFORMIO=60107 -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_NODEMCU_ESP12E -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -D_GNU_SOURCE -DARDUINO=10805 -DARDUINO_BOARD="PLATFORMIO_NODEMCUV2" -DARDUINO_BOARD_ID="nodemcuv2" -DFLASHMODE_DIO -DLWIP_OPEN_SRC -DNONOSDK22x_190703=1 -DTCP_MSS=536 -DLWIP_FEATURES=1 -DLWIP_IPV6=0 -DVTABLES_IN_FLASH -DMMU_IRAM_SIZE=0x8000 -DMMU_ICACHE_SIZE=0x8000 -I.pio/build/nodemcuv2/core -I/home/runner/work/Arduino/Arduino/tools/sdk/include -I/home/runner/work/Arduino/Arduino/cores/esp8266 -I/home/runner/work/Arduino/Arduino/tools/xtensa-lx106-elf/include -I/home/runner/work/Arduino/Arduino/tools/sdk/lwip2/include -I/home/runner/work/Arduino/Arduino/variants/nodemcu /home/runner/work/Arduino/Arduino/cores/esp8266/LwipDhcpServer.cpp
/tmp/tmp3vs56zl4/src/onewiretest.ino: In function 'void loop()':
/tmp/tmp3vs56zl4/src/onewiretest.ino:31:2: error: 'checkSwSerial' was not declared in this scope
31 | checkSwSerial(&swSer1);
| ^~~~~~~~~~~~~
*** [.pio/build/nodemcuv2/src/onewiretest.ino.cpp.o] Error 1
Tried to fix it via platformio/platformio-core#4586, but I missed that it was reverted for Tasmota platformio/platformio-core#4594 when sketch uses multiple .ino files
PIO breaks even with a single file, since only 'simple' declarations are generated
arduino-cli would behave the same when two or more .ino files are used, when forward-decl is added before library header is included