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.
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!
-----------------------------------------------------------------------------------------------------------------------