Connecting to target
Test Connection
We first saw that the connection didn't work, because the message "Man-in-middle-attack" was shown. Then we used ssh-keygen anfd it worked.
Make a file
The left side shows us the commands on the computer, and the right side show how the file is now moved to the beagleboard:
Create shell scripts for ssh and scp
Here we see the text in the script file:
Here is the commands in the shell:
As we can see, we go to the password for beagleboard, when we use the file 'conn2tgt'.
When compiled, we see that there is two executeable files, 'hello' and 'hello.target':
As we can see, we go to the password for beagleboard, when we use the file 'conn2tgt'.
Building C++ programs for target
Exercise 1 Cross compiling the program Hello World and running it on target
We compile the file hellp.cpp to the file a.out:
As we can see, the executable file a.out is runned on beagleboard, and executes just like the file hello.cpp:
Exercise 2 Using make les to build host and target programs
In this makefile we see that the compiler is changed from the original makefile to the host:
We send the 'hello.target' to beagleboard, and see that both the target and the host execute the files the same way:
Exercise 3 Cross compiling with more extended make les
We change the compiler as well in the makefile for parts, and compiles it for both the host and the target.
We send the 'parts.target' to beagleboard, and see that both the target and the host execute the files the same way:
Exercise 4 Improving cross compilation handling in makefiles
This is the improved makefile where the object- and executable files are made in the sub-directory called host.
Review
SvarSletIn exercise 2 it seems like that you missed the problem in having two makefiles for the same program. The idea was to make two makefiles who writes the exact same program (both called hello), but with different compilers. The problem occurs if the makefile for the host makes hello with the g++ compiler, and afterwards you try to make hello with makefile.target, but it can’t make the file with the arm compiler because it believes that the file is already made. You can check which format the file is compiled to, by using file hello.
As you describe it, one makefile makes two executable files hello and hello.target, which is wrong. Maybe you have done it the right way, but you don’t describe it well.
In exercise 4 we miss some screen dumps from the terminal, which shows that your makefiles is working.