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?

ソリューションへジャンプ
1,324件の閲覧回数
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 解決策
1,307件の閲覧回数
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 返答(返信)
1,308件の閲覧回数
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 件の賞賛
返信
1,296件の閲覧回数
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 件の賞賛
返信
1,258件の閲覧回数
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 件の賞賛
返信
%3CLINGO-SUB%20id%3D%22lingo-sub-2047717%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EARM%E7%94%A8%E3%81%AES32%20Design%20Studio%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6S32K146%E7%94%A8%E3%81%AESRAM%E3%81%AB%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E9%85%8D%E7%BD%AE%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2047717%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AFNXP%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88%E3%83%81%E3%83%BC%E3%83%A0%3A%E7%A7%81%E3%81%AF%E7%8F%BE%E5%9C%A8%E3%80%81ARM%E9%96%8B%E7%99%BA%E7%92%B0%E5%A2%83%E7%94%A8%E3%81%AES32K146%E3%83%9E%E3%82%A4%E3%82%AF%E3%83%AD%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%A9%E3%81%A8S32%20Design%20Studio%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%9F%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AB%E5%8F%96%E3%82%8A%E7%B5%84%E3%82%93%E3%81%A7%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%20%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%20SRAM%20%E3%81%AB%E9%85%8D%E7%BD%AE%E3%81%97%E3%81%9F%E3%81%84%E3%81%AE%E3%81%A7%E3%81%99%E3%81%8C%E3%80%81%E3%81%93%E3%82%8C%E3%82%92%E5%AE%9F%E7%8F%BE%E3%81%99%E3%82%8B%E6%AD%A3%E3%81%97%E3%81%84%E6%89%8B%E9%A0%86%E3%81%8C%E3%82%8F%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%E3%81%93%E3%82%8C%E3%82%92%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AB%E5%AE%9F%E8%A3%85%E3%81%99%E3%82%8B%E3%81%AE%E3%81%AB%E5%BD%B9%E7%AB%8B%E3%81%A4%E3%83%89%E3%82%AD%E3%83%A5%E3%83%A1%E3%83%B3%E3%83%88%E3%80%81%E4%BE%8B%E3%80%81%E3%81%BE%E3%81%9F%E3%81%AF%E6%8C%87%E7%A4%BA%E3%81%8C%E3%81%82%E3%82%8C%E3%81%B0%E5%B9%B8%E3%81%84%E3%81%A7%E3%81%99%E3%80%82%E3%81%8A%E6%99%82%E9%96%93%E3%82%92%E5%89%B2%E3%81%84%E3%81%A6%E3%81%84%E3%81%9F%E3%81%A0%E3%81%8D%E3%80%81%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%81%94%E3%81%96%E3%81%84%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%E7%9A%86%E6%A7%98%E3%81%AE%E3%81%94%E5%9B%9E%E7%AD%94%E3%82%92%E3%81%8A%E5%BE%85%E3%81%A1%E3%81%97%E3%81%A6%E3%81%8A%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%23S32K%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2049512%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3AARM%E7%94%A8%E3%81%AES32%20Design%20Studio%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6S32K146%E7%94%A8%E3%81%AESRAM%E3%81%AB%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E9%85%8D%E7%BD%AE%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%AF%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2049512%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3EChandler_L%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E6%8C%87%E5%AE%9A%E3%81%97%E3%81%9FRAM%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9%E3%81%AB%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E9%85%8D%E7%BD%AE%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%82%92%E8%AA%AC%E6%98%8E%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%3C%2FP%3E%0A%3CP%3E%E3%81%9D%E3%81%AE%E4%BB%96%E3%81%AE%E6%A7%8B%E6%96%87%E3%83%AB%E3%83%BC%E3%83%AB%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6%E3%81%AF%E3%80%81Google%E3%81%A7%E6%A4%9C%E7%B4%A2%E3%81%97%E3%81%A6%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2047997%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3AARM%E7%94%A8%E3%81%AES32%20Design%20Studio%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6S32K146%E7%94%A8%E3%81%AESRAM%E3%81%AB%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E9%85%8D%E7%BD%AE%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%AF%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2047997%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%40%3CSPAN%3E%E3%83%A9%E3%82%A4%E3%83%93%E3%83%83%E3%82%B0%E3%83%98%E3%83%83%E3%83%89%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%E3%81%93%E3%81%A1%E3%82%89%E3%81%AE%E8%A8%98%E4%BA%8B%E3%82%92%E3%81%94%E5%8F%82%E7%85%A7%E3%81%84%E3%81%9F%E3%81%A0%E3%81%8D%E3%80%81%E7%89%B9%E5%AE%9A%E3%81%AE%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E3%81%AB%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E9%85%8D%E7%BD%AE%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AB%E3%80%8C%E5%B1%9E%E6%80%A7%E3%80%8D%E3%82%92%E5%88%A9%E7%94%A8%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-Design-Studio%2FHow-can-S32K-define-a-variable-in-a-specified-address%2Fm-p%2F731255%2Fhighlight%2Ftrue%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32-Design-Studio%2FHow-can-S32K-define-a-variable-in-a-specified-address%2Fm-p%2F731255%2Fhighlight%2Ftrue%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E