Hi
I want to assign functions to specific address when generating binary files.
So I use #pragma arm section . But Warning is occured and Don't process it.
How to assign functions to specific address?
Like below :
------ Linker file-----------
MEMORY
{
m_flash (RX) : ORIGIN = 0x00010410, LENGTH = 0x0006FBF0
}
SECTIONS
{
.flash :
{
. = ALIGN(4);
KEEP (*(.flash))
. = ALIGN(4);
} > m_flash
}
----- C file. ----------------
#pragma arm section code="flash"
FuncA();
FuncB();
FuncC();
#pragma arm section
Best regards,
Byungju.
Solved! Go to Solution.
Hello,
you can use the following attribute for functions:
__attribute__((section (
".flash"
)))
See the examples at the end of Execute-Only Code with GNU and gcc
or Putting Code of Files into Special Section with the GNU Linker
I hope this helps,
Erich
Hello,
you can use the following attribute for functions:
__attribute__((section (
".flash"
)))
See the examples at the end of Execute-Only Code with GNU and gcc
or Putting Code of Files into Special Section with the GNU Linker
I hope this helps,
Erich
Hi Erich,
Thanks for your help.
Like as your mention, The function is writted at the address I want in binary.
Best regards,
Byugnju.