在CLA的任务中,想调用其他.c文件里的函数,看了ti论文之前的回答应该是可运行的
只需要保证把函数放置在RAMLSx区间
于是我设置了函数的存储区间如下:
#pragma CODE_SECTION(INV_ClosedLoop, "Cla1Prog");
void INV_ClosedLoop(void)
将其存储到CLA默认编译的段落Cla1Prog中
cmd文件中的分配如下:
Cla1Prog : LOAD = FLASH_APP, PAGE = 0, ALIGN(4)
RUN = RAMLS0, PAGE = 0
LOAD_START(_Cla1ProgLoadStart),
LOAD_SIZE(_Cla1ProgLoadSize),
LOAD_END(_Cla1ProgLoadEnd),
RUN_START(_Cla1ProgRunStart),
RUN_SIZE(_Cla1ProunSize),
RUN_END(_Cla1ProgRunEnd)
但编译后报错:#10295 output section "Cla1Prog" has both CLA and non-CLA sections; such mixing in the same output section is illegal; could not link section "Cla1Prog:inverter.obj"‘
不明白这个是怎么出现的?
对应的map如下:
Cla1Prog 0 0009ae9c 0000003a RUN ADDR = 0000809c
0009ae9c 0000002c clatask.obj (Cla1Prog:_Cla1Task1)
0009aec8 0000000e clatask.obj (Cla1Prog:_Cla1Task2)