2014-01-03 03:16 AM
Hello All,
I am new to STM32 cortex M3 controllers. I am building a basic application (LED toggling) in IAR embedded workbench v6.2. I am facing an error Error[Li005]: no definition for ''assert_failed''. What i want to know from you guys that what is the purpose of ''&sharpdefine USE_FULL_ASSERT''.When I comment this line in ''stm32f10x_conf.h'' file, code compiles with no error. Thanks in advanced for comments and suggestions.Baber #use_full_assert #error[li005]
2014-01-03 03:23 AM
Hi
It is a macro (are you familiar with C macros?) The Assert macro is often used during development to trap development bugs. Often the assert macros are written to stop the code so that the failure point can be traced. ''Error[Li005]: no definition for ''assert_failed'''' means there is no definition for the macro ASSERT_FAILED You can continue with the define commented out - then none of the assert macros will do anything.2014-01-03 03:46 AM
Hi sung.chen,
I am familiar with C macros and I have used that many many times. Its nothing but a chunk of code that is replaces it self with full definition where it is called in the code.If there is no definition for this macro where can I find the standard definition. If you have one kindly paste it here.ThanksBaber2014-01-03 03:52 AM
Problem solved used this definition
void assert_failed(u8* file, u32 line){ printf( ''\r\nassert_failed(). file: %s, line: %ld\r\n'', file, line ); while (1) {}}Thanks for the guidance.