I'm really puzzled about the problem.I really think I've done right but still it can't work under flash mode.So I beg you check other possible reason for me,like the IDE.
I'm using CW10.3,k10,and I've modified my code like this:
#pragma define_section relocate_code ".data2" ".data2" ".data2" far_abs RX
#pragma section relocate_code begin
void set_sys_dividers(uint32 outdiv1, uint32 outdiv2, uint32 outdiv3, uint32 outdiv4)
temp_reg = FMC_PFAPR;
#pragma section relocate_code end
I didn't modify the default linker command file.There's 3 warnings saying that:" ignoring #pragma define_section" before every "#pragma".then I check the map file to find that the function of set_sys_dividers() still locates in the .text. Then the program can't execute.
The linker file is attached to approve that the section of .data2 was used right.Besides I didn't add a function of copy_to_ram to the source file since there's a default function in the romcopy.c.I think there's no problem of it.
Original Attachment has been moved to: MK10DX128_flash.ld.zip