Difference between revisions of "TCF/Raspberry Pi"

From Eclipsepedia

< TCF
Jump to: navigation, search
(New page: = Getting TCF to run on the Raspberry Pi = == Obtaining, compiling and launching the TCF Agent == The [http://www.raspberrypi.org/ Raspberry Pi] is a tiny, cheap single-board computer tha...)
 
Line 8: Line 8:
 
# Prepare an SD Card (4 GB recommended) with the [http://www.raspberrypi.org/downloads Raspbian Image] to boot your device. We used "wheezy" for this.
 
# Prepare an SD Card (4 GB recommended) with the [http://www.raspberrypi.org/downloads Raspbian Image] to boot your device. We used "wheezy" for this.
 
# Connect native monitor and keyboard. Finish setup wizard, type “ifconfig”. Read IP address from eth0.
 
# Connect native monitor and keyboard. Finish setup wizard, type “ifconfig”. Read IP address from eth0.
** If you can't get a monitor and a keyboard, you can use a tool like the [http://www.advanced-ip-scanner.com/ advanced IP scanner]
+
#* If you can't get a monitor and a keyboard, you can use a tool like the [http://www.advanced-ip-scanner.com/ advanced IP scanner]
 
# ssh pi@n.n.n.n / password : raspberry  ''# (Replace n.n.n.n by the actual IP address that you read)''
 
# ssh pi@n.n.n.n / password : raspberry  ''# (Replace n.n.n.n by the actual IP address that you read)''
 
# sudo apt-get update    ''# (Need to update the Raspbian update caches to get git)''
 
# sudo apt-get update    ''# (Need to update the Raspbian update caches to get git)''
Line 16: Line 16:
 
# cp –R machine/arm machine/armv6l
 
# cp –R machine/arm machine/armv6l
 
# make
 
# make
** In case you don't have libcrypt / libssl, you can also ''make ENABLE_SSL=0 CFLAGS=-DENABLE_SSL=0''
+
#* In case you don't have libcrypt / libssl, you can also ''make ENABLE_SSL=0 CFLAGS=-DENABLE_SSL=0''
 
# obj/GNU/Linux/armv6l/Debug/agent –S
 
# obj/GNU/Linux/armv6l/Debug/agent –S
  
Line 27: Line 27:
 
# sudo update-rc.d tcf-agent defaults
 
# sudo update-rc.d tcf-agent defaults
 
# sudo update-rc.d tcf-agent enable 2
 
# sudo update-rc.d tcf-agent enable 2
** ''(the pi uses runlevel 2 by default but that has still networking enabled (eg sshd is up)''
+
#* ''(the pi uses runlevel 2 by default but that has still networking enabled (eg sshd is up)''
  
 
== Connecting the TCF Debugger to the Pi ==
 
== Connecting the TCF Debugger to the Pi ==
Line 33: Line 33:
 
# Get Eclipse, we've used the [http://www.eclipse.org/downloads/ Eclipse IDE for C/C++ Developers, Juno SR2] package
 
# Get Eclipse, we've used the [http://www.eclipse.org/downloads/ Eclipse IDE for C/C++ Developers, Juno SR2] package
 
# Launch it, choose ''Help > Install New Software'' and go to the TCF milestone repository:
 
# Launch it, choose ''Help > Install New Software'' and go to the TCF milestone repository:
** http://download.eclipse.org/tools/tcf/builds/development/milestones
+
#* http://download.eclipse.org/tools/tcf/builds/development/milestones
** You can safely install all of TCF (will also get you the sources)
+
#* You can safely install all of TCF (will also get you the sources)
 
# Allow to restart, then switch to the '''Target Explorer Perspective'''
 
# Allow to restart, then switch to the '''Target Explorer Perspective'''
** Your Pi should show up under "Neighborhood"
+
#* Your Pi should show up under "Neighborhood"
  
 
= Advanced Configuration =
 
= Advanced Configuration =

Revision as of 12:38, 24 March 2013

Contents

Getting TCF to run on the Raspberry Pi

Obtaining, compiling and launching the TCF Agent

The Raspberry Pi is a tiny, cheap single-board computer that is powerful enough to play HD video. It runs Linux on its ARMv6 chip, connects a monitor and a keyboard for stand-alone work, and provides all the necessary tools to get started quickly. TCF needs a network, so the instructions here are for a "Type B" Raspberry Pi which should cost around 25 $.

One benefit of running TCF on the device is the TCF auto-discovery: It allows to connect to a headless device (without keyboard and monitor) quickly even without knowing its IP address. In order to first compile TCF though, you'll need to find out the IP address of the device first:

  1. Prepare an SD Card (4 GB recommended) with the Raspbian Image to boot your device. We used "wheezy" for this.
  2. Connect native monitor and keyboard. Finish setup wizard, type “ifconfig”. Read IP address from eth0.
  3. ssh pi@n.n.n.n / password : raspberry # (Replace n.n.n.n by the actual IP address that you read)
  4. sudo apt-get update # (Need to update the Raspbian update caches to get git)
  5. sudo apt-get install git uuid uuid-dev libssl-dev
  6. git clone git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git
  7. cd org.eclipse.tcf.agent/agent
  8. cp –R machine/arm machine/armv6l
  9. make
    • In case you don't have libcrypt / libssl, you can also make ENABLE_SSL=0 CFLAGS=-DENABLE_SSL=0
  10. obj/GNU/Linux/armv6l/Debug/agent –S

Installing the Agent for auto-start

When you register the TCF agent for auto-start, you can use TCF Discovery to connect the device even right after powering it on.

  1. make install # (Review the files being installed into /tmp)
  2. sudo make install INSTALLROOT=
  3. sudo update-rc.d tcf-agent defaults
  4. sudo update-rc.d tcf-agent enable 2
    • (the pi uses runlevel 2 by default but that has still networking enabled (eg sshd is up)

Connecting the TCF Debugger to the Pi

  1. Get Eclipse, we've used the Eclipse IDE for C/C++ Developers, Juno SR2 package
  2. Launch it, choose Help > Install New Software and go to the TCF milestone repository:
  3. Allow to restart, then switch to the Target Explorer Perspective
    • Your Pi should show up under "Neighborhood"

Advanced Configuration

You can install a VNC server on the Pi - the TCF source repository on git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.git has an experimental VNC integration:

  1. sudo apt-get install tightvncserver

You can install an NFS server on the Pi - provides access to source code and debug objects that you compile right on the Pi:

# purge rpcbind and nfs-common to avoid [warn] Not starting: portmapper is not running ... (warning).

  1. sudo apt-get purge rpcbind
  2. sudo apt-get purge nfs-common
  3. sudo apt-get install rpcbind
  4. sudo apt-get install nfs-kernel-server nfs-common
  1. sudo nano /etc/exports
    • add the following line :
    • / *(rw,sync,no_subtree_check,insecure)

#restart your hfs deamon

  1. /etc/init.d/nfs-kernel-server restart