Closed austrobayer closed 5 years ago
Is the actual implementation of iCanModule
in AEB_PROTOTYPES.h
, AEB_PROTOTYPES.c
, or somewhere else?
If the answer is the latter, you're going to need to include the corresponding header file for THAT file in order to tell Ceedling to look for he header. If there IS no corresponding header, then you can create one that includes the function prototypes, just for testing.
The believe the function name being prepended with an underscore is a red herring. If I remember correctly (and I admit it's been a couple years), I believe this is a quirk of the way the XC16 compiler preprocesses files... but it's consistent so it's not the problem you're looking for.
If that doesn't end up being the case, you might consider turning off Ceedling's preprocessor by updating your yaml file:
:project:
:use_test_preprocessor: FALSE
If neither work. Come on back and we'll try again. ;)
@mvandervoord thanks a lot!
I was so confused about the leading underscore that i didnt saw the problems with the includes. After I have inserted all includes separately, no more leading underscores will be created. And yeah, architecture of the SW is horrible, but thats our problem :p
I also had to set "use_test_preprocessor: FALSE" in my project.yml and at the moment everything is running like expected :)
Thanks again.
Hi,
tried to run Ceedling on an existing Microchip XC16 project with the sim30 simulator. With the help of an articel from Atomic Object i was able to run a "Dummy Test" like that.
But when i try to call a function declared in the AEB_PROTOTYPES.h (or one of sub headers included) i am getting "undefined references" errors.
Example: If i try to call the function "iCanModul" which is declared in a header file included in AEB_PROTOTYPES.h i am getting the following error message:
Code is nearly the same like the one above, just added the function call in test_DummyTest_AlwaysFail() function:
Somehow Ceedling/Unity,... added leading underscores to functions and variables. Or do i have some problems in my project.yml?
Running tests on a Windows 7 64Bit, Microchip x 2.10 with XC16 2.10. Ceedling 0.28.2 CException 1.3.1.18 CMock 2.4.4.215 Unity 2.4.1.120
Thanks for your help :) By the way, i am loving Ceeding/Unity one of my preferred tools for unit testing.
Best regards