出现的警告内容:
Warning[25] : Label 'xxxxx' is defined pubweak in a section implicitly declared root
把SECTION .text:CODE:REORDER(1)
改成SECTION .text:CODE:REORDER:NOROOT(1)
或
SECTION .text:CODE:REORDER:ROOT(1)
NOROOT和 ROOT 的区别,NOROOT表示如果符号没有被关联的时候是被优化掉的,如果想不被优化则使用ROOT.
官网解决方法:SECTION .text:CODE:REORDER:NOROOT(1),文件链接
https://www.iar.com/support/tech-notes/assembler/warning25-label-xxxxx-is-defined-pubweak-in-a-section-implicitly-declared-root/

本文介绍了解决IAR编译器中警告25的方法,该警告涉及标签定义问题。通过修改SECTION属性可以避免弱引用标签被隐式声明为根节点的问题,文中提供了具体的配置建议。
970

被折叠的 条评论
为什么被折叠?



