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