mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-07-21 19:52:11 +00:00
SerialEthernetInterface.cpp is compiled for every nRF52 target because PlatformIO builds all .cpp files under src/. It includes SerialEthernetInterface.h, which unconditionally pulls in <RAK13800_W5100S.h> -- a library only present in the RAK4631 Ethernet env's lib_deps. As a result any other nRF52 board (e.g. Heltec T114) fails to build with 'RAK13800_W5100S.h: No such file or directory'. Wrap the contents of both files in '#ifdef ETHERNET_ENABLED' so they compile to empty translation units on non-Ethernet builds. RAK4631 Ethernet envs define ETHERNET_ENABLED and are unaffected. Fixes #2985