<html>
<head>
<meta content="text/html; charset=GB2312" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I think you have a mix of RTEMS and non-RTEMS files. RTEMS does<br>
not have a file named io.h. It is rtems/io.h. I really believe
that if<br>
you got this far, you are mixing and matching something.<br>
<br>
I didn't do any real clean up on the code except to get it to
compile<br>
and link. Attached.<br>
<br>
--joel<br>
<br>
On 03/09/2012 02:07 AM, zhoupeng wrote:
<blockquote
cite="mid:716f79ab.a6fa.135f67f3936.Coremail.zpeng563@126.com"
type="cite">
<div
style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">
<div>Hello,</div>
<div>I am taking part in a project now , we want to use rtems in
our pc104 board(base on x86). Recently, I write a program for
IO port (include driver and test program).The function of the
program is very easy , just read data form a port (eg:0x301).</div>
<div>This is my first time to write a device driver
useing rtems . In the process of debuging , I meet some errors
,can you tell me how to solve these errors. Thank you !</div>
<div>Best Regard!</div>
<div> </div>
<div>I test these program under the folder of hello_world_c.</div>
<div>error information:</div>
<div>[root@localhost hello_world_c]# make<br>
i386-rtems4.10-gcc --pipe
-B/home/rtems/rtems-4.10-work/bsp-install/i386-rtems4.10/pc386/lib/
-specs bsp_specs -qrtems -g -Wall -O2 -g -g -I
/home/rtems/rtems-4.10-work/rtems/cpukit/score/cpu/i386/rtems/score
-I
/home/rtems/rtems-4.10-work/bsp-install/i386-rtems4.10/pc386/lib/include/rtems
-I
/home/rtems/rtems-4.10-work/examples-v2/hello/hello_world_c
-mtune=i386 -c -o o-optimize/test.o test.c<br>
In file included from test.c:53:<br>
/home/rtems/rtems-4.10-work/bsp-install/i386-rtems4.10/pc386/lib/include/rtems/confdefs.h:54:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'Configuration'<br>
/home/rtems/rtems-4.10-work/bsp-install/i386-rtems4.10/pc386/lib/include/rtems/confdefs.h:59:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'Configuration_POSIX_API'<br>
In file included from test.c:53:<br>
/home/rtems/rtems-4.10-wor!
k/bsp-install/i386-rtems4.10/pc386/lib/include/rtems/confdefs.h:2166:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'Configuration'<br>
test.c: In function 'Init':<br>
test.c:68: warning: 'rtems_io_lookup_name' is deprecated
(declared at
/home/rtems/rtems-4.10-work/bsp-install/i386-rtems4.10/pc386/lib/include/rtems/io.h:186)<br>
test.c:69: warning: passing argument 3 of 'rtems_io_open'
makes pointer from integer without a cast<br>
/home/rtems/rtems-4.10-work/bsp-install/i386-rtems4.10/pc386/lib/include/rtems/io.h:142:
note: expected 'void *' but argument is of type 'int'<br>
test.c:80: warning: passing argument 3 of 'rtems_io_close'
makes pointer from integer without a cast<br>
/home/rtems/rtems-4.10-work/bsp-install/i386-rtems4.10/pc386/lib/include/rtems/io.h:148:
note: expected 'void *' but argument is of type 'int'<br>
make: *** [o-optimize/test.o] Error 1</div>
</div>
<br>
<br>
<span title="neteasefooter"><span id="netease_mail_footer"></span></span>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Joel Sherrill, Ph.D. Director of Research& Development
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
</pre>
</body>
</html>