Other Parts Discussed in Thread: HALCOGEN
Tool/software: TI C/C++ Compiler
Hi
HalcoGen 04.07.00 creates:
HL_het.c, which includes std_nhet.h without prior setting HET_V2
Result: default setting HET_V2 = 0 from std_nhet.h
HETASM / hetp.exe creates
xxx.c, which includes std_nhet.h without prior setting HET_V2 and without including xxx.h
and
xxx.h which includes std_nhet.h with prior setting HET_V2
Result: intended setting HET_V2 = 1 if xxx.h is included before std_nhet.h
Files including xxx.h and std_nhet.h will compile with HET_V2 = 1 (correct),
but files including std_nhet.h without including xxx.h before std_nhet.h will compile with HET_V2 = 0 (wrong).
Lint detects:
Warning 547: Redefinition of symbol 'HET_v2' conflicts with ....
Error 18: Symbol 'br_format::branch_condition' redeclared (precision)
Error 114: Inconsistent structure declaration for tag 'br_format'
Error 38: Offset of symbol 'br_format::10006' inconsistent
The TI compiler ti-cgt-arm_16.9.3.LTS detects the problem only, if all built in MISRA C2 2004 checks are disabled!?!?!?
We can’t easily change the compiler because it was verified by an external company. (restriction don’t use built in MISRA checker)
#48 incompatible redefinition of macro "HET_v2" (declared at line 57 of "D:/yyy/TICore/include/std_nhet.h") xxx.h /yyy/TICore/include line 4 C/C++ Problem
My current dirty workaround is:
Manually explicit include xxx.h in xxx.c (both auto generated from hetp.exe)
Manually explicit change order of include files in HL_het.c (auto generated from HalcoGen)
Can you confirm the behavior, or did I miss relevant settings in HalcoGen?
Thanks in advance