Tricore Example compilation failed 'Zero width bit-field'

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
Posts: 2
Joined: Fri Jan 05, 2018 1:47 pm

Tricore Example compilation failed 'Zero width bit-field'

Post by stmokotg » Thu Jan 11, 2018 11:54 am


I tried to compile the one of the tricore demo example (downloaded from the Erika repository ) on windows environment in combination with Cygwin. I have installed all relevant libraries on Cygwin and set the TRICORE_GCCDIR to relevant path as suggested in Erika tuxfamily wiki. When I tried to compile the demo example (tc2Yx\as_multicore_examples\12_IOC_all_cores), I faced a list of compiler errors .

c:\hightec\toolchains\tricore\v4.9.2.0\tricore\include\tc27xa\IfxMtu_regdef.h:233:5: error: zero width for bit-field 'MEM78AIU'
unsigned int MEM78AIU:0; /**< \brief [77:78] Memory x MBIST AutoInitialize Underway (rwh) */

When I tried to trace through the header includes, I could see in ee_tc_cpu.h (located at ee_files\pkg\cpu\tricore\inc\) the below pre-processor Macros

Include files:

#ifdef EE_APPKIT_TC2X5
#include <tc27xc/Ifx_reg.h>
#if defined(EE_TC27XC__)
#include <tc27xc/Ifx_reg.h>
#elif defined(EE_TC27XB__)
#include <tc27xb/Ifx_reg.h>
#include <tc27xa/Ifx_reg.h>

Since Infineon uses 0 sized bitfields in the tc27xa include directory. These are not allowed for the GNU compiler. So I supposed to use the include folder tc27xb, tc27xc or tc27xd instead as in these folders no 0 sized bitfields are used. Now I am clue less how to include the header files of tc27xb/c/d. Could some one help me resolving this issue?

I thought of including "EE_OPT = "EE_APPKIT_TC2X5" in *.oil file, But I am not sure if this is an approach to resolve the error. As demo examples should be error free, there might be some header include work-around I missed to set.

Thanks a lot in advance!

Posts: 864
Joined: Thu Dec 07, 2006 12:11 pm

Re: Tricore Example compilation failed 'Zero width bit-field

Post by paolo.gai » Wed Jan 17, 2018 3:26 pm

In other words: TC275A has the register file distributed by Infineon that does not compile.
Therefore NEW versions of Hightec compiler for Tricore will not compile with TC275 and TC275A. You will need to use other variants (B/C), which works.

OLD versions of the hightec compiler works without problems.

We still need to update the examples with the new model (we'll do that in the next weeks on the SVN). for the moment, please change the MCU model.



Post Reply