解決済! 解決策の投稿を見る。
Hi@LaiBighead
Please refero to this post, you can use "attribute" to place data to specific address.
Hi@LaiBighead
Please refero to this post, you can use "attribute" to place data to specific address.
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?
Hi@Chandler_L
I have told you how to put data in a specified RAM space.
For more syntax rules, please Google it.