搜索
查看: 951|回复: 0

[原创] TouchGFX编译遇到__aeabi_assert错误该怎么办

[复制链接]

该用户从未签到

52

主题

1122

帖子

67

蝴蝶豆

论坛元老

最后登录
2021-4-24
发表于 2020-7-17 11:23:32 | 显示全部楼层 |阅读模式
在尝试使用TouchGFX的时候会遇到很多坑。尤其是你使用TouchGX Designer并采用官方模板生成的工程。你需要添加很多头文件和源文件到工程中。
  1. <touchgfx_application_root_directory>/gui/include
  2. <touchgfx_application_root_directory>/generated/gui_generated/include
  3. <touchgfx_application_root_directory>/platform/os
  4. <touchgfx_application_root_directory>/generated/fonts/include
  5. <touchgfx_application_root_directory>/generated/images/include
  6. <touchgfx_application_root_directory>/generated/texts/include
  7. <touchgfx_application_root_directory>/touchgfx/framework/include
复制代码
但是即便你尝试这样做之后,还会提示下面的错误:
Error: L6218E: Undefined symbol __aeabi_assert (referred from TouchGFXHAL.o)
在开头还会提示你MicroLib和C++同时使用的警告。
在参考这篇文档(http://www.keil.com/support/docs/4073.htm)之后你可以看到解决方案。
就是把MicroLib给勾掉。

引申:
那为什么会这样?
可以参考这篇文档的介绍:http://www.keil.com/support/man/docs/ARMLIB/armlib_chr1358938938431.htm
基本上告知了MicroLib以下几个特点:
  1. 1、Microlib is not compliant with the ISO C library standard 不兼容标准ISO C库
  2. 2、Microlib is not compliant with the IEEE 754 standard for binary floating-point arithmetic 不兼容IEEE 754标准浮点运算
  3. 3、Microlib is highly optimized for small code size高优化,小尺寸
  4. 4、Locales are not configurable 只有一个Locale,不可配置
  5. 5、main() must not be declared to take arguments and must not return. Main函数不带参,不返回
  6. 6、Microlib provides limited support for C99 functions。对C99支持不完善
  7. 7、Microlib does not support C++ 不支持C++
  8. 8、Microlib does not support operating system functions不支持操作系统函数
  9. 9、Microlib does not support position-independent code 不支持地址无关代码(http://zh.wikipedia.org/wiki/%E5%9C%B0%E5%9D%80%E6%97%A0%E5%85%B3%E4%BB%A3%E7%A0%81)
  10. 10、Microlib does not provide mutex locks to guard against code that is not thread safe不能通过mutex lock确保代码安全
  11. 11、Microlib does not support wide characters or multibyte strings不支持宽字符和多字节字符串
  12. ...太多了,不翻译了
复制代码

其中第7条就告知了不支持c++。




回复

使用道具 举报

您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

站长推荐上一条 /3 下一条

Archiver|手机版|小黑屋|论坛-意法半导体STM32/STM8技术社区

GMT+8, 2024-4-21 00:27 , Processed in 1.147111 second(s), 29 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表