2011년 11월 21일 월요일

시리얼 메세지 출력을 위한 작업

시리얼을 이용한 메세지 출력을 확인하기 위한 옵션을 주어 RTEMS를 컴파일한다.
우선 컴파일을 하게 될 RTEMS가 위치할 폴더를 생성.

[rtems@localhost building_work]$ mkdir console-rtems
[rtems@localhost building_work]$ ls
build-network  console-rtems  pc386  test-build-rtems

폴더를 생성한 후에는 시리얼 메세지 출력을 RTEMS 컴파일을 시작.

[rtems@localhost console-rtems]$ export PATH=/opt/rtems-4.10/bin:$PATH
[rtems@localhost console-rtems]$ cd console-rtems/
[rtems@localhost console-rtems]$ ../../rtems/configure --target=i386-rtems4.10 --prefix=/home/rtems/rtems-4.10-work/building_work/console-rtems/ --disable-mutiprocessing --disable-cxx --disable-rdbg --enable-maintainer-mode --enable-tests --enable-networking --enable-posix --disable-itron --disable-deprecated --disable-ada --disable-expada --enable-rtemsbsp=pc386 USE_COM1_AS_CONSOLE=1 BSP_PRESS_KEY_FOR_RESET=0

RTEMS 빌드가 되면 make all 과 make install 명령어를 입력

[rtems@localhost console-rtems]$ make all
[rtems@localhost console-rtems]$ ls
config.log  config.status  i386-rtems4.10  make  Makefile  testsuites  tools
[rtems@localhost console-rtems]$ make install

잘 되었는지 BSP에 Makefile.inc가 잘 생겼는지 확인.

[rtems@localhost console-rtems]$ ls
bin         config.status   lib   Makefile  testsuites
config.log  i386-rtems4.10  make  share     tools
[rtems@localhost console-rtems]$ cd i386-rtems4.10/
[rtems@localhost i386-rtems4.10]$ ls
c  pc386
[rtems@localhost i386-rtems4.10]$ cd pc386/
[rtems@localhost pc386]$ ls
build-tools  lib  make  Makefile.inc
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
새로 빌드한 RTEMS 응용 프로그램이 어떻게 동작하는지 확인을 해보자.

[rtems@localhost pc386]$ cd ../console-rtems/
[rtems@localhost console-rtems]$ ls
bin            config.log     i386-rtems4.10  log   Makefile  testsuites
build-command  config.status  lib             make  share     tools
[rtems@localhost console-rtems]$ find . -name "*.exe"
(파일 엄청 많다.)

[rtems@localhost console-rtems]$ pc386 -i i386-rtems4.10/c/pc386/testsuites/samples/base_sp/base_sp.exe
qemu is /usr/bin/qemu
Initialized console on port COM1 9600-8-N-1



*** SAMPLE SINGLE PROCESSOR APPLICATION ***
Creating and starting an application task
Application task was invoked with argument (0) and has id of 0xa010002
*** END OF SAMPLE SINGLE PROCESSOR APPLICATION ***
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

[rtems@localhost ~]$ ls
Desktop    Downloads          Music     Public  rtems-4.10-work  Videos
Documents  INSTALL-NOTES.txt  Pictures  qemu    Templates        workspace
[rtems@localhost ~]$ cd rtems-4.10-work/building_work/
[rtems@localhost building_work]$ ls
build-network  console-rtems  pc386  test-build-rtems
[rtems@localhost building_work]$ cd test-build-rtems/
[rtems@localhost test-build-rtems]$ find . -name "*.exe"
./i386-rtems4.10/pc386/lib/rtems-4.10/tests/paranoia.exe
./i386-rtems4.10/pc386/lib/rtems-4.10/tests/base_sp.exe
./i386-rtems4.10/pc386/lib/rtems-4.10/tests/unlimited.exe
./i386-rtems4.10/pc386/lib/rtems-4.10/tests/fileio.exe
./i386-rtems4.10/pc386/lib/rtems-4.10/tests/capture.exe
./i386-rtems4.10/pc386/lib/rtems-4.10/tests/nsecs.exe
./i386-rtems4.10/pc386/lib/rtems-4.10/tests/ticker.exe
./i386-rtems4.10/pc386/lib/rtems-4.10/tests/hello.exe
./i386-rtems4.10/pc386/lib/rtems-4.10/tests/loopback.exe
./i386-rtems4.10/pc386/lib/rtems-4.10/tests/pppd.exe
./i386-rtems4.10/pc386/lib/rtems-4.10/tests/minimum.exe


--------------------------------------------------------------------------------------------------------------------------------------------------------------------

댓글 없음:

댓글 쓰기