Tricore Example compilation failed 'Zero width bit-field'
Posted: Thu Jan 11, 2018 11:54 am
Hello,
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 .
Error:
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>
#else
#if defined(EE_TC27XC__)
#include <tc27xc/Ifx_reg.h>
#elif defined(EE_TC27XB__)
#include <tc27xb/Ifx_reg.h>
#else
#include <tc27xa/Ifx_reg.h>
#endif
#endif
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!
Regards,
Mohan
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 .
Error:
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>
#else
#if defined(EE_TC27XC__)
#include <tc27xc/Ifx_reg.h>
#elif defined(EE_TC27XB__)
#include <tc27xb/Ifx_reg.h>
#else
#include <tc27xa/Ifx_reg.h>
#endif
#endif
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!
Regards,
Mohan