Tuesday, March 10, 2015

GPU demo program, run on Raspberry Pi 2

Raspbian (http://www.raspberrypi.org/downloads/) come with a number of demo program for the GPU, Broadcom VideoCore, in /opt/vc/src/hello_pi.

Building on Pi

To build the test apps on the pi, first build the libs:
make -C libs/ilclient
make -C libs/vgfont

then by entering each test app directory and run make. E.g.
  cd hello_world

Running ./rebuild.sh will rebuild the all libs and and apps.

Building on a different PC

If you want to build the samples on a different machine (cross-compile) then set:
SDKSTAGE=<path/to/firmware-directory> and CC=<path/to/cross-compiler>
before running make.

To build all the demo program, switch to the folder /opt/vc/src/hello_pi, enter command:
$ ./rebuild.sh

Press Ctrl+C to exit running demo program.

No comments: