Specifying linker section

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Specifying linker section

Jump to solution
1,127 Views
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.

Labels (1)
0 Kudos
1 Solution
706 Views
BlackNight
NXP Employee
NXP Employee

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

View solution in original post

0 Kudos
4 Replies
706 Views
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 Kudos
706 Views
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 Kudos
707 Views
BlackNight
NXP Employee
NXP Employee

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

0 Kudos
706 Views
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 Kudos