在使用IAR7.7编译工程的时候,出现一大堆Warning[25]: Label 'xxx' is defined pubweak in a section implicitly declared root 的警告,点进去是指到启动文件startup_stm32f10x_xd.s里面的,这个问题有网友说是IAR在早期的版本里面使用了core_cm3文件,而在6以后高版本IAR中就不需要了。解决的办法IAR官方也给出了方案了(文章末尾):
具体做法就是在启动文件里面startup_stm32f10x_xd.s(双击警告可以直接打开),在SECTION .text:CODE:REORDER(1)后面添加一个NOROOT,改成下面这个样子,注意那个数字是在NOROOT后面的。每一个SECTION都添加后保存,再次编译就不会出错了。
EW targets: | ARM, STM8 |
EW component: | Assembler |
Keywords: | assembly |
Last update: | January 12, 2015 |
Problem
After upgrading to...
EWARM 7.10.1
EWSTM8 2.10.1
...the Warning[25] is issued during assembly of a file that
assembled without warning on earlier version of the Embedded
Workbench.
Solution
To avoid the warning,
add
Add
the
PUBWEAK NMI_Handler SECTION .text:CODE:REORDER:NOROOT(1) NMI_Handler
Background
The assembler is issuing Warning[25] for a deprecated assembler
construction.
The deprecated assembler source construction looks like this:
PUBWEAK NMI_Handler SECTION .text:CODE:REORDER(1) NMI_Handler
Details
The assembler control directive
of
SECTION section :type [:flag] [(align)]
The change
is
The
ROOT (the default mode) or NOROOT
and
REORDER or NOREORDER (the default mode)
Where now the Warning from the Assembler shows that
the
So the
The details for the assembler control directive
of
All product names are trademarks or registered trademarks of
their respective owners.
欢迎光临 (http://www.51hei.com/bbs/) | Powered by Discuz! X3.1 |