CODEWARRIOR V10.7 Relocating

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

CODEWARRIOR V10.7 Relocating

534 Views
abcdchan15
Contributor I

KEAZ128, GCC.

.text2 :
{
__my_text_start = .;
. = ALIGN(4);
*(.my_text)
main.c (.my_text)
. = ALIGN(4);
}> m_text2

Report error "cannot find main.c". I try to relocate startup code to the section whitch bootloader do not erase and i will do the global var initialization by my code. The "__attribute__ ((section" command only relocate one function. 

Tags (1)
0 Kudos
1 Reply

350 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

Yes, the "__attribute__ " command can't relocate a file ,

as your code , if you delete    main.c (.my_text) , then will put .my_text section to m_text2.

About relocating on CW, please take a look at the below guide :

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

Do you want to relocate all the APP code into other memory ? If yes, you can also re-configure the MEMORY part

of Linker file .

Hope it helps,


Have a great day,
TIC

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

0 Kudos