MPC5643L.h ddc error with diab5.8.0.0
Moderator: paolo.gai
MPC5643L.h ddc error with diab5.8.0.0
Hello,
I'm trying to build the event_demo for Freescale MPC5643L with diab5.8.0.0
I've got the following error:
11:53:39 **** Incremental Build of configuration Default for project Test_PPC ****
"D:\\Erika\\workspace\\Test_PPC\\Debug\\make_launcher.bat" all
C:\cygwin\bin\bash found!
Using erika files in /cygdrive/d/Erika/evidence/eclipse/plugins/CO17F1~1.201/ee_files
PRE ee_boot.S
ASM ee_boot.S
CC eecfg.c
"D:\\Erika\\evidence\\eclipse\\plugins\\CO17F1~1.201\\ee_files\\pkg\\mcu/freescale_mpc5643l/inc\\MPC5643L.h", line 997: error (dcc:1112): member declaration without identifier
"D:\\Erika\\evidence\\eclipse\\plugins\\CO17F1~1.201\\ee_files\\pkg\\mcu/freescale_mpc5643l/inc\\MPC5643L.h", line 999: error (dcc:1112): member declaration without identifier
...
"D:\\Erika\\evidence\\eclipse\\plugins\\CO17F1~1.201\\ee_files\\pkg\\mcu/freescale_mpc5643l/inc\\MPC5643L.h", line 2411: error (dcc:1112): member declaration without identifier
"D:\\Erika\\evidence\\eclipse\\plugins\\CO17F1~1.201\\ee_files\\pkg\\mcu/freescale_mpc5643l/inc\\MPC5643L.h", line 2413: fatal error (dcc:1553): too many errors, good bye
make: *** [obj/eecfg.o] Error 1
11:53:47 Build Finished (took 8s.24ms)
I read that diab5.8.0.0 is supported. Maybe there are some diab compiler users who can help.
Best regards, Eugen
I'm trying to build the event_demo for Freescale MPC5643L with diab5.8.0.0
I've got the following error:
11:53:39 **** Incremental Build of configuration Default for project Test_PPC ****
"D:\\Erika\\workspace\\Test_PPC\\Debug\\make_launcher.bat" all
C:\cygwin\bin\bash found!
Using erika files in /cygdrive/d/Erika/evidence/eclipse/plugins/CO17F1~1.201/ee_files
PRE ee_boot.S
ASM ee_boot.S
CC eecfg.c
"D:\\Erika\\evidence\\eclipse\\plugins\\CO17F1~1.201\\ee_files\\pkg\\mcu/freescale_mpc5643l/inc\\MPC5643L.h", line 997: error (dcc:1112): member declaration without identifier
"D:\\Erika\\evidence\\eclipse\\plugins\\CO17F1~1.201\\ee_files\\pkg\\mcu/freescale_mpc5643l/inc\\MPC5643L.h", line 999: error (dcc:1112): member declaration without identifier
...
"D:\\Erika\\evidence\\eclipse\\plugins\\CO17F1~1.201\\ee_files\\pkg\\mcu/freescale_mpc5643l/inc\\MPC5643L.h", line 2411: error (dcc:1112): member declaration without identifier
"D:\\Erika\\evidence\\eclipse\\plugins\\CO17F1~1.201\\ee_files\\pkg\\mcu/freescale_mpc5643l/inc\\MPC5643L.h", line 2413: fatal error (dcc:1553): too many errors, good bye
make: *** [obj/eecfg.o] Error 1
11:53:47 Build Finished (took 8s.24ms)
I read that diab5.8.0.0 is supported. Maybe there are some diab compiler users who can help.
Best regards, Eugen
Re: MPC5643L.h ddc error with diab5.8.0.0
Hi,
the MPC5643L.h file is provided by Freescale for Codewarrior. It allows the access to all hardware features. But this file is not accepted by DCC (we tried both 5.5.1 and 5.8.0).
I asked to Freescale support if they have a MPC5643L.h version for DCC, but this file does not exis.
My suggestion is to write your customized MPC5643L.h and remove all member declaration without identifier because DCC does not have an option to disable such limitation (As Far As I Know).
Regards
the MPC5643L.h file is provided by Freescale for Codewarrior. It allows the access to all hardware features. But this file is not accepted by DCC (we tried both 5.5.1 and 5.8.0).
I asked to Freescale support if they have a MPC5643L.h version for DCC, but this file does not exis.
My suggestion is to write your customized MPC5643L.h and remove all member declaration without identifier because DCC does not have an option to disable such limitation (As Far As I Know).
Regards
Re: MPC5643L.h ddc error with diab5.8.0.0
Hi there,
I have ran into the same issue.
I have created a diab 5.8.0 compatible header. See the attachment.
It might not be perfect, but it suit me for all the peripherals I'm using.
I have uploaded it here, as I'm not allowed to attach .h file, apparently.
http://tny.cz/73a2d610
Best regards,
Maxime Vincent
I have ran into the same issue.
I have created a diab 5.8.0 compatible header. See the attachment.
It might not be perfect, but it suit me for all the peripherals I'm using.
I have uploaded it here, as I'm not allowed to attach .h file, apparently.
http://tny.cz/73a2d610
Best regards,
Maxime Vincent
Re: MPC5643L.h ddc error with diab5.8.0.0
Hi!
We are reviewing the file you posted us...
We noted that you inserted the names for the originally unnamed data structures. That is for sure a good idea... but...
...the problem we see is that writing code in this way may lead to code looking like:
STM.__NO_NAME_168.__NO_NAME_167.CMP0.R = val;
... which is not that readable.
Is there any option in the Diab compiler that helps in using that header in the correct way without the need of changing the names?
The possible actions we will do could be the following (will be done in the background by Francesco):
- we will add a few missing register definitions in the CPU layer for the 5643L in this way the CPU layer will be independent from that include file.
- this does not solve the problem for the peripherals (currently we have a bunch of drivers that we'll release soon that make use various registers), but it is anyway a first start.
- what we will add is an example template which will support that customized header, plus we will add a note on the wiki about that.
Ciao,
PJ
We are reviewing the file you posted us...
We noted that you inserted the names for the originally unnamed data structures. That is for sure a good idea... but...
...the problem we see is that writing code in this way may lead to code looking like:
STM.__NO_NAME_168.__NO_NAME_167.CMP0.R = val;
... which is not that readable.
Is there any option in the Diab compiler that helps in using that header in the correct way without the need of changing the names?
The possible actions we will do could be the following (will be done in the background by Francesco):
- we will add a few missing register definitions in the CPU layer for the 5643L in this way the CPU layer will be independent from that include file.
- this does not solve the problem for the peripherals (currently we have a bunch of drivers that we'll release soon that make use various registers), but it is anyway a first start.
- what we will add is an example template which will support that customized header, plus we will add a note on the wiki about that.
Ciao,
PJ
Re: MPC5643L.h ddc error with diab5.8.0.0
Hi Paolo,
That's correct. Except that the NO_NAME stuff, is added to the unnamed unions that I do not use... Just to get this to compile.
For the peripherals I'm using, I have always removed one of both definitions in the union, so that a union is not needed any more.
E.g. you have to choose if you'll use SIU.PCR1.some_member or SIU.PCR[1].some_member, instead of having both available...
I have made this choice for the peripherals/registers I needed, the other are left @ .NO_NAME for now....
Eventually, they'll all have to be converted to have no unnamed unions and no "NO_NAME" stuff any more.
That's correct. Except that the NO_NAME stuff, is added to the unnamed unions that I do not use... Just to get this to compile.
For the peripherals I'm using, I have always removed one of both definitions in the union, so that a union is not needed any more.
E.g. you have to choose if you'll use SIU.PCR1.some_member or SIU.PCR[1].some_member, instead of having both available...
I have made this choice for the peripherals/registers I needed, the other are left @ .NO_NAME for now....
Eventually, they'll all have to be converted to have no unnamed unions and no "NO_NAME" stuff any more.
Re: MPC5643L.h ddc error with diab5.8.0.0
Dear Eugen, Dear Maxim,
I got an answer from the WindRiver Diab development team about this post. Could you please try the following compiler option:
-ew1112
It should suppress the warning/error.
Does it works using that option?
Ciao,
Paolo
I got an answer from the WindRiver Diab development team about this post. Could you please try the following compiler option:
-ew1112
It should suppress the warning/error.
Does it works using that option?
Ciao,
Paolo
Re: MPC5643L.h ddc error with diab5.8.0.0
Hey Paolo,
Changing it to -ei1112, this suppressed the error/warning indeed. However, I cannot use the header file w/ the unnamed unions then,
as I get following error message:
So it seems the unions are not really recognized?
Changing it to -ei1112, this suppressed the error/warning indeed. However, I cannot use the header file w/ the unnamed unions then,
as I get following error message:
Code: Select all
"w:\\ETPU7B~J\\EBNHW0~H\\plugins\\CY6Z17~A\\ee_files\\pkg\\mcu/freescale_mpc5643l/inc/ee_mpc5643l.h", line 104: error (dcc:1111): identifier CPR_PRC is not member of struct/union
"w:\\ETPU7B~J\\EBNHW0~H\\plugins\\CY6Z17~A\\ee_files\\pkg\\cpu/e200zx/inc/ee_cpu.h", line 247: error (dcc:1111): identifier CPR_PRC is not member of struct/union
"w:\\ETPU7B~J\\EBNHW0~H\\plugins\\CY6Z17~A\\ee_files\\pkg\\cpu/e200zx/inc/ee_cpu.h", line 259: error (dcc:1111): identifier CPR_PRC is not member of struct/union
Re: MPC5643L.h ddc error with diab5.8.0.0
Also,
I had to change the EE_mpc5643l_lsm_or_dpm(void) function to:
I had to change the EE_mpc5643l_lsm_or_dpm(void) function to:
Code: Select all
return ((SSCM.UOPS.B.LSM_DPMB!=0)?0x400000UL:0);
Re: MPC5643L.h ddc error with diab5.8.0.0
Hi,
did you try to add -ew1111?
message 1111 is an error but can be lowered to warning but not less ("i" is not allowed, it raises the 1641).
Let me know the result please
Francesco
did you try to add -ew1111?
message 1111 is an error but can be lowered to warning but not less ("i" is not allowed, it raises the 1641).
Let me know the result please
Francesco
Re: MPC5643L.h ddc error with diab5.8.0.0
Tried that,
gives me:
An error anyway... I tried -ei1111, but that gave me 1641 indeed ;).
Therefor, I have removed "-Xstop-on-warning"
gives me:
Code: Select all
printf "CC eecfg.c\\n"; /cygdrive/c/WINDRI~1/diab/580~1.0/WIN32/bin/dcc -Xeieio -Xsemi-is-comment -Xkeywords=4 -c -t PPCE200Z6NES:simple -Xlicense-wait -Xstderr-fully-buffered -Xbss-common-off -Xeieio -XO -Xsavefpr-avoid -Xsmall-data=8 -Xswitch-table=0 -Xinline=40 -Xsmall-const=8 -Xenum-is-best -Xunroll=4 -Xunroll-size=5 -Xsemi-is-comment -Xforce-prototypes -Xmacro-in-pragma -g -O0 -ew1111 -ei1112 -g -Xstmw-slow -I"w:\\experiments\\eclipse-erika\\workspace\\tryout" -I"w:\\ETPU7B~J\\EBNHW0~H\\plugins\\CY6Z17~A\\ee_files\\pkg" -I"." -DDEBUG -D__USE_LEDS__ -D__USE_BUTTONS__ -DMPC5643L_STD_SW_MMU_CONFIG -D__SEM__ -D__ALLOW_NESTED_IRQ__ -DEE_SYSTEM_TIMER_DEVICE_STM -DVERBOSE -D__RTD_CYGWIN__ -D__PPCE200ZX__ -DEE_MPC5643L -DEE_PPCE200Z4 -D__DIAB__ -D__FP__ -D__IRQ_STACK_NEEDED__ -D__MULTI__ -D__FP_NO_RESOURCE__ -D__OO_AUTOSTART_TASK__ -D__ALLOW_NESTED_IRQ__ -D__DISABLE_EEOPT_DEFINES__ -D__ERIKA__ -D__PPCE200ZX__ -Xmake-dependency=d -Xmake-dependency-target=obj/eecfg.o -Xmake-dependency-savefile="obj\\eecfg.d_tmp" -c "eecfg.c" -o "obj\\eecfg.o"
CC eecfg.c
"w:\\ETPU7B~J\\EBNHW0~H\\plugins\\CY6Z17~A\\ee_files\\pkg\\cpu/e200zx/inc/ee_cpu.h", line 247: error (dcc:1111): identifier CPR_PRC0 is not member of struct/union
Therefor, I have removed "-Xstop-on-warning"
Re: MPC5643L.h ddc error with diab5.8.0.0
Dear Maxim,
I have experienced a case very similar to yours. I lowered the 1111 to warning but it is not sufficient, even if i remove -Xstop-on-warning. I removed the issue using the fictious name added to the anonymous object.
For instance for the STM module while accessing CR field (using the modified version of MPC5643L.h provided by your previous post):
STM.__NO_NAME_165.CR.B.FRZ = 1;
You said to have solved the problem by using -ew1111 and removing -Xstop-on-warning, can you confirm?
Regards
I have experienced a case very similar to yours. I lowered the 1111 to warning but it is not sufficient, even if i remove -Xstop-on-warning. I removed the issue using the fictious name added to the anonymous object.
For instance for the STM module while accessing CR field (using the modified version of MPC5643L.h provided by your previous post):
STM.__NO_NAME_165.CR.B.FRZ = 1;
You said to have solved the problem by using -ew1111 and removing -Xstop-on-warning, can you confirm?
Regards
Re: MPC5643L.h ddc error with diab5.8.0.0
Hey Francesco,
No, the -ew1111 and removing -Xstop-on-warning did not solve the problem for me.
The STM timer is not modified "right" in the header I posted before (but just enough so that it doesn't complain when compiling)
Now that I am actually using the STM, I have modified the header in this way:
Now I can use the STM module as STM.CHANNEL[0].CCR
If you want it to be the other way,
you can remove the STM_CHANNEL_tag CHANNEL[4] from the struct instead,
and leave all the CCR0, CCR1, CCR2, CCR3 registers etc...
You cannot have both with an unnamed union.
If you _want_ both, you have to name the union (as I did with __NO_NAME_167, but you might want to choose a better name ;))
Furthermore, I think using -Xdialect-c99 the unnamed unions are allowed, but then there's other issues (as all of my code is written for c89...)
BR,
Maxime
No, the -ew1111 and removing -Xstop-on-warning did not solve the problem for me.
The STM timer is not modified "right" in the header I posted before (but just enough so that it doesn't complain when compiling)
Now that I am actually using the STM, I have modified the header in this way:
Code: Select all
/****************************************************************/
/* */
/* Module: STM */
/* */
/****************************************************************/
typedef union { /* STM_CR - Control Register */
vuint32_t R;
struct {
vuint32_t:16;
vuint32_t CPS:8; /* Counter Prescaler */
vuint32_t:6;
vuint32_t FRZ:1; /* Freeze Control */
vuint32_t TEN:1; /* Timer Counter Enabled */
} B;
} STM_CR_32B_tag;
typedef union { /* STM_CNT - STM Count Register */
vuint32_t R;
} STM_CNT_32B_tag;
/* Register layout for all registers CCR ... */
typedef union { /* STM_CCRn - STM Channel Control Register */
vuint32_t R;
struct {
vuint32_t:31;
vuint32_t CEN:1; /* Channel Enable */
} B;
} STM_CCR_32B_tag;
/* Register layout for all registers CIR ... */
typedef union { /* STM_CIRn - STM Channel Interrupt Register */
vuint32_t R;
struct {
vuint32_t:31;
vuint32_t CIF:1; /* Channel Interrupt Flag */
} B;
} STM_CIR_32B_tag;
/* Register layout for all registers CMP ... */
typedef union { /* STM_CMPn - STM Channel Compare Register */
vuint32_t R;
} STM_CMP_32B_tag;
typedef struct STM_CHANNEL_struct_tag {
/* STM_CCRn - STM Channel Control Register */
STM_CCR_32B_tag CCR; /* relative offset: 0x0000 */
/* STM_CIRn - STM Channel Interrupt Register */
STM_CIR_32B_tag CIR; /* relative offset: 0x0004 */
/* STM_CMPn - STM Channel Compare Register */
STM_CMP_32B_tag CMP; /* relative offset: 0x0008 */
int8_t STM_CHANNEL_reserved_000C[4];
} STM_CHANNEL_tag;
typedef struct STM_struct_tag {
/* STM_CR - Control Register */
STM_CR_32B_tag CR; /* offset: 0x0000 size: 32 bit */
/* STM_CNT - STM Count Register */
STM_CNT_32B_tag CNT; /* offset: 0x0004 size: 32 bit */
int8_t STM_reserved_0008[8];
/* Register set CHANNEL */
STM_CHANNEL_tag CHANNEL[4]; /* offset: 0x0010 (0x0010 x 4) */
int8_t STM_reserved_0050[16304];
} STM_tag;
#define STM (*(volatile STM_tag *) 0xFFF3C000UL)
If you want it to be the other way,
you can remove the STM_CHANNEL_tag CHANNEL[4] from the struct instead,
and leave all the CCR0, CCR1, CCR2, CCR3 registers etc...
You cannot have both with an unnamed union.
If you _want_ both, you have to name the union (as I did with __NO_NAME_167, but you might want to choose a better name ;))
Furthermore, I think using -Xdialect-c99 the unnamed unions are allowed, but then there's other issues (as all of my code is written for c89...)
BR,
Maxime
Re: MPC5643L.h ddc error with diab5.8.0.0
Ok, got it...
concerning the use of dialect, i already tried such solution, as you mentioned it raises other issues but the problem of unnamed object is still there...
"../stm.c", line 6: error (etoa:4136): struct "STM_struct_tag" has no field
"CR"
STM.CR.B.FRZ = 1;
^
GCC raises the same warnings for both scenarios: c89 and c99 (by using -std=c89 and -std=c99 -pedantic)
warning: ISO C90 doesn’t support unnamed structs/unions [-pedantic]
warning: struct has no named members [-pedantic]
warning: ISO C99 doesn’t support unnamed structs/unions [-pedantic]
warning: struct has no named members [-pedantic]
but in both cases you get a successful build. Currently I have no access to C99 or C89, hence i don't know the correct compiler outcome, but seems to be implementation dependent.
Anyway, thank you for your hints
Regards
concerning the use of dialect, i already tried such solution, as you mentioned it raises other issues but the problem of unnamed object is still there...
"../stm.c", line 6: error (etoa:4136): struct "STM_struct_tag" has no field
"CR"
STM.CR.B.FRZ = 1;
^
GCC raises the same warnings for both scenarios: c89 and c99 (by using -std=c89 and -std=c99 -pedantic)
warning: ISO C90 doesn’t support unnamed structs/unions [-pedantic]
warning: struct has no named members [-pedantic]
warning: ISO C99 doesn’t support unnamed structs/unions [-pedantic]
warning: struct has no named members [-pedantic]
but in both cases you get a successful build. Currently I have no access to C99 or C89, hence i don't know the correct compiler outcome, but seems to be implementation dependent.
Anyway, thank you for your hints
Regards