How to Place Custom Data into SRAM for S32K146 Using S32 Design Studio for ARM?

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

How to Place Custom Data into SRAM for S32K146 Using S32 Design Studio for ARM?

ソリューションへジャンプ
679件の閲覧回数
Chandler_L
Contributor II
Hi NXP Support Team: I am currently working on a project using the S32K146 microcontroller and the S32 Design Studio for ARM development environment. I would like to place custom data into SRAM for my application but am unsure of the correct procedure to achieve this. I would appreciate any documentation, examples, or instructions that could help me implement this in my project. Thank you for your time and assistance. I look forward to your response. #S32K
0 件の賞賛
返信
1 解決策
662件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@LaiBighead

Please refero to this post, you can use "attribute" to place data to specific address.

https://community.nxp.com/t5/S32-Design-Studio/How-can-S32K-define-a-variable-in-a-specified-address...

 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
663件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@LaiBighead

Please refero to this post, you can use "attribute" to place data to specific address.

https://community.nxp.com/t5/S32-Design-Studio/How-can-S32K-define-a-variable-in-a-specified-address...

 

0 件の賞賛
返信
651件の閲覧回数
Chandler_L
Contributor II

Hi@LSenlent :

I appreciate your help,  I have defined a memory region in the linker script with a length of 4 bytes as shown below:

oem_ram (RW) : ORIGIN = 0x20002A0A, LENGTH = 0x00000004 

._oem_ram :
{
KEEP(*(._oem_ram ))
} > oem_ram

In (.c) file

uint8_t DID_F183_PRO_CODE[4] __attribute__((section(".oem_did_data_ram_area2"))) = { 0xFF, 0xFF, 0xFF, 0xFF };

However, I am receiving the following error during the build process:

Ld error: region `oem_ram' overflowed by 2 bytes

ECU_APP_DemoProject.elf section `._oem_ram ' will not fit in region `oem_ram' 

This suggests that the data segment's actual size exceeds the allocated 4-byte region, causing an overflow. I am unable to understand the exact reason for this overflow, as the data I have defined is just 4 bytes in size.

Could you please help me understand why this overflow is happening and what might be causing the data size to exceed the allocated 4 bytes?

 

I have a question regarding operations in the .id file. Specifically, I would like to know how to copy a custom Flash data segment to SRAM during startup in the S32K146 environment, using S32Studio for ARM.

In other development environments (such as CodeWarrior), I am familiar with the syntax:

cal_flash:             org = 0x00009000,   len = 0x00002000

cal_ram:              org = 0x40001000, len = 0x00001800

_cal_ram LOAD(ADDR(cal_flash)): {} > cal_ram

Could you please guide me on how to implement this operation in S32K146 using S32Studio for ARM?

 

0 件の賞賛
返信
613件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Chandler_L

I have told you how to put data in a specified RAM space.

For more syntax rules, please Google it.

0 件の賞賛
返信