Linker file configuration to allow code execution from RAM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Linker file configuration to allow code execution from RAM

2,024件の閲覧回数
s_challa
Contributor I

Hi,

I am using S32K148 in my design. I am implementing the bootloader using CAN communication. I could get CAN communication up and running. I would like to use the same flash bank for bootloader and application code. I want to copy the code responsible for erasing and flashing the memory to RAM so that I can erase the required sectors on the flash and program the application. 

Is there any user guide available for linker configuration such that it creates the symbols for required sections of code and it allows to me to copy the code?? 

Many thanks in advance.

Best regards,

Sreekanth challa

0 件の賞賛
返信
1 返信

1,717件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,
There is a default RAM section for storing code in RAM in the S32DS default linker file.
To place a function in RAM, use:

__attribute__ ((section(".code_ram"))) // place the function below into .code_ram section
void function(void);

Regards,
Daniel

0 件の賞賛
返信