Using the __attribute__ directive in KDS

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

Using the __attribute__ directive in KDS

777 Views
Jiun_Yong
Contributor III

Hi

I am new to using Kinetis Design Studio. (Previously used Code Warrior and S12/S12X processors.)

Can anyone direct me to some clear documentation on the use of the __attribute__ directive which is used by the linker.

I have found examples of its use e.g. __attribute__ ((interrupt)) and __attribute__ ((const)), but I cannot find anything in the KDS help file.

Specifically, I want to be able to control where compiled code is put in memory (for a bootloader application).

Many thanks

Steve Lewis

Labels (1)
0 Kudos
Reply
1 Reply

527 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello STEVE,

In KDS,  we need first use __attribute__ define one section , use it to relocate a function or data .

Then in the linker file ,  create a new segment to relocate the function.

About how to do in detail , please refer to this DOC :

Relocating Code and Data Using the KDS GCC Linker File for Kinetis

Hope it helps



-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

Have a great day,
Alice

0 Kudos
Reply