Download presentation
Presentation is loading. Please wait.
1
Lab. 1 Run a demo program
2
Lab. Goal To be familiar with PPRK, pcm7230 and the cross compiler. To understand how to run a program to control the PPRK.
3
Programming Environment Hardware Host Computer: i386 PC Target system: pcm7230 with wireless usb card PPRK (Palm Pilot Robot Kit) Software Linux OS A newer ramdisk.gz (start sshd daemon) Cross Compiler arm-linux-gcc 2.95.3 BrainStem C development on Linux OS cdev.tar.gz BrainStem PPRK SDK on Windows OS GP.exe and console.exe
4
Console.exe In sdk/Brainstem/aBinary/ Use Console.exe to set heartbeat mode to internal mode Connect PPRK to your PC Open console.exe Key in 2 18 5 1 2 19 exit
5
Lab. Procedures 1.Install the cross compiler on PC 2.Compile the example by the cross compiler 3.Set up wireless device and assign an IP for pcm7230 4.Upload the binary code to pcm7230 5.Run the program on pcm7230 host computer pcm7230 carried by PPRK Communicate through wireless PPRK
6
Install Cross-compiler on PC Download cross-2.95.3.tar.bz2 from the website Decompress the cross compiler cross-2.95.3.tar.bz2 into the directory /usr/local/arm/ $ tar –jxvf cross-2.95.3.tar.bz2 Add “/usr/local/arm/2.95.3/bin” to the end of the PATH environment variable $ PATH=“$PATH:/usr/local/arm/2.95.3/bin:” $ export PATH
7
Cross-compile the Example Download cdev.tar.gz from the website and decompress it $ tar xvzf cdev.tar.gz Compile the “aStub” program in the directory: brainstem/aExample/aStub/ Initiate the build with the proper argument for ARM as well as the specific compilers that should be used $ make ARCH=ARM CC=arm-linux-gcc CPP=arm-linux-g++ Build a tarball stripped of all sources for installation in your working folder $ make ARCH=ARM tarball Then you will see dist_ARM.tar in the parent directory
8
Initiate the wireless device Assign an IP for your pcm7230 $ ifconfig wlan0 up $ ifconfig wlan0 your_ip Associate with your AP by setting essid $ iwconfig wlan0 essid your_essid Your IP will be announced on the course website http://dclab.cs.nthu.edu.tw/~course/PPRK.html
9
Upload the binary code to target board Use command scp to copy the tarball to your pcm7230 $ scp dist_ARM.tar your_ip:/ Account/password: root/rootme P.S. Refer to problem 13 in the FAQ
10
Run the program on pcm7230 Extract the file and run it. Connect your com1 port of your pcm7230 and PPRK with rs232 cable at this moment. Use ssh to connect to your pcm7230 $ ssh your_ip After you login successfully, you can remove the wire used to connect host PC and the com2 port of your pcm7230 $ tar -xvf dist_ARM.tar $ sh run aStub
11
FAQ Read problem 1, 4, 5, 9, 11 and 13 in the FAQ. Hardware Reset 用
12
Report ( at most 3 pages ) 1. Please write down your instructions step by step in detail. 2. Draw the path of the PPRK while running the “aStub” program. 3. Suggestion (optional) Coordinate Map
13
Note Due day 2006/10/5 In the develop phase, you should use power supply. In the demo phase, you should use battery to provide power.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.