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
Im using Code Generation Tools V5.2.12 (and I also tried V6.1.1).
Code generated is for a TMS320C28346 DSP, fpu32 float_support is enabled in compiler options.
When using the intrinsic "__f32toi16r" I get an internal compiler error as shown below:
===========================================================
'Building file: ../controller.c'
'Invoking: C2000 Compiler'
"C:/Programme/Texas Instruments/C2000 Code Generation Tools 5.2.12/bin/cl2000" --silicon_version=28 -O3 --define=LARGE_MODEL --include_path="C:/Software/CTR V4.20/Include" --include_path="C:/Programme/Texas Instruments/C2000 Code Generation Tools 5.2.12/include" --display_error_number --issue_remarks --large_memory_model --unified_memory --disable_dp_load_opt --float_support=fpu32 --rpt_threshold=64 -k --preproc_with_compile --preproc_dependency="controller.pp" "../controller.c"
>> ..\controller.h, line 168: INTERNAL ERROR: Illegal use of intrinsic: __f32toi16r
This may be a serious problem. Please contact customer support with a
description of this problem and a sample of the source files that caused this
INTERNAL ERROR message to appear.
Cannot continue compilation - ABORTING!
>> Compilation failure
gmake: *** [controller.obj] Error 1
===========================================================
The Code where I'm using the intrinsic looks like:
inline int MultiplyAndRoundToInt(float a, float b)
{
float temp = a * b;
return __f32toi16r(temp);
}
Is this a compiler bug?
Best regards
Markus
Markus,
It looks like the internal error is coming from controller.h. Simply compiling those C source lines does not generate the error for me.
Could you attach a preprocessed version of controller.c so we have everything needed to reproduce the error?
This page describes how you can generate a preprocessed version of the source file:
http://processors.wiki.ti.com/index.php/Preprocess_Complex_Source_Code_for_Bug_Submissions
Just curious, does changing a,b and temp from float to double make the error go away?
Hi
Changeing the datatype from float to double makes not difference.
For convenience I have attached a very small Test-Project where the error occurrs.
Can you reproduce the error?
Markus
P.S. I'm out of office next week, so I cannot reply to any posts.
Thank you very much for the test case with which I was able to reproduce the internal error. As mentioned by Archaeologist he already submitted a bug report and the issue is being tracked in bug SDSCM00047070. You may track the status of the bug using the SDOWP link in my signature.
Hi Mack,
I have the same error with C2000 compiler 6.1.1.
I have checked for updates, but no C2000 compiler update was found. Please, comment.
Sasha
The fix will be in the C2000 6.1.4 release which is scheduled for May 28th.
-Mack
Hi
I have a rather big project where I would prefer to stay at Code Generatoon Tools V5.x.y (actual V5.2.12) instead of changeing to V6.x.y as this would result in a huge testing procedure. So, if it would be possible to include the fix in Code Generation Tools V5.2.13 I would be very happy :-)
Is this possible?
Markus
We do not have any plans to release the next 5.2.x release (5.2.16). The 5.2.15 was released less than a week ago. It does not contain the bug fix. If you need the fix, the best option would be to upgrade to 6.1.4 when it is released later this month.
-Mack
I will check if this could be an option for me.
Thanks anyway for including the fix in the next V6.x.y release.