Other Parts Discussed in Thread: C2000WARE
I am working on a power project and want to use the CLA for some parralell control computation, but the linking of the file to initialise the CLA is nor successful. During linking I get this error:-
Description Resource Path Location Type
unresolved symbol Cla1Task1(), first referenced in ./control/con_cla.obj pro_c C/C++ Problem
I presume it has to do with the linker file and some CLA configuration problem. I have not been able to find the problem. Sections of the code is below:
Configuration of my CLA
my con_cla.c file is below
void InitCla(void)
{
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLA1);
#ifdef _FLASH
//--- Copy the CLA program code from its load address to the CLA program
//--- memory (using memcpy() from RTS library).
memcpy(&Cla1ProgRunStart, &Cla1ProgLoadStart, (uint32_t)&Cla1ProgLoadSize);
#endif
/**< Shared between the CPU and the CLA */
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS2, MEMCFG_LSRAMMASTER_CPU_CLA1);
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS3, MEMCFG_LSRAMMASTER_CPU_CLA1);
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS4, MEMCFG_LSRAMMASTER_CPU_CLA1);
MemCfg_setLSRAMMasterSel(MEMCFG_SECT_LS5, MEMCFG_LSRAMMASTER_CPU_CLA1);
/**< Memory configuration for CLA data or CLA programme memory */
MemCfg_setCLAMemType(MEMCFG_SECT_LS2, MEMCFG_CLA_MEM_PROGRAM);
MemCfg_setCLAMemType(MEMCFG_SECT_LS3, MEMCFG_CLA_MEM_PROGRAM);
MemCfg_setCLAMemType(MEMCFG_SECT_LS4, MEMCFG_CLA_MEM_DATA);
MemCfg_setCLAMemType(MEMCFG_SECT_LS5, MEMCFG_CLA_MEM_DATA);
#pragma diag_suppress=770
CLA_mapTaskVector(CLA1_BASE, CLA_MVECT_1, (uint16_t)&Cla1Task1);
CLA_mapTaskVector(CLA1_BASE, CLA_MVECT_2, (uint16_t)&Cla1Task2);
CLA_mapTaskVector(CLA1_BASE, CLA_MVECT_3, (uint16_t)&Cla1Task3);
CLA_mapTaskVector(CLA1_BASE, CLA_MVECT_4, (uint16_t)&Cla1Task4);
CLA_mapTaskVector(CLA1_BASE, CLA_MVECT_5, (uint16_t)&Cla1Task5);
CLA_mapTaskVector(CLA1_BASE, CLA_MVECT_6, (uint16_t)&Cla1Task6);
CLA_mapTaskVector(CLA1_BASE, CLA_MVECT_7, (uint16_t)&Cla1Task7);
CLA_mapBackgroundTaskVector(CLA1_BASE, (uint16_t)&Cla1Task8);
#pragma diag_warning=770
/**< Map interrupt routines to interrupts */
Interrupt_register(INT_CLA1_1, &Cla1Task1ISR);
Interrupt_register(INT_CLA1_1, &Cla1Task2ISR);
Interrupt_register(INT_CLA1_1, &Cla1Task3ISR);
Interrupt_register(INT_CLA1_1, &Cla1Task4ISR);
Interrupt_register(INT_CLA1_1, &Cla1Task5ISR);
Interrupt_register(INT_CLA1_1, &Cla1Task6ISR);
Interrupt_register(INT_CLA1_1, &Cla1Task7ISR);
/**< select interrupt source */
CLA_setTriggerSource(CLA_TASK_1, CLA_TRIGGER_SOFTWARE);
CLA_setTriggerSource(CLA_TASK_2, CLA_TRIGGER_SOFTWARE);
CLA_setTriggerSource(CLA_TASK_3, CLA_TRIGGER_SOFTWARE);
CLA_setTriggerSource(CLA_TASK_4, CLA_TRIGGER_SOFTWARE);
CLA_setTriggerSource(CLA_TASK_5, CLA_TRIGGER_SOFTWARE);
CLA_setTriggerSource(CLA_TASK_6, CLA_TRIGGER_SOFTWARE);
CLA_setTriggerSource(CLA_TASK_7, CLA_TRIGGER_SOFTWARE);
CLA_setTriggerSource(CLA_TASK_8, CLA_TRIGGER_SOFTWARE);
/**< Disable background task */
CLA_disableBackgroundTask(CLA1_BASE);
/**< enable background task */
CLA_enableBackgroundTask(CLA1_BASE);
/**< Enable use of software to start a task */
CLA_enableIACK(CLA1_BASE);
/**< start background task */
CLA_startBackgroundTask(CLA1_BASE);
/**< Enable CLA task interrupts */
CLA_enableTasks(CLA1_BASE, CLA_TASKFLAG_1);
CLA_enableTasks(CLA1_BASE, CLA_TASKFLAG_2);
CLA_enableTasks(CLA1_BASE, CLA_TASKFLAG_3);
CLA_enableTasks(CLA1_BASE, CLA_TASKFLAG_4);
CLA_enableTasks(CLA1_BASE, CLA_TASKFLAG_5);
CLA_enableTasks(CLA1_BASE, CLA_TASKFLAG_6);
CLA_enableTasks(CLA1_BASE, CLA_TASKFLAG_7);
Interrupt_enable(INT_CLA1_1);
Interrupt_enable(INT_CLA1_2);
Interrupt_enable(INT_CLA1_3);
Interrupt_enable(INT_CLA1_4);
}
Secion of my linker command file is below:
/*** User Defined Sections ***/
dclfuncs : > RAMLS4, PAGE = 1 /* Link dcl functions to RAM */
dmaMemBufs : > RAMGS3, PAGE = 1 /* Link to DMA accessible memory */
Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, PAGE = 1 /* Link to CLA Message RAM */
CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, PAGE = 1 /* Link to CLA Message RAM */
//dclfuncs : > RAMLS4, PAGE = 1 /* Link dcl functions to RAM */
Cla1Data1 : > RAMLS4, PAGE = 1 /* Link to CLA Data RAM */
Cla1Data2 : > RAMLS5, PAGE = 1 /* Link to CLA Data RAM */
/* Section Cla1Prog used by file Cla.c */
Cla1Prog : LOAD = FLASH_BANK0_SEC12, /* Load to flash, run from CLA Program RAM */
RUN = RAMLS2 | RAMLS3,
LOAD_START(_Cla1ProgLoadStart),
//LOAD_END(_Cla1ProgLoadEnd),
RUN_START(_Cla1ProgRunStart),
LOAD_SIZE(_Cla1ProgLoadSize),
PAGE = 0, ALIGN(4)
The linker command file is configured to run the codes from the flash memory
in my .map file the CLA functions are all undefined
n/a UNDEFED _Cla1Task1ISR__Fv
n/a UNDEFED _Cla1Task1__Fv
n/a UNDEFED _Cla1Task2ISR__Fv
n/a UNDEFED _Cla1Task2__Fv
n/a UNDEFED _Cla1Task3ISR__Fv
n/a UNDEFED _Cla1Task3__Fv
n/a UNDEFED _Cla1Task4ISR__Fv
n/a UNDEFED _Cla1Task4__Fv
The defination of my CLA task is below
extern interrupt void Cla1Task1();
interrupt void Cla1Task1 (void)
{
// Convert result to signed 16-bit and store
cla_triggers[cla_task1_dc2dc_] = 0;
__asm(" ESTOP0");
}
Please what can the problem be or what have I fogotten to configure?