Hi
I am trying to offset the startup application program to 0x1000 for KL27 (64K flash) freedom board.
Using KDS and SDK V1.3 processor expert.
The application program work good and well when I use debugging mode in KDS.
However, after POR or reset the application program is not running.
I have checked the flash memory of 0x1000 onward and it is filled with the application program code.
The 16 bytes of 0x400-0x40F are also correct.
The address at 0x140D = 0x3D data.
From the link below, I found out that CPU reset the Stack pointer is loaded from the address 0x0000_0000 and the Program Counter is loaded from the address 0x0000_0004.
Relocate memery on KDS3.0
How can i initialize the stack pointer and program counter in KDS using SDK V1.3 when i relocate the memory to start @ 0x1000 address?
Thanks.
/////////////////////////////////////////////////////////////////////////////////////////////////////////
- ProcessorExpert.Id files
MEMORY {
m_interrupts (RX) : ORIGIN = 0x00001000, LENGTH = 0x00000200
m_flash_config (RX) : ORIGIN = 0x00001400, LENGTH = 0x00000010
m_interrupts_ram (RW) : ORIGIN = 0x1FFFF000, LENGTH = 0x00000200
m_text (RX) : ORIGIN = 0x00001410, LENGTH = 0x0000EBF0
m_data (RW) : ORIGIN = 0x1FFFF200, LENGTH = 0x00003E00
}
////////////////////////////////////////////////////////////////////////////////////////////////
Startup_MKL27Z644.S file.
/* Flash Configuration */
.section .FlashConfig, "a"
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFFFFFF
.long 0xFFFF3DFE
//////////////////////////////////////////////////////////////////////////////////////////////////////
Original Attachment has been moved to: Test.zip