出现这个问题是因为在stm8s_conf.h中只声明了函数接口,但是没有地方实现它,所以找个地方写个空函数就行了。常用的方法是在main.c中写个空函数。`
Error[Li005]: no definition for “assert_failed” [referenced from D:zwsrcstm8nrf24l01_gpiosendDebugObjstm8s_gpio.o]
1 928 bytes of readonly code memory
1 786 bytes of readonly data memory
309 bytes of readwrite data memory
Errors: 1
Warnings: none
Link time: 0.06 (CPU) 0.06 (elapsed)
Error while running Linker
Total number of errors: 1
Total number of warnings: 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)
{
}
}
出现这个问题是因为在stm8s_conf.h中只声明了函数接口,但是没有地方实现它,所以找个地方写个空函数就行了。常用的方法是在main.c中写个空函数。`
Error[Li005]: no definition for “assert_failed” [referenced from D:zwsrcstm8nrf24l01_gpiosendDebugObjstm8s_gpio.o]
1 928 bytes of readonly code memory
1 786 bytes of readonly data memory
309 bytes of readwrite data memory
Errors: 1
Warnings: none
Link time: 0.06 (CPU) 0.06 (elapsed)
Error while running Linker
Total number of errors: 1
Total number of warnings: 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)
{
}
}
举报