How to Place a C file contents to a user defined memory section

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

How to Place a C file contents to a user defined memory section

390 Views
sarathkc351
Contributor I

how can i update linker file so that all the functions (say Fls.c) file will be moved to user defined memory section.I tried below code but is not working.code is compiling but size of  int_fls_rsv is zero.

.fls_code_rom :
{

. = ALIGN(4);
*Fls.o(.text .text*)
} > int_fls_rsv

0 Kudos
Reply
1 Reply

313 Views
stanish
NXP Employee
NXP Employee

Hello,

I'd invite you to see this Howto document:

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-Execute-a-library-function-from-...

perhaps you could try to exclude specific object file using (EXCLUDE_FILE) from .text section

 

 

 .text :
  {
    . = ALIGN(4);
     /* Exclude fsl.o from .text.* section  */        
    *(EXCLUDE_FILE (*fsl.o) .text*)   

 

 

and then place it into your custom section:

 

 

.fls_code_rom :
{

. = ALIGN(4);
 *Fls.o(.text*)
} > int_fls_rsv

 

 

Hope it helps.

Stan

0 Kudos
Reply