Hello,

durign testing I got an assert:

asserted at Filename ../Libraries/Serval/BCDS_Customization/debug/libServal_efm32_debug.c , line no  165

but I can't see a "libServal_efm32_debug.c" file.
So, is there something to locate the assertion in such a case?
0 (0 투표)
asserts from none existings files (libServal_efm32_debug.c)
응답
16. 1. 18 오전 11:24 as a reply to Achim Kraus.
Hello Achim,

it seems like your file is part of your workbench-project.
When your working with XDK-workbench, you can find every file by Crtl-H.
This search function automatically shows you the file path, if the file exists.

Please let me know if this helps.

Best regards,
Manuel
0 (0 투표)
asserts from none existings files (libServal_efm32_debug.c)
응답
16. 1. 18 오후 3:18 as a reply to Manuel Cerny.
No, it doesn't.

The path "../Libraries/Serval/BCDS_Customization/debug/libServal_efm32_debug.c" doesn't point to my workbench-project. Even if I use the windows explorer, no "libServal_efm32_debug.c" is found, only the ".a" file.

Therefore I thought, that someone knows how to interpret that assert and how to locate the issue.
 
0 (0 투표)
asserts from none existings files (libServal_efm32_debug.c)
응답
16. 1. 21 오후 1:08 as a reply to Achim Kraus.
Hi Achim,

you are using an internal library. This library is static (.a) and will be directly liked into the xdk-program at compile time.
Unfortunately, there is no implementation file (.c) for such type of library.

The only thing you can do is, debug your code and find the place where your program asserted.
Make sure that all of the conditions of the functions you implement are fulfilled.

Best regards,
Manuel
0 (0 투표)
asserts from none existings files (libServal_efm32_debug.c)
응답
16. 1. 25 오전 11:51 as a reply to Manuel Cerny.
Sorry, this means:
- there is someone who can look up, what's the matter
- but instead, we should spend a lot lot lot lot of time to try it out

I'm not sure, if my managment agrees on spendign that time :-).
 
0 (0 투표)
asserts from none existings files (libServal_efm32_debug.c)
응답
16. 1. 26 오전 8:38 as a reply to Achim Kraus.
Next assert:

asserted at Filename ../Libraries/Serval/BCDS_Customization/debug/libServal_efm32_debug.c , line no  58

And, though I have access to BIOS/Serval sources, I still can't find a file "libServal_efm32_debug.c"!

So, please, forward this finding to the one who did the "assert" module! I'm sure he knows how to handle such reports!

 
0 (0 투표)
asserts from none existings files (libServal_efm32_debug.c)
응답
16. 1. 28 오후 5:49 as a reply to Achim Kraus.
Hello Achim,

I forwarded the question to the developers. Meanwhile, maybe we can find out what's excatly going on in your project.

These are my thoughts on the issue: 
According to the log message, the DBG_ASSERT() call that failed is located in the file "../Libraries/Serval/BCDS_Customization/debug/libServal_efm32_debug.c" (relative to your project folder!).
But neither this file nor the folder structure are part of the SDK and were therefore probably created by you, someone else or some third party tool. You said that you found a corresponding .a file, so I assume that this path exists within your workspace folder? If that's true, please check your Makefile for references on it. Because at compile time, the comiler must have found this file, otherwise he could not have created an executable binary that references code from it ... Does your project build without errors?
Further, what do you mean by saying that you have "access to BIOS/Serval sources"?

Kind regards,
Manuel
0 (0 투표)
asserts from none existings files (libServal_efm32_debug.c)
응답
16. 1. 29 오전 9:40 as a reply to Manuel Cerny.
Hello Manuel,

after spending some time, it's simply a problem of the makefile system. It uses $* to determine the DBG_ASSERT_FILENAME but triggers the build of sub libs calling make. 
At this point, DBG_ASSERT_FILENAME now not longer contains the $*.c instead it contains the fixed content "../Libraries/Serval/BCDS_Customization/debug/libServal_efm32_debug.c".
If that is used in the *.o : *.c rule, not the stem ($+) , just the already expanded value is used.
Therefore the filename is useless.

To make a build, I change the $* to $$* and build the libs.
When the application is build, this results in an error.
Then I switch back to $* and finish the build.
After that, the filenames shows up in the assert message.

> Further, what do you mean by saying that you have "access to BIOS/Serval sources"?
 
The source for serval are part of BIOS (Bosch Internal Open Source) and therefore I can access
them via git.
 
0 (0 투표)
asserts from none existings files (libServal_efm32_debug.c)
응답
16. 1. 29 오후 6:22 as a reply to Achim Kraus.
Hello Achim,

wow, so the path is frozen into the DBG_ASSERT_FILENAME variable by the parent make call and then used unchanged througout the child make call? Great bug tracing!
But just to get this right, is this behaviuor present in the shipped XDK SDK or only in the Makefiles of these sources that you have access to?

Kind regards,
Manuel
0 (0 투표)
asserts from none existings files (libServal_efm32_debug.c)
응답
16. 2. 1 오후 2:34 as a reply to Manuel Cerny.
Hello Manuel,

that's not easy to answer, it's a mixture of the makefiles in "xdk110/common" and the sub-libraries as serval or other stuff using "assert".
Using the new release 1.5 it seems to be changed, but now DBG_FAIL is missing and I miss the "migration notes" for the assert stuff :-).
And logging CFLAGS indicates, that now no ASSERT_FILENAME nor DBG_ASSERT_FILENAME is set, means also "DBG_assert_ih.h" is provided but not longer used, which explains DBG_FAIL is missing.

So,is there a migration strategy?

And how should third party libraries (e.g. serval) migrate the assert stuff?

best regards
Achim

 
0 (0 투표)
asserts from none existings files (libServal_efm32_debug.c)
응답
16. 2. 1 오후 8:46 as a reply to Achim Kraus.
Hello Achim,

Release 1.5 really improved on many things, including assertions. The migration strategy for your project would be to use assertions just like the demo projects do:

/* timer create fail case */
        if (NULL == printTimerHandle)
        {
            /* Assertion Reason: "This software timer was not Created, Due to Insufficient heap memory" */
            assert(false);
        }

For third party libraries, I can't provide you a standard solution. Normally, such libraries should not depend on XDK sources and should be compilable on their own. As these serval modules apparently aren't, your best chance is probably to ask the providers/developes of the library.

Kind regards,
Manuel

0 (0 투표)
asserts from none existings files (libServal_efm32_debug.c)
응답
16. 2. 2 오후 12:54 as a reply to Manuel Cerny.
Thanks!

But thus this mean "DBG_assert_ih.h" is removed from SDK but left in Platform/utils/include?
And I can't see a hint in the migration guide.

 
0 (0 투표)
asserts from none existings files (libServal_efm32_debug.c)
응답
16. 2. 4 오후 6:50 as a reply to Achim Kraus.
Hello Achim,

well, DBG_assert wasn't removed from the SDK - you can still include it and call the functions - it is rather disabled by default. With these lines at the beginning of the file "DBG_assert_ih.h":
/* Make NDEBUG the default option */
#ifndef NDEBUG
#ifndef DEBUG
#define NDEBUG
#endif
#endif
the project is set into non-debug mode just by including the header (the old DEBUG flag is undefined by default). So the DBG_assert module should be treated as legacy code for compatibility.
This is, as you correctly noted, not documented in the migration guide.
Kind regards,
Manuel

PS: There's also this comment in the Makefiles:
# @todo 2016-06-24, mta5cob: Once all the projects migrate to BCDS_assert.h,
# the -DDBG_ASSERT_FILENAME=\"$*.c\" shall be removed.
# This variable should fully specify the debug build configuration 
BCDS_DEBUG_FEATURES_CONFIG = \
     -DDBG_ASSERT_FILENAME=\"$*.c\" -DASSERT_FILENAME=\"$*.c\"
0 (0 투표)