在STM8程序编译过程中,我碰到了这样的错误: Error[Li005]: no definition for "assert_failed" [referenced from C:\Users\97672\Desktop\STM8_LED\User\Debug\Obj\stm8s_gpio.o] 出现这个问题的原因是…
void assert_failed(u8* file, u32 line);这个函数只是在“stm8s_conf.h”这个文件里面声明,用来在...
* @brief Reports the name of the source file and the source line number * where the assert_param error has occurred. * @param file: pointer to the source file name * @param line: assert_param error line source number * @retval : None */ void assert_failed(u8* file, u32 line) { ...
回复【2楼】正点原子: --- 我看到STM8特便宜就想转型到STM8,以后8位机就不用STC的了。我在淘宝上买器件的时候顺便买了个STM8,然后自己焊了块系统板想学学,结果没买ST-LINK,也烧录不了程序。。这个问题自己解决了,跟STM32里的那个assert failed 是一样的,我没有写assert failed函数,然后又没有把#define ...
#ifdef USE_FULL_ASSERT void assert_failed(u8* file, u32 line){ while (1){ } } #endif ...
void assert_failed(uint8_t* file, uint32_t 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 */ ...
void assert_failed(u8 *文件,u32行){ while(1){ } } #endif stm8.h头文件中最开始会有...
#ifdef USE_FULL_ASSERT void assert_failed(u8* file,u32 line){ while(1){ } } #endif ...
如果在调试时程序跑到void assert_failed(u8* file, u32 line){}。里面去,可以看看是否是参数设置出现问题 先从对STM8的GPIO操作开始。 以前没有过,只用过51的。操作管脚,给1就是1给0就是0.虽然简单但是功能不够给力啊。。 先了解下GPIO吧: General Purpose Input Output (通用输入/输出)简称为GPIO ...
判断参数设置是否符合要求,方便调试程序。如果在调试时程序跑到void assert_failed(u8* file, u32 line){}。里面去,可以看看是否是参数设置出现问题 先从对STM8的GPIO操作开始。 以前没有过,只用过51的。操作管脚,给1就是1给0就是0.虽然简单但是功能不够给力啊。。