This line says: “Include all files, but exclude the lnm.cpp
”
Since lnm.cpp
is the only file to build there is nothing to build.
There is no setup()
and no loop()
which results in the undefined reference
error.
You want it the other way around:
[env:lasersandmotors]
build_src_filter =
-<*>; exclude everything
+<lnm.cpp> ; build lnm.cpp
See also