Hi all,
I am using C2000 C/C++ CODE GENERATION TOOLS 5.2.1 with TMS320F28x DSP family and have been struggling for weeks in trying to understand the reason of a very strange behaviour.
Basically, after recent investigations I am convinced it is a compiler bug.
The bug may be described as follows: C-code generates assembly instructions (like IMPYL P,XT,XAR6) which use the P register; the most of the times compiler inserts an SPM #0 just before calling them but I noticed that at least in one case it doesn't, resulting in unpredictable results.
The funny thing is that if I force an asm(" NOP"); in my C code, compiler adds an SPM #0 also in this case (and magically everything works fine)!!!
Attached a python file including compiler flags.
I mix C-code with assembly routines. Some of the C-files get automatically generated by MATLAB (so a quite complex scenario)... But, I repeat, just a NOP seems to fix all our problems. It sounds like a compiler bug to me. Is there any patches?
It is a urgent matter as our production has stopped waiting for a fix.
Could anyone please help me out?
Many thanks in advance.
Paolo Benini