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.
Hi,
I am budiling a project with a launchpad version o fF280049C. The C28 codes and CLA codes runs well but after putting an inlcude for CLAmath.h in the .cla and/or a special .h file. I get alot of strange warnings. A snapshot is below:
I have carefully read the CLA_MATH_LIB_UG.pdf document and followed all the instruction but the problem persist. I have also checked the configuration of the code and it looks okay.
The needed library (cla2_math_library_fpu32_eabi.lib) has been added to the code.
Please what can be the problem and how do I go about solving it.
Thanks
and/or a special .h file.
This looks like a syntax error somewhere in the file - it is possible it occurs before the #include of the CLAmath.h (possibly within this special .h file?).
Hi Lori,
Thanks for the reply.
The code runs well when i do not incldue the CLAMath.h file. But throws up these errors when I want to use the CLAMath.h file in a .h file. The CLAMath is needed to do a sin calculation and the function would be called from the CLA task.
Also when I include the CLAMath.h file in the .cla file, I get the errors.
Thanks
Hi,
More information to the issue.
When I click on one of the error messages, I land in a "restricted" area of the CLAmath.h include file.
A snapshot is below:
What can be the reason for this.
Thanks
The CLA sin example project for this device does not throw an error. I still suspect a syntax error somewhere outside of the .h file. Missing ) perhaps. This is based on my previous experience.
I land in a "restricted" area of the CLAmath.h include file
I'm not sure - In the screenshot I only see line 290ish in a .cla file?
Hello,
Thank you fo your reply.
I am taking the screen shoot again. It is below:
I am enclosing a copy of the .h file that uses the CLAmath.h so you could see it
My .cla file is also included as a text file
/** * @File: cont_charg_dc2dc.cla * @Brief: cont_charg_dc2dc.cla * @Created on: May 6, 2021 * @Author: pds ltd * @Project: * @Module Description: */ /**< project based include files */ #include "cont_charg_dc2dc_c.h" #include "cont_cla.h" #include "cont_pfc_c_2.h" #include "cont_inv_dc2ac_c_2.h" /** * @brief CLA task 1 for dc2dc of the charging circuit * @param void * @retval None * @details */ interrupt void Cla1Task1 (void) { if (s_dc2ac_cont_var.inv_dc2ac_enabled == 1) { CLATask1DC2ACCalculation(); } // __mdebugstop(); } /** * @brief CLA task 2 for sin factor a * @param void * @retval None * @details calls the sine factor calcuation and ccl calculation * loop runs at 50kh */ interrupt void Cla1Task2(void) { __mdebugstop(); CLATask2FunctionAVC(); CLATask2FunctionCCL(); } /** * @brief CLA task 3 for the ccl control computation * @param void * @retval None * @brief calls the pfc sin factor calculation at 100khz */ interrupt void Cla1Task3(void) { } /** * @brief * @param void * @retval None * @details */ interrupt void Cla1Task4(void) { } /** * @brief * @param void * @retval None * @details */ interrupt void Cla1Task5 (void) { } /** * @brief CLA task 8 that runs endless background task * @param void * @retval None * @details doing ?? */ interrupt void Cla1Task8(void) { __mdebugstop(); } /** * @brief control law task 4 for * @param void * @retval None * @details */ interrupt void Cla1Task1ISR (void) { } /** * @brief control law task 4 for * @param void * @retval None * @details */ interrupt void Cla1Task8ISR (void) { // Convert result to signed 16-bit and store }
Thanks
I have checked my build settings again and compared it with the snapshoot you sent.
I observed that the exampleused a CLA0 type however, the F280049C launchpad has a CLA2 type. I also ensured that the various libraries correspond with the CLA2 type. Can this be the fault? Thanks
Above corrected. I just ran the code with a CLA2 type for the F280049C
Looks like I accidently compiled for another device. As you noted it doesn't impact the example.
Is this a shared header file between the c28x and the CLA? If so can you try putting it in a dedicated header file (to the CLA) or in the .cla file itself.
I've noticed if I put these two into the shared .h file I do get some errors manifesting from lin.h...
But if I put them in the .cla file the errors go away
Hi Lori,
Thanks for your reply.
I tried the suggestions but the problem still persisted.
However, I got a work around which for me is strange and I would like to verify why.
In my .cla file which i enclosed in the thread, the file #include "cont_pfc_c_2.h" contains inline function that is called by the .cla file. When i completely removed this, the build works. This is strange. Is there a reason for this.
Or what can I do about this as this would need me to do substaintial changes in my code.
Thanks
Unfortunately I don't have enough information to figure out what the issue might be. You can try inspecting the output of the pre-processor by building with the option:
These are documented in www.ti.com/lit/spru514
-Lori
Hello Lori,
Thanks for the replies and sorry I have not updated you. I was able to finally solve the problem. The include now works. The solution was not very obvious and was abit strange for me. I had to add the #include "CLAmath.h" to a second .h file that was in the .cla file. Then the build was successful. However the CLAmath is not working as expected and I have opened a new issue on this. The link is below:
Thanks