Search This Blog


Wednesday, 16 December 2015

Parallella Board Notes (WIP)

SDHC cards tested;
Samsung 32GB Evo MicroSDHC (UHS-I Grade 1 Class 10)
SanDisk 16GB MicroSDHC (Class 4)

After burning headless image to SDHC card, use Putty to connect via SSH to the board.

Login to board - Username: Parallella Password: Parallella

Check SD card space with: df -h

Find root partition with: dmesg | grep "root"

Run fdisk to rebuilt the root partition: See

Shutdown the board with: sudo shutdown -r now

Power off the board.

Power on the board and SSH login again with Putty.

Resize root partition with: sudo resize2fs /dev/mmcblk0p2

Check new SD card space with: df -h

Update system software with:
sudo apt-get update
sudo apt-get upgrade

Reboot the board: sudo reboot

Putty will lose connection. Restart putty and login (it may take time to reboot).

Update super-user password (make it something that's remembered, e.g. linaro)
sudo su

Setup Git with and

git config --global push.default simple

Install cmake: sudo apt-get install cmake
Optional cmake-gui: sudo apt-get install cmake-qt-gui

Update cmake to latest:
tar xvf cmake-3.4.1.tar.gz
cd cmake-3.4.1
cmake .
sudo make install
Add export CMAKE_ROOT=/usr/local/share/cmake-3.4/ to .bashrc (then shutdown and relogin)
Check cmake is version 3.4: cmake --version

Install eog for image viewing: sudo apt-get install eog


Extract all and usual; ./configure ; sudo make install
flex --version
bison --version
m4 --version

echo $PATH
vi .bashrc (if /usr/local/lib not in the LD_LIBRARY_PATH and relogin)

cd ~
tar xvf coprthr-1.6.0-parallella.tgz
sudo ./browndeer/scripts/
sudo ./browndeer/scripts/

cd ~
tar xvf v1.6.0.tar.gz
cd coprthr-1.6.0
./configure --enable-epiphany --disable-clete
sudo make install
mkdir work
cp –R /usr/local/browndeer/examples ./work
cp –R /usr/local/browndeer/test ./work
cd ./work/test
su (required so tests can assess /dev/mmap)
export PATH=/usr/local/browndeer/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/browndeer/lib:/usr/local/lib:$LD_LIBRARY_PATH
make quicktest
cd ../examples/parallella/hello_opencl
gcc hello_opencl.c -o hello_opencl.x -I/usr/local/browndeer/include -L/usr/local/browndeer/lib -lcoprthr -lcoprthr_opencl

Install Xming X Server for Windows -
Set "Enable X11 forwarding" option in Putty -> Connection -> SSH -> X11

Install SFML: sudo apt-get install libsfml-dev libsfml-graphics2 libsfml-system2 libsfml-window2 libfreetype6-dev libxcb-image0-dev libudev-dev

Grab OpenCL cl2.hpp file from
Put the cl2.hpp into /usr/local/browndeer/include/CL directory
It MUST be version from 2.1 (older versions had bad 1.1 support)

To see gcc pre-processor defines: gcc -dM -E - < /dev/null

Saturday, 7 May 2011

FTP Server and RedFly-Shield Socket class

I have been using Skewworks FTP server class to test my simple RedFly.Socket class. I got to a point where the FTP server was able to respond to a few FTP commands, including using 'get' to retrieve a file from the FEZ Domino SD card. But hit a snag when trying to send a file from the PC to the FTP server. It was becoming obvious that my simple implementation of a Socket class needed to have higher level functionality. Two thoughts were; implementing meaningful exception handling and function parameter checking, and hide in a lower layer the internal socket handling within the RedFly-Shield.

My search lead my to quite a few differing implementations of System.Net.Socket class library functions. Eventually I was draw to the implementation in the OpenSource Mono .Net core.

I've heavily refactored the RedFly.Socket class, and tweaked the FTP server and RedFly-Tester solution (make sure to grab at least r106 from the GoogleCode SVN repository).

As of r106 of the repository, the FTP server can perform most of the commands. 'get' and 'send' are quite limited at the moment though. They are restricted by the number of bytes for a file transferred.

I've got two new steps to take now -
  1. Try the RedFly.Socket class with other example code, such as HTTP client and server, DNS lookups, NTP sync.
  2. Finally update the UART reception handling.