Change the #ifdef USE_FULL_ASSERT to #ifdef DEBUG, like in good old library 2.0, or simply #define USE_FULL_ASSERT yourself or put USE_FULL_ASSERT in the C/C++ preprocessor macro definitions.
This is where it pays to understand how the whole preprocessor-compiler-linker process works.
If the Linker is giving you this error, it means that the Compiler has generated calls to assert_param as if it were a function. This means that your macro definition is not working properly! To sort out preprocessor problems like this, find out (in the Compiler Manual) how to view the preprocessor output...
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
''How can I know if a macro is working properly?''
You do understand what macros are supposed to do, don't you? So, if they do that, then we say that they are ''working'' !!;)
To recap, a macro is a text substitution - so, instead of seeing ''assert_param'' in the pre-processed text, you should see its expansion. If you are still seeing ''assert_param'' in the pre-processed text, then the preprocessor has not expanded it; ie, it has not worked as a macro!
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Note that there is also a #else which should create a ''null'' definition when USE_FULL_ASSERT is not defined.
The fact that you're getting neither the ''full'' definition nor the ''null'' definition - so that the compiler thinks it's a function call - suggests that you are not actually including this at all...
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Note that this is standard 'C' stuff - nothing specifically to do with STM32, IAR, or embedded. Therefore any 'C' textbook should help... ''I'm going to find whether it is possible to disable/enable macros in EWARM.'' No, that is not the correct approach! What you need to do is to find out how to correctly configure your Project so that the macro works! Note that the macro definition is contained within #ifdef USE_FULL_ASSERT This means that the definition is effective only if the symbol USE_FULL_ASSERT is defined...
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Posted on May 17, 2011 at 13:44''The compiler return first error''
What error, precisely, is that?
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.