Specifying linker section

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Specifying linker section

ソリューションへジャンプ
1,184件の閲覧回数
davidsherman
Senior Contributor I

According to the GCC documentation, if I add __attribute__((section("section name")) to a declaration, I can specify a section.  However, the linker file has warnings saying don't touch it.  I don't see any settings under the project properties for locating sections.  How does one specify a specific location for something?  I'm using Processor Expert, so that's where the warning not to edit the linker file comes from.

ラベル(1)
0 件の賞賛
1 解決策
763件の閲覧回数
BlackNight
NXP Employee
NXP Employee

You can disable the linker file generation, see last dialog in Disable my Code Generation | MCU on Eclipse

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
763件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi David,

did you define the section in ld file?

please refer

https://community.freescale.com/docs/DOC-101437

"2.1 . No fill() command involved."

this works on my side without any error.

Hope this helps!

====================================================================

this answer is for you. if it helps, please click on "correct answer" button. thanks!

Best Regards,

ZhangJun

0 件の賞賛
763件の閲覧回数
davidsherman
Senior Contributor I

At the top of the ld file:

/* ################################################################### */

/*##

/*##     THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT. */

/*##                                   */

/*##     Filename  : ProcessorExpert.ld */

So, if I modify the file and ProcessorExpert overwrites it if I change something, how does one specify the section that makes Processor Expert aware of it?  I have confirmed that PE overwrites the ld file, removing my edits.

0 件の賞賛
764件の閲覧回数
BlackNight
NXP Employee
NXP Employee

You can disable the linker file generation, see last dialog in Disable my Code Generation | MCU on Eclipse

0 件の賞賛
763件の閲覧回数
davidsherman
Senior Contributor I

Ah, thank you Erich.  Being able to turn off the code generation when it's not wanted could be useful, and that's exactly what I need to be able to control the linker sections.  Thanks!

0 件の賞賛