This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I have a large algorithm running in one of my CLA Tasks and I am running into some memory shortage issues.
I would be able to optimize a lot if i could call functions from within the CLA Task.
Is this possible ?Can someone please point me to an example code if possible?
Thanks,
Mathew
Mathew J Manavalan said:Is this possible ?Can someone please point me to an example code if possible?
Yes, functions can be called in tasks. The examples in the CLAMath library do exactly this. Did you try it and encountered an issue?
C:\ti\c2000\C2000Ware<version>\libraries\math\CLAmath\c28\examples
-Lori
PS: you may find the CLA Software Development Guide helpful: https://software-dl.ti.com/C2000/docs/cla_software_dev_guide/index.html
Thanks for the response Lori.
I did have some issues with it. Are there any specific limitations when using functions ? On the parameters and the return types ?
Mathew,
The compiler implementation and limitations are documented in the C2000 Compiler Guide. http://www.ti.com/lit/spru514 Refer to the CLA compiler chapter.
If you can provide information on what went wrong perhaps I can help determine what the issue was or suggest where to look. Which version of the compiler are you using? Did the code compile, but the result was incorrect? Did the compiler issue an error or warning? etc...
Regards
Lori
Hello Lori,
Sorry for the delay in response. We were facing some hardware issues.
I tried to build my code with a function call within a CLA Task, but when building i get the following warning :
"../xxx.cla", line 251: warning #17003-D: relocation from function "Cla1Task7" to symbol "_u16FunctionTestValue" overflowed; the 17-bit relocated address 0x13b85 is too large to encode in the 16-bit unsigned field (type = 'R_ABS16_OC' (107), file = "./xxx.obj", offset = 0x0000002e, section = "Cla1Prog:_Cla1Task7")
I am note sure what to make of it.
Thanks,
Mathew
Matthew,
Address 0x13b85 is not accessible by the CLA. Refer to the C28x Memory Map in the device's data sheet. One of the columns in the table has the title "CLA access". These are the blocks the CLA can access (LS RAM blocks + CLA message RAM). The issue seems to be however the variable u16FunctionTestValue was allocated in the linker command file.
Best Regards
Lori