I3MUP1+Exercise+2

toc =Exercise 2.1= The goals of Exercise 2 are to have:
 * have set up your target(DevKit8000) for communication with the host (Ubuntu).
 * have set up the interfaces for file sharing
 * have shared a file between host and target

Exercise 2.1.1: Get a target
//Team up with a classmate and get a hold of a DevKit8000, one kit per pair. These can be borrowed from the// //library.//

Done! And here's proof :

Exercise 2.1.2: Connect the target
//Connect your target according to the Getting Started-procedure on the Wiki (from section 2 onwards)://

After having downloaded the DevKit8000 golden image file and unpacked it using # tar -xvf, we blasted the image onto the SD card according to the guide on the devkit wiki. The SD card was then inserted into the devkit, and we powered on the kit while holding down the bootkey to initialize the installation of Linux. There was no visual confirmation on the device screen that the installation had finished, but we let it run for about an hour, before rebooting the devkit. Linux then booted up - Great Success!

Exercise 2.1.3: Test Connections
We connected to the target via the usb connection using an ssh command. With the command code ssh root@10.9.8.2 code we connect to the target as root, and are prompted a password. There is no password, so we just press Enter. We are now logged on as root on the target, and are able to run commands in the terminal on target. Screenshot of the terminal window below:

Exercise 2.1.4: Move a File
To copy a file to the target, we just make an empty file called abc code touch abc code

This is copied to the target using an scp command code scp abc root@10.9.8.2: code A password is requested, and we just hit enter

We then connect to the target to verify that the file is there. Terminal shown below:

=Exercise 2.2=

//In this exercise you will use direct compiler invocation, make and Eclipse to rebuild the simple programs from// //Lab Exercise 1 for execution on the DevKit8000.//

Exercise 2.2.1
The sourcecode from exercise 1.1 is copied to a new directory and compiled for the ARM processor using direct compiler invocation with the following shell command: code arm-none-linux-gnueabi-g++ -o hello.target Hello.cpp code We verify that the file is compiled for the target ARM processor architecture.

The file is then copied to the target executed there.



Exercise 2.2.2
The source code and makefile from exercise 1.2 is copied to a new directory on host, and makefile is copied to makefile.target in the same directory so we have two makefiles - one for host and one for target. The target's makefile is edited so the install path is changed to root@10.9.8.2 and the compiler invocation is changed to arm-none-linux-gnueabi-g++.

The makefiles are used to compile for host and target, making sure to clean up after each usage to avoid file conflicts. The host executable is run successfully, and we copy the target executable to the target, and are also able to successfully display "Hello World!" on target.

Exercise 2.2.3
We did it, and here's proof

Exercise 2.2.4
To add a "target" configuration to Eclipse, we followed the guide found on the Devkit8000 wiki. The compiler invocation commands were changed in the Tool Settings from "g++" to "arm-none-linux-gnueabi-g++" to specify which compiler to use when building for target.

Exercise 2.2.5
We have modified our makefiles so the executables produced are placed in separate "host" and "target" folders to avoid them overwriting eachother's executables.