iar for stm8 报错Error[Li005]: no definition for "assert_failed"解决方案
2015-12-04 10:01
661 查看
Building configuration: STM8S_DEMO - Debug
Updating build tree...
Linking
Error[Li005]: no definition for "assert_failed" [referenced from E:\STM8s\STM8S_DEMO\Debug\Obj\stm8s_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.
Updating build tree...
Linking
Error[Li005]: no definition for "assert_failed" [referenced from E:\STM8s\STM8S_DEMO\Debug\Obj\stm8s_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 %d\r\n", file, line) */ /* Infinite loop */ while (1) { } } 加上这个 2.在stm8s_conf.h 中注释 #define USE_FULL_ASSERT |
相关文章推荐
- linq中的contains条件
- Perl Debug error: SetConsoleMode failed, LastError=|6|
- HD1532Drainage Ditches(最大流模板裸题 + 邻接表)
- main.obj:-1: error: LNK2019: 无法解析的外部符号 "public: __thiscall CFindFileForm::CFindFileForm(class QWidge
- http://blog.csdn.net/wankunde/article/details/41675079/Spark 学习入门教程
- hdu3487 Play with Chain
- C++拷贝构造函数详解 http://blog.csdn.net/lwbeyond/article/details/6202256
- 崽崽帮www.zaizaibang.com精选14
- 崽崽帮www.zaizaibang.com精选3
- 崽崽帮www.zaizaibang.com精选2
- 崽崽帮www.zaizaibang.com精选1
- 特征提取http://blog.csdn.net/passball/article/details/5204132
- Debug Assertion Failed!
- 解决Gradle project sync failed
- SVN服务器端安装过程出现“Custom action InstallWMISchemaExecute failed:无法启动服务,原因可能是已被禁用或与其相关联的设备没有启动。”
- c++中类模板(class template)简单示例 http://blog.csdn.net/richerg85/article/details/7565870
- Daily Scrum - 12/03
- 百度 地图 slidingmenu 黑边 使用截图的方式解决黑边问题,步骤: 1.slidingMenu打开的时候调用BaiduMap的snapshot方法截图获取Bitmap对象; 2.使用
- Failed to install HelloWorld.apk on device 'emulator-5554! 解决方案
- PAT 1090. Highest Price in Supply Chain (25)