I’m working on building a Make-based project for Unit-Testing that uses TinyEmbeddedTest as testing framework. The final .elf binary, which consists of all the source files (.C and .CPP), is supposed to be executed on target hardware i.e. nrf52840, connected in debug session through Segger J-Link. The Makefile I’m using is one I’ve developed myself and it is indeed compiling all the source files into final binary, but the problem is the function responsible for initializing the rest of the test functions is not included in it, as indicated by the VisualGDB output logs. The tests, being visible in Test Explorer, don’t even execute and are skipped while in debug session.
For your information, it’s not that the function in .CPP file is not being compiled along OR the file may not be linked because I’ve verified these steps already.
I’ve attached the screenshots that could be helpful in understanding the problem and finding solution. Thanks in advance!
Sorry, it is hard to say why a particular project would not work. You can try creating a new similar project from scratch, make sure that it works as expected, and then compare projects side-by-side.
E.g. you can see the exact object files produced by both projects, symbols inside them (using objdump), or compare the verbose logs to see if any compiler arguments are different.