Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

TCF/Raspberry Pi

< TCF
Revision as of 05:34, 14 August 2017 by Jonah.kichwacoders.com (Talk | contribs) (fix type of dash)

Getting TCF to run on the Raspberry Pi

300px-RaspberryPi.jpg

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 $. Getting it up and running is quick and easy:

Building the TCF Agent

Getting TCF up and running is really easy if your Pi has a network - this shouldn't take more than 15 minutes depending on your network connection for the downloads:

  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.

Now you're ready to rock and roll on the keyboard

  # (Replace n.n.n.n by the actual IP address that you read)
  ssh pi@n.n.n.n / password : raspberry
  sudo apt-get update    # (Need to update the Raspbian update caches to get git)
  sudo apt-get install git uuid uuid-dev libssl-dev
  git clone git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git
  cd org.eclipse.tcf.agent/agent
  cp -R machine/arm machine/armv6l
  make
  # In case you don't have libcrypt / libssl, you can also make NO_SSL=1 NO_UUID=1
  obj/GNU/Linux/armv6l/Debug/agent –S

The last command actually launches the agent, for testing.

Installing the Agent for auto-start

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. For that to work right after powering on the device, you'll need to register the TCF agent for auto-start:

  cd org.eclipse.tcf.agent/agent
  make install    # (Review the files being installed into /tmp)
  sudo make install INSTALLROOT=
  sudo update-rc.d tcf-agent defaults
  sudo update-rc.d tcf-agent enable 2

The last command is necessary, because the Pi uses runlevel 2 by default even if networking is enabled (ie sshd is up); so we'll want TCF to come up on runlevel 2 as well, and not only on runlevel 3 as in most standard Linux distributions. The good thing is that this change is persistent.

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

VNC

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:

  sudo apt-get install tightvncserver

There's more details on this Blog on setting up VNC on the Pi.

NFS

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).
  sudo apt-get purge rpcbind
  sudo apt-get purge nfs-common
  sudo apt-get install rpcbind
  sudo apt-get install nfs-kernel-server nfs-common
  
  sudo nano /etc/exports
  #  add the following line :
  #  /  *(rw,sync,no_subtree_check,insecure)
  
  #restart your nfs deamon
  /etc/init.d/nfs-kernel-server restart

Back to the top