I want to put the application and driver code into different addresses so that I can split the hexadecimal file into two complete blocks
When I use IAR, in the *.icf file, using the following code, I can specify the link address of the file
place at address mem:0x12345678 {section .text object a.o}
Is there a way to do this in s32ds, s32k146
Hi,
Please have a look here:
you can force to place a certain segment from specific object file into a different memory region (example uses a object file "lib_a-memcpy-stub.o" from a static library):
1) exclude the object file section from the default section e.g. (.text):
.text :
{
. = ALIGN(4);
/* Exclude file(s) from NewLib libc.a from .text.* section - this replaces .text* */
*(EXCLUDE_FILE (*libc.a:lib_a-memcpy-stub.o) .text*)
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
} > m_text
2) place the object file section into a new placement rule:
.my_text:
{
*libc.a:lib_a-memcpy-stub.o (.text*) /* add memcpy from the NewLib library here*/
} > m_my_text /* my new memory region 0x12345678*/
if your object file is directly compiled from the source code you can replace:
*libc.a:lib_a-memcpy-stub.o (.text*)
with:
*lib_a-memcpy-stub.o (.text*)
Hope it helps
Stan
Hi Stan,
its work
Many Thanks
ttikalit