I understand now,you are very great,I can init it by myself now, thank you very much!
but i also have a problem,IAR still remind me to use __iar_data_init3,how to avoid it?
this is my code and linke file:
void init_m4_scst_test_shell_data(void)
{
uint8_t * m4_scst_test_shell_data_dest;
uint8_t * m4_scst_test_shell_data_src;
uint8_t * m4_scst_test_shell_data_src_end;
#pragma section = ".m4_scst_test_shell_data"
#pragma section = ".m4_scst_test_shell_data_init"
m4_scst_test_shell_data_dest = __section_begin(".m4_scst_test_shell_data");
m4_scst_test_shell_data_src=__section_begin(".m4_scst_test_shell_data_init");
m4_scst_test_shell_data_src_end = __section_end(".m4_scst_test_shell_data_init");
while (m4_scst_test_shell_data_src_end != m4_scst_test_shell_data_src)
{
*m4_scst_test_shell_data_dest = *m4_scst_test_shell_data_src;
m4_scst_test_shell_data_dest++;
m4_scst_test_shell_data_src++;
}
}
initialize manually
{
section .customerBootData,
section .m4_scst_ram_data,
section .m4_scst_ram_data_target0,
section .m4_scst_ram_data_target1,
section .m4_scst_ram_test_code,
section .m4_scst_test_shell_data,
};
if i set the section do not initialize
it also create a warning:1468 out of 1468 bytes from data record CODE:[0x1FFF8400,0x1FFF89BB] will not be flashed