如果你的keil的帮助里面没有,你可以看官方的:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.subset.swdev.comp6/index.html
里面有章节讲了从v5到v6迁移的例子,pdf版本可以从
http://infocenter.arm.com/help/topic/com.arm.doc.100068_0611_00_en/migration_and_compatibility_guide_100068_0611_00_en.pdf
下载,
里面的第53页有讲怎么处理at。
如果你下载不下来,我复制了如下,格式很乱,自己看吧。
Section
__attribute__((section("name"))) is supported by Arm Compiler 5 and Arm Compiler 6. However,
this attribute might require modification in your code.
When using Arm Compiler 5, section names do not need to be unique. Therefore, you could use the same
section name to create different section types.
Arm Compiler 6 supports multiple sections with the same section name only if you specify a unique ID.
You must ensure that different section types either:
• Have a unique section name.
• Have a unique ID, if they have the same section name.
If you use the same section name, for another section or symbol, without a unique ID, then armclang
integrated assembler merges the sections and gives the merged section the flags of the first section with
that name.
Migrating __attribute__((at(address))) and zero-initialized __attribute__((section("name")))
from Arm®
Compiler 5 to Arm®
Compiler 6
Arm Compiler 5 supports the following attributes, which Arm Compiler 6 does not support:
• __attribute__((at(address))) to specify the absolute address of a function or variable.
• __attribute__((at(address), zero_init)) to specify the absolute address of a zero-initialized
variable.
• __attribute__((section(name), zero_init)) to place a zero-initialized variable in a zeroinitialized
section with the given name.
• __attribute__((zero_init)) to generate an error if the variable has an initializer.
The following table shows migration paths for these features using Arm Compiler 6 supported features:
Table 4-4 Migrating __attribute__((at(address))) and zero-initialized __attribute__((section("name")))
Arm Compiler 5 attribute Arm Compiler 6 attribute Description
__attribute__((at(address))) __attribute__((section(".ARM.__at_address"))) armlink in Arm Compiler 6
still supports the placement of
sections in the form
of .ARM.__at_address
__attribute__((at(address),
zero_init))
__attribute__((section(".bss.ARM.__at_address"))) armlink in Arm Compiler 6
supports the placement of zeroinitialized
sections in the form
of .bss.ARM.__at_address.
The .bss prefix is case
sensitive and must be all
lowercase.
__attribute__((section(name),
zero_init))
__attribute__((section(".bss.name"))) name is a name of your choice.
The .bss prefix is case
sensitive and must be all
lowercase.
__attribute__((zero_init)) Arm Compiler 6 by default places zero-initialized variables in
a .bss section. However, there is no equivalent to generate an
error when you specify an initializer.
Arm Compiler 5 generates an
error if the variable has an
initializer. Otherwise, it places
the zero-initialized variable in
a .bss section.
排版太差了,我也看不下去了,表格部分抓了个图,不过一定要配合上下文。
1 如果看不懂英语,继续问,论坛里有博士和博导天天吵架,要不耻上问。
2 如果keil本身有bug,和keil官方沟通。
|