1.我在 .icf 中为 myTest 创建了一个自定义部分
define symbol __ICFEDIT_region_TEST_start__ = (0x10080000);
define symbol __ICFEDIT_region_TEST_end__ = (0x100DFFFF);
define region TEST_region = mem:[from __ICFEDIT_region_TEST_start__ to __ICFEDIT_region_TEST_end__];
place at start of TEST_region {section .test_cases_entries};
2.我在test.c中编写了一些测试代码
#pragma section = ".test_cases_entries"
void pfm_test_cases_init(void)
{
struct pwb_altest_desc *start,*stop;
start = __section_begin(".test_cases_entries");
stop = __section_end(".test_cases_entries");
printf("test section start = %x \n\r",start);
printf("test section end = %x \n\r",stop);
}
- 结果响应
test section start = 0
test section end = 0
- 预期结果:0x10080000 部分的开始?0x100DFFFF 部分结束?