历史上的今天
今天是:2025年01月22日(星期三)
2020年01月22日 | iar for stm8 报错Error[Li005]: no definition for "assert_failed"解决方案
2020-01-22 来源:eefocus
Building configuration: STM8S_DEMO - Debug
Updating build tree...
Linking
Error[Li005]: no definition for "assert_failed" [referenced from E:STM8sSTM8S_DEMODebugObjstm8s_gpio.o]
Error while running Linker
Total number of errors: 1
Total number of warnings: 0
void assert_failed(u8* file, u32 line);这个函数只是在“stm8s_conf.h”这个文件里面声明,用来在返回值验证出错的时候调用,所以还需要在一个恰当的地方将这个函数实现。一般我是“main.c”
解决方案:
1.
void assert_failed(u8* file, u32 line)
{
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %drn", file, line) */
/* Infinite loop */
while (1)
{
}
} 加上这个
2.在stm8s_conf.h 中注释 #define USE_FULL_ASSERT
史海拾趣
|
//mega16 7.3728MHz石英晶体 iccavr6.31a //相关定义: #define uint unsigned int #define uchar unsigned char #define DS1302_RST 0 //pc0 #define DS1302_SDA 1 //pc1 #define DS1302_SCLK 6 //pc6 //ds1302相关 //DS1302_RST=1 #defi ...… 查看全部问答> |
|
nothing to display for the seleted item 在仿真的时候提示这个错误 是什么意思怎样解决 高手指点一下 在做RTC 闹钟中断的时候 我定义了一个变量 接收计数器的值 uint32_t count; count=RTC_GetCounter(); 仿真时候 ...… 查看全部问答> |
|
你们好,以上是我用的电路图步进电机是28BYJ-48 5VDC 不知道这样的电路图是否有错,调试了两天的PWM还是无法让步进电机转起来!!!! 求各位支招啊!!!!!!!… 查看全部问答> |




