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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

686 Views
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 Replies

460 Views
DavidS
NXP Employee
NXP Employee
0 Kudos

461 Views
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 Kudos

461 Views
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