Questions met when porting!

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
findfrienda
Newbie
Posts: 28
Joined: Mon Dec 03, 2012 3:01 am

Questions met when porting!

Post by findfrienda » Tue Jan 08, 2013 7:06 am

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
Newbie
Posts: 7
Joined: Thu Sep 20, 2007 5:12 pm

Re: Questions met when porting!

Post by gfranchi » Tue Jan 08, 2013 3:03 pm

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
Newbie
Posts: 28
Joined: Mon Dec 03, 2012 3:01 am

Re: Questions met when porting!

Post by findfrienda » Wed Jan 09, 2013 1:46 pm

thanks very much!!!!

diantn
Newbie
Posts: 2
Joined: Sun Apr 21, 2013 11:16 pm

Re: Questions met when porting!

Post by diantn » Sun Apr 21, 2013 11:28 pm

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: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: Questions met when porting!

Post by paolo.gai » Mon Apr 22, 2013 7:43 am

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

PJ

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

Re: Questions met when porting!

Post by paolo.gai » Mon Apr 22, 2013 7:53 am

Btw, on which arechitecture are you using ERIKA?

Ciao,

Paolo

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

Re: Questions met when porting!

Post by paolo.gai » Mon Apr 22, 2013 10:27 am

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
Newbie
Posts: 2
Joined: Sun Apr 21, 2013 11:16 pm

Re: Questions met when porting!

Post by diantn » Thu Apr 25, 2013 3:15 pm

Hi,

Thanks for the explanation.
I use Erika for Tricore.

DianTN.

Post Reply