Closed paidforby closed 4 years ago
Note, I have tested with the latest version of makeEspArduino (4.21.0)
The reason for this is that your main.cpp name-clashes with the real main program for the Arduino framework located in cores/esp32/main.cpp. This file contains the calls to the setup and loop procedures in your sketch. In Arduino context your sketch is not really the main program.
Gotcha. That makes sense. Thank you for that clarfication. So guess it is best to not name name the main sketch main.cpp
and stick with something like "main.ino" or "sketch.cpp". Thanks!
Hi @plerup great work on this makefile!
I've noticed this issue for a while, thought I'd finally post an issue because I didn't see one that specifically addressed it.
If I name my main sketch
main.cpp
, runningmake
produces the following linker errors,I know that I can solve my problem by renaming
main.cpp
to anything else, e.g.main.ino
,firmware.cpp
,main-somethingelse.cpp
. I'm really just curious if you know the cause of this limitation. It would be nice to be able to name the main sketch something sensible likemain.cpp
Fyi, the sketch I am attempting to compile is currently found in this PR, https://github.com/sudomesh/disaster-radio/pull/44/files#diff-355efca6cad1bace812bbed5026187d0
and my config.mk looks like,
I am attempting this on Ubuntu 18.04.