how to write a function in particular memory location kDS2.0

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

how to write a function in particular memory location kDS2.0

2,012 次查看
sudhakarp
Contributor V

Hi,

     i want to write a function in particular memory location KDS 2.0 i am using MQX KSDK 1.1.0. so can you give example code for this.

thanks and regards,

sudhakar p

3 回复数

1,786 次查看
DavidS
NXP Employee
NXP Employee
0 项奖励
回复

1,787 次查看
sudhakarp
Contributor V

Hi David,

Flash start address was 410 I want to write address 500 is possible..? I tried with fa000 its working fine but when I try with 500 I am getting address over write errowhwhen I build. Same link I already gone through.

0 项奖励
回复

1,787 次查看
DavidS
NXP Employee
NXP Employee

Hi Sudhakar,

The 0x410 is actually where the flash configuration registers are located and you do not want to change them typcially.  Please review the RM Flash chapter to learn about the flash configuration fields.

Code typcially starts at 0x420 and is setup in the linker script.

You can make change to it as follows:

OLD:

   rom         (RX): ORIGIN = 0x00000420, LENGTH = 0x0007FBE0  # Code + Const data  

NEW:

   rom         (RX): ORIGIN = 0x00000500, LENGTH = 0x0007FA00  # Code + Const data  

With respect to the ability to write to 0xfa000 and not 0x500....I suspect that you already have code at 0x500 and not code or data at 0xfa000.  Please look at you *.map file to see what areas of flash are used by your application and what areas of flash are free.

Regards,

David