everyone! I'd like to ask your kind support for testing my embedded software with Ceedling.
I am new to this world, so please be gentle!
I have set up a Docker container with Ceedling, offered by throwtheswitch.org. I could import every source file in the "src" directory, including vendor drivers and ARM libraries and was able to run my first test.
Here comes the hard part: I must test a function that interacts with the underlying hardware, so when I tried to test it, it failed because I was accessing illegal addresses on Windows.
I noticed that the driver's vendor has included native testing definitions for cases like this:

So I added the UNIT_TESTING_OCN define to Ceedling's project.yml file under "common_defines". On VSCode, I included the same define, and as you can see from the screenshot, original defines are dimmed out.
Nevertheless, when running "ceedling test:all", the linker loader cannot find the references:

If I press F12 in VSCode it brings me to the new definition included in the #else preprocessor statement. So what gives?
Why can't Ceedling correctly run?
Please ask for more information, I am sure I have missed something you might need.
Thanks in advance!
The code that is compiled when
UNIT_TESTING_OCNis defined just declaresexternfor those symbols so that the compiler will believe they exist. You're not actually defining any variables at all. Hence why linking fails.You should define the actual variables in the test code that uses them.
e.g. I have a test_rtc.c file in one of my projects, which contains:
It sounds like you might want to have something like the following in your tests:
etc.