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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

730 次查看
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 项奖励
回复
1 回复

653 次查看
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 项奖励
回复