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.
Tool/software:
Dear TI experts,
I hope you can assist me with an issue I've been struggling with for two months. I am eager to find a solution. Here are the details:
Following up on my previous inquiry posted here: https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1350857/tms320f28388d-the-use-of-cla-math-lib, I've encountered an issue with the CMD file when using the CLA math function on the 28388D.
All calculations are correct with the "f2838x_cla_c_lnk.cmd" file:
However, when I switch to "2838x_RAM_CLA_lnkcpu1", there are no compile errors and warnings, but the calculations performed by the CLA yield results that are consistently zero, which is wrong.
Note: Why do I need to change this cmd file? Because "f2838x_cla_c_lnk.cmd" does not produce results in CPU2 (always zero), yet I require the CLA function to operate on CPU2. My initial plan was to switch to "2838x_RAM_CLA_lnkcpu1", and if successful, further switch to "2838x_RAM_CLA_lnkcpu2" to enable CLA functionality in CPU2. If you could advise on how to directly modify "f2838x_cla_c_lnk.cmd" to function correctly in CPU2, it would be greatly appreciated.
To simplify the verification process of that f2838x_cla_c_lnk.cmd" does not produce results in CPU2 (always zero), I ran a simple multiplier code on CPU2.
When I run this code using F2838x_RAM_Cla_lnk_cpu1, both vg and vg^2 display correctly in the expression table.
However, when I run the code using f2838x_cla_c_lnk.cmd, both vg and vg^2 show as 0 in the expression table.
Here is the one-drive link to the CCS project:
Even if I relocate .bss in f2838x_cla_c_lnk from <RAMGS0_1, PAGE = 0> to <RAMLS7, PAGE = 1>, the results remain the same.
Best regards,
Eric
Part Number: TMS320F28388D
Tool/software:
Dear TI experts,
Following up on my previous inquiry posted here: https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1350857/tms320f28388d-the-use-of-cla-math-lib, I've encountered an issue with the CMD file when using the CLA math function on the 28388D.
All calculations are correct with the "f2838x_cla_c_lnk.cmd" file:
However, when I switch to "2838x_RAM_CLA_lnkcpu1", there are no compile errors, but the calculations performed by the CLA yield results that are consistently zero, which is wrong.
Note: Why do I need to change this cmd file? Because "f2838x_cla_c_lnk.cmd" does not produce results in CPU2 (always zero), yet I require the CLA function to operate on CPU2. My initial plan was to switch to "2838x_RAM_CLA_lnkcpu1", and if successful, further switch to "2838x_RAM_CLA_lnkcpu2" to enable CLA functionality in CPU2. If you could advise on how to directly modify "f2838x_cla_c_lnk.cmd" to function correctly in CPU2, it would be greatly appreciated.
Best regards,
Eric
Eric,
Please give me a day to understand the differences between these 2 linker files and get back to you.
Eric,
F2838x_Flash_Cla_lnk_cpu1.cmd and F2838x_Flash_Cla_lnk_cpu2.cmd are identical.
F2838x_RAM_Cla_lnk_cpu1.cmd and F2838x_RAM_Cla_lnk_cpu2.cmd have unimportant differences, except the former defines Cla1DataRam and the latter doesn't. That's a memory region that's #pragma defined in some examples.
The above is intuitively right since both CPU1 and CPU2 subsystems have the same memory map (except for some minor differences e.g. USB RAM is available only on CPU1).
f2838x_cla_c_lnk.cmd and F2838x_RAM_Cla_lnk_cpu1.cmd differences are expected since the former was created specifically for CLAMath library examples and is unrelated to the more generic cmd file.
If your example is working on the former and not on the latter, it probably could be because of some memory section or directive that's defined and used in the former case but missing in the latter case.
You said it compiles without errors - what about any warnings?
Thanks,
Sira
Dear Sira,
Thank you for your response. I did not receive any warnings, which has left me quite puzzled. To simplify the verification process, I ran a simple multiplier code on CPU2.
When I run this code using F2838x_RAM_Cla_lnk_cpu1, both vg and vg^2 display correctly in the expression table.
However, when I run the code using f2838x_cla_c_lnk.cmd, both vg and vg^2 show as 0 in the expression table.
I am eagerly hoping you can help me resolve this issue, as I am currently at a loss on how to proceed.
Best regards,
Eric
Eric,
.bss is assigned to RAMGS0_1 in f2838x_cla_c_lnk.cmd whereas it's assigned to RAMLS4 IN 2838x_RAM_CLA_lnk_cpu1.
This is why vg and vg2 are allocated to different memory sections depending on the cmd used.
RAMGS is shared between CPU1 and CPU2, RAMLS is shared between CPUx and its CLA.
I don't understand why allocating it to .bss does not work on CPU2.
Anyway, as a start, could you change the allocation of .bss in f2838x_cla_c_lnk.cmd to a RAMLS region and check the behavior?
Hi Sira,
I have relocated .bss from <RAMGS0_1, PAGE = 0> to <RAMLS7, PAGE = 1>, as shown below:
However, the results are the same as before: CPU1 works well, but CPU2 does not.
Additionally, could you try making the code modifications on your side? Since online communication may take you a lot of time and the code itself is very simple. If it’s inconvenient for you, we can continue troubleshooting this way to solve the issue.
Thanks,
Eric
Here is the one-drive link to the CCS project:
Hope it will help you troubleshoot this issue.
Eric
Eric,
I am actually switching between working and being on vacation, and am currently out of office for the next 2 weeks. This is why I don't have a functional hardware setup. I will try to find another person to assist you on this issue.
Thanks,
Sira
Hi Sira,
Thank you! I highly appreciate your efforts in finding someone to help me with this problem, as I have been stuck on it for a long time.
Have a good vacation!
Eric
Hi Eric,
I can take over the issue from here, let me look into this and I will get back to you. Thank you for your patience.
Best Regards,
Delaney
Hi Eric,
I am still looking into this issue but will get back to you as soon as I have a response.
Best Regards,
Delaney
Hi Eric,
I am still looking into this but should have a response back tomorrow or early next week.
Best Regards,
Delaney
Hi Eric,
I apologize for the delay.
From my understanding, you are trying to call CLA math functions from the CPU2 CLA core, is that correct? Just to verify, you are connecting to and loading a program to CPU1 first before connecting and loading onto CPU2 right? CPU1 must always be started up first because it has to boot up CPU2. If you try running one of the IPC examples (for example ipc_ex1_basic_c28x1), do you see proper code functionality?
I believe it would be easier to get the IPC example working first, then replace the linker cmd file used for the CPU2 program with its CLA version, add your .cla file, and include CLA configurations in the c28x C code of the CPU2 program after that.
Best Regards,
Delaney
Dear Delaney,
Thank you very much for your response.
As mentioned in the post, to simplify the problem, I have converted it into a single CPU task and tested it exclusively on CPU2. These are the results I mentioned earlier:
"
Thank you for your response. I did not receive any warnings, which has left me quite puzzled. To simplify the verification process, I ran a simple multiplier code on CPU2.
When I run this code using F2838x_RAM_Cla_lnk_cpu1, both vg and vg^2 display correctly in the expression table.
However, when I run the code using f2838x_cla_c_lnk.cmd, both vg and vg^2 show as 0 in the expression table.
"
Here is the project file:
Best regards,
Eric
Hi Eric,
As mentioned in the post, to simplify the problem, I have converted it into a single CPU task and tested it exclusively on CPU2.
Let me know if I am misunderstanding, but are you not loading/running anything onto CPU1 then? Because if not, nothing can be run on CPU2. CPU1 is the primary CPU and must be started up first to run the configuration code for CPU2. Connecting, loading and running on CPU2 exclusively will not work.
Best Regards,
Delaney
Oh, that's strange because I did get results on the sole CPU2. Anyway, thank you very much, Delaney! I have found a proper cmd file to fix it, although I still don't know how to change the previous cmd file. Thank you for your effort. You can close this thread.
Best regards,
Eric