Questions met when porting!

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Locked
findfrienda

Questions met when porting!

Post by findfrienda »

Hi, Dear all,

I met a problem. When I compile ERIKA's source codes, there occurs an error:

.../pkg/com/com/inc/ee_cominit.h:335: error: [11821] `EE_COM_N_MODE' undeclared here (not in a function)

I searched the source code, but havn't found the symbol, "EE_COM_N_MODE". So, can somebody give me some help:
1). What's the meaning of EE_COM_N_ MODE?
What we want to do with it?

Thanks!
gfranchi

Re: Questions met when porting!

Post by gfranchi »

Dear Frienda,

the symbol `EE_COM_N_MODE' defines the number of working modes for an application that uses the OSEK COM library. The symbol is automatically generated by RT-DRUID when an COM object is defined in the oil file. Here is an example:

Code: Select all

	COM EE_Com {
		COMERRORHOOK = FALSE;
		COMUSEGETSERVICEID = FALSE;
		COMUSEPARAMETERACCESS = FALSE;
		COMAPPMODE = "LED_DEMO_APPMODE";
		COMSTATUS  = COMSTANDARD;
		COMSTARTCOMEXTENSION = TRUE;
		COMTYPE = CCCB;
		INCLUDES = "umsgtype.h";
	};
The definition of this symbol can be fond in "eecfg.h", which is one of the file generated by RT-DRUID. Note that, in the example above, the working mode is defined by the attribute COMAPPMODE .

If you are not compiling an application that uses the COM library, do not compile the source code in the folder "pkg/com". Instead, if you want to compile an application that uses the COM library and you do not have the support of RT-DRUID, you should write the following source files by hand: "eecfg.c", "eecfg.h" and "Com.c". In order to do this, you can exploit the COM demo available for the Flex Demo Board (it is among the OO examples). You could adapt the files generated by RT-DRUID to your application.

For further information:
http://erika.tuxfamily.org/download/man ... _1_0_1.pdf
http://svn.tuxfamily.org/viewvc.cgi/eri ... _com_base/

Best regards,

Gianluca.
findfrienda

Re: Questions met when porting!

Post by findfrienda »

thanks very much!!!!
diantn

Re: Questions met when porting!

Post by diantn »

Hello,

First of all thanks for providing us Erika Enterprise. Great job! :-)

It works fine till I try to use COM.
Especially about two files, ee_byteorder.h and ee_cominit.h
There are #define macros which are defined totally different and creates compiler error.
But commenting out the macros in ee_cominit.h solves the error. Were the macros in ee_cominit.h a feature?

ee_byteorder.h http://svn.tuxfamily.org/viewvc.cgi/eri ... iew=markup

Code: Select all

129	#define EE_COM_be16_to_cpu(x) (EE_UINT16)x
130	
131	#define EE_COM_be32_to_cpu(x)   (EE_UINT32)x
132	
133	#define EE_COM_le16_to_cpu(x)   EE_COM_cpu_to_le16(x)
134	
135	#define EE_COM_le32_to_cpu(x)   EE_COM_cpu_to_le32(x)
ee_cominit.h http://svn.tuxfamily.org/viewvc.cgi/eri ... iew=markup

Code: Select all

107	#define EE_COM_be16_to_cpu       0x0000
108	#define EE_COM_be32_to_cpu       0x0010
109	#define EE_COM_le16_to_cpu       0x0020
110	#define EE_COM_le32_to_cpu       0x0030
Best regards,
DianTN
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: Questions met when porting!

Post by paolo.gai »

You are right they seems to be double defined. Let us check it and we'll ave an answer...

PJ
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: Questions met when porting!

Post by paolo.gai »

Btw, on which arechitecture are you using ERIKA?

Ciao,

Paolo
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: Questions met when porting!

Post by paolo.gai »

Hi!

Please check that you used: ee/pkg/com/com/inc/ee_com.h , which is the include file used by all the COM demos distributed with the system.

You should not use pkg/com/ee_com.h (which was left there from a previous implementation and will be removed soon)

Please also note that:
- the initial implementation of the COM Stack was done in 2004 supporting all 4 conformance classes
- during the integration with ERIKA, only CCCA and CCCB has been tested using the OSEK/VDX implementation. CCC0 and CCC1 (which use the functions you noted) may not currently work.

Ciao,

PJ
diantn

Re: Questions met when porting!

Post by diantn »

Hi,

Thanks for the explanation.
I use Erika for Tricore.

DianTN.
Locked