当前位置: 首页 > news >正文

无为住建设局网站2023今日新闻头条

无为住建设局网站,2023今日新闻头条,招聘网站建设方案模板,北京公司转让交易平台MDK报错:Undefined symbol assert_failed报错解决策略 🎯🪕在全网搜索相关MDK编译报错:Error: L6218E: Undefined symbol assert_param (referred from xxx.o). ✨有些问题看似很简单,可能产生的问题是由于不经意的细节原因导致。…

MDK报错:Undefined symbol assert_failed报错解决策略


  • 🎯🪕在全网搜索相关MDK编译报错:Error: L6218E: Undefined symbol assert_param (referred from xxx.o).

✨有些问题看似很简单,可能产生的问题是由于不经意的细节原因导致。引起报错的问题有很多种可能,没有放之四海皆准的解决方案。

  • 🌿提供的解决问题的可能方案一:添加宏定义USE_STDPERIPH_DRIVER
    在这里插入图片描述
  • 🌿提供的解决问题的可能方案二:没有将相对应的驱动头文件(.h)路径包含进来或者是源文件(.c)添加到工程中。
  • 🔖这里针对的是具体的驱动文件或驱动头文件。
    在这里插入图片描述
    在这里插入图片描述
  • 🌿提供的解决问题的可能方案三:在main.c文件中,补充下面的void assert_failed()断言报错函数:
#ifdef USE_FULL_ASSERT
/*** @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(uint8_t *file, uint32_t line)
{/* USER CODE BEGIN 6 *//* User can add his own implementation to report the file name and line number,tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) *//* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
✨很多外部导入的工程源码,添加完标准库文件后,编译报此错误,往往可能是忽略标准库驱动文件中定义了此断言assert_failed函数,却没有写实现的地方,才会出现有调用assert_param宏的驱动文件中报错。

、

/* Exported macro ------------------------------------------------------------*/
#define USE_FULL_ASSERT#ifdef  USE_FULL_ASSERT/*** @brief  The assert_param macro is used for function's parameters check.* @param  expr If expr is false, it calls assert_failed function*         which reports the name of the source file and the source*         line number of the call that failed.*         If expr is true, it returns no value.* @retval None*/#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))/* Exported functions ------------------------------------------------------- */void assert_failed(uint8_t *file, uint32_t line);
#else#define assert_param(expr) ((void)0U)
#endif /* USE_FULL_ASSERT */
http://www.hkea.cn/news/867028/

相关文章:

  • 网站建设洪塔网站搜索优化排名
  • 专业做设计师品牌网站深圳百度总部
  • 网站兼容工具seo关键词排名优化教程
  • O2O网站制作需要多少钱美区下载的app怎么更新
  • 上海做网站 公司做电商必备的几个软件
  • caozi.com网站建设中百度指数如何分析数据
  • 互联网舆情处置公司武汉seo外包平台
  • 消防器材网站建设背景seo工作职位
  • 专业网站制作公司名称seo咨询茂名
  • 做b2c网站建网站seo
  • 代理注册香港公司seo技术交流论坛
  • 想要提高网站排名应该怎么做seo网站推广费用
  • 专业做食材网站seo链接优化建议
  • 做画册的网站附近哪里有计算机培训班
  • 大兴建站推广google登录
  • 长春个人做网站哪家好百度指数热度榜
  • 嘉兴手机网站开发费用百度学术论文官网入口
  • 刷业务网站怎么做seo关键词挖掘
  • 企业移动网站品牌苏州网站外包
  • 网站建设流程 文档东莞seo技术
  • 公众号开发网站建设合同信息流广告投放流程
  • 长清网站建设费用友情链接出售平台
  • 先做网站再付款百度推广的广告真实可信吗
  • 湖南省人民政府一事一办企业网站seo排名优化
  • 深圳招聘网官方网站网站搜索引擎优化
  • 怎么知道一个网站是谁做的中国最大的企业培训公司
  • m2c是什么意思南昌百度seo
  • 专业做羽绒服的服装网站域名注册网
  • 公司网站建设需要显示什么软件世界球队最新排名
  • 做微信平台图片网站有没有免费的广告平台