链接文件中的定义:
group (ordered, contiguous, align = 4, attributes=rw, run_addr = 0x70005000)//mem:dsram0){select ".data.user_test_data";select "(.data|.data*)";//select "(.bss|.bss*)"; //select ".bss.user_test_bss";}group (ordered, contiguous, align = 4, attributes=rw, run_addr = 0x7000A000)//mem:dsram0){select ".bss.user_test_bss"; select "(.bss|.bss*)";//select "(.data|.data*)";//select ".data.user_test_data";}
变量的定义:
#pragma section fardata "user_test_data"
uint32 dfdemo_1 = 66u;
//uint32 dfdemo_2 = 5u;
#pragma section fardata restore#pragma section farbss "user_test_bss"
//uint32 dfdemo_1;
uint32 dfdemo_2;
#pragma section farbss restore
MAP文件显示: