I don't have a clue. I paste the mem file and the lcf file here, actually, these two files are included in the fNET 2.7.5 source package, they should be fine. And it works well if I use Multillink, but if I want to use Jlink, I have to deselect the option "uninitialized data" as I have mentioned above. I really want to find out the root cause for this issue to avoid potential risk for my project.
MK60FN1M0.mem:
______________________________________________________________________________
// Memory Configuration File
//
// Description:
// A memory configuration file contains commands that define the legally accessible
// areas of memory for your specific board. Useful for example when the debugger
// tries to display the content of a "char *" variable, that has not yet been initialized.
// In this case the debugger may try to read from a bogus address, which could cause a
// bus error.
//
// Board:
// Kinetis K60FN1M0
//
// Reference:
// -
// All reserved ranges read back 0xBABA...
reservedchar 0xBA
usederivative "MK60F15"
// Memory Map:
// ----------------------------------------------------------------------
range 0x00000000 0x000FFFFF 4 ReadWrite // 1024KB Code Flash
reserved 0x00100000 0x13FFFFFF
range 0x14000000 0x14003FFF 4 ReadWrite // 16KB Programming accelleration RAM
reserved 0x14004000 0x1FFEFFFF
range 0x1FFF0000 0x1FFFFFFF 4 ReadWrite // 64KB On chip SRAM (TCML)
range 0x20000000 0x2000FFFF 4 ReadWrite // 64KB On chip SRAM (TCMU)
reserved 0x20010000 0x21FFFFFF
range 0x22000000 0x221FFFFF 4 ReadWrite // Aliased to TCMU SRAM bitband
reserved 0x22200000 0x3FFFFFFF
reserved 0x60000000 0xDFFFFFFF // Flexbus for external memory
reserved 0xE0100000 0xFFFFFFFF
______________________________________________________________________________
And here is the MK60FN1M0_flash.lcf I use:
______________________________________________________________________________
# Default linker command file.
MEMORY {
fnet_bootloader (RX) : ORIGIN = 0x00000000, LENGTH = 0x0000C000 # 48KB reserved for FNET bootloader
m_interrupts (RX) : ORIGIN = 0x0000C000, LENGTH = 0x00000410
m_text (RX) : ORIGIN = 0x0000C410, LENGTH = 0x000E3BF0 #0x00100000-0x410 /*Ints*/-0x1000/*Params*/-0xC000/*Boot*/
fapp_paramsrom (RW) : ORIGIN = 0x000FF000, LENGTH = 0x00001000 # 4KBytes = Last logical-block resevrd for params.
vectorram (RWX) : ORIGIN = 0x1FFF0000, LENGTH = 0x00000410 #
m_data (RWX) : ORIGIN = 0x1FFF0410, LENGTH = 0x0001EBF0 #0x00020000-0x00000410-0x00001000/*Stack*/
}
KEEP_SECTION { .vectortable }
KEEP_SECTION { .fapp_params }
SECTIONS {
.vectorram : {} > vectorram
.interrupts :
{
__vector_table = .;
* (.vectortable)
. = ALIGN (0x10);
} > m_interrupts
.app_text:
{
ALIGNALL(10);
* (.init)
* (.text)
.= ALIGN(0x10) ;
* (.rodata)
.= ALIGN(0x10) ;
___ROM_AT = .;
} > m_text
.app_data: AT(___ROM_AT)
{
*(.FNET_RAM) #Flash driver "in ram" function.
* (.sdata)
* (.data)
.= ALIGN(0x10) ;
*(.ARM.extab)
.= ALIGN(0x10) ;
__exception_table_start__ = .;
EXCEPTION
__exception_table_end__ = .;
.= ALIGN(0x10) ;
__sinit__ = .;
STATICINIT
.= ALIGN(0x10) ;
} > m_data
.bss :
{
.= ALIGN(0x10) ;
__START_BSS = .;
* (.bss)
__END_BSS = .;
.= ALIGN(0x10) ;
} >> m_data
_romp_at = ___ROM_AT + SIZEOF(.app_data);
.romp : AT(_romp_at)
{
__S_romp = _romp_at;
WRITEW(___ROM_AT);
WRITEW(ADDR(.app_data));
WRITEW(SIZEOF(.app_data));
WRITEW(0);
WRITEW(0);
WRITEW(0);
}
__SP_INIT = . + 0x00001000;
__heap_addr = __SP_INIT;
__heap_size = 0x00000000;
# ====== Definitions used by FNET Application. =======
.params :
{
*(.fapp_params)
} > fapp_paramsrom
__VECTOR_RAM = ADDR(.vectorram);
}
______________________________________________________________________________