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
Hi Sudhakar,
Please review: Relocating Code and Data Using the KDS GCC Linker File for Kinetis
Regards,
David
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.
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