Read IO Port data on X86

zhoupeng zpeng563 at 126.com
Fri Mar 9 08:07:07 UTC 2012


Hello,
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).
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 !
Best Regard!
 
I test these program under the folder of  hello_world_c.
error information:
[root at localhost hello_world_c]# make
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
In file included from test.c:53:
/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'
/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'
In file included from test.c:53:
/home/rtems/rtems-4.10-work/bsp-install/i386-rtems4.10/pc386/lib/include/rtems/confdefs.h:2166: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Configuration'
test.c: In function 'Init':
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)
test.c:69: warning: passing argument 3 of 'rtems_io_open' makes pointer from integer without a cast
/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'
test.c:80: warning: passing argument 3 of 'rtems_io_close' makes pointer from integer without a cast
/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'
make: *** [o-optimize/test.o] Error 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120309/e41fd496/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.rar
Type: application/octet-stream
Size: 2938 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20120309/e41fd496/attachment.obj>


More information about the users mailing list