In following examples, static address for PC is 192.168.0.1.
It can be modified with $ sudo ifconfig [Eth_name] 192.168.0.1
NOTE : ssh must be activated in raspi-config
Graphical mode :
Copy PC –> RPI
Copy PC <–> RPI
Host : 192.168.0.2
Username : pi
Port : 22
RPI (via ssh)
Considering the following helloworld.cpp file :
let’s copy it on the target :
RPI side (via SSH)
The RPI compiler is of course ARM type :
We compile, we execute :
Now let’s see how to create the RPI program on the PC.
An evidence : The PC has a compilation toolchain for Pentium.
It can be useful adding the linaro bin folder to the PATH :
RPI Side (via SSH)
So this is exactly the same for a simple hello world.
It gets complicated ; let’s consider the opencv library.
The executable creation must be done with RPI opencv libs ( not the PC ones).
A solution could be copying RPI libs on the PC in order to create a minimal file system.
This supposes dealing with dependances and update links to get relative paths.
An other solution, more elegant, is mounting the RPI file system through ssh thanks to sshfs.
This is the RPI file system ; it is mounted in PC rpi_mnt directory
let’s have à look to the Makefile:
Test on Target
Ok we compiled, but how to debug our program ( other than with printf) ?
you can get it in installations.html ( 1. IDE Eclipse / Tdb )
In the project directory, create a .tdbinit file :