Saturday, December 14, 2013

openFrameworks / pcDuino MFB Update 2

These instructions are for installing the latest copy of openFrameworks for pcDuino using the mali framebuffer and not X-windows. The instructions assume you are running in an ssh session and not on the console.

Make sure to read the post about changing debug levels for the mali and ump drivers or you will not get very good performance.

Install git

sudo apt-get install git

Setup the pcDuino to use Mali Framebuffer

git clone https://github.com/digitalhack/sunxi-mali.git
cd sunxi-mali
git submodule init
git submodule update
make config VERSION=r3p0 ABI=armhf EGL_TYPE=framebuffer
make
sudo make install
make test
sudo stop lightdm
sudo ./test/test


At this point you should see something that looks like this:

clip_image002

Setup openFrameworks

git clone https://github.com/digitalhack/pcDuino-openFrameworks.git
cd pcDuino-openFrameworks
git checkout -b pcDuino-dev origin/pcDuino-dev


Install Dependencies

sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libraw1394-dev libudev-dev gstreamer0.10-ffmpeg libopenal-dev libsndfile-dev libfreeimage-dev libcairo2-dev libgtk2.0-dev python-lxml python-argparse libfreetype6-dev portaudio19-dev libssl-dev libpulse-dev

Install Codecs

sudo apt-get install libmpg123-dev gstreamer0.10-plugins-ugly

Compile and run the pcDuino Hello World Program

cd ../../../apps/devApps/pcDuino_hello_world_gles2/
make PLATFORM_VARIANT=pcduinomfb
sudo ./bin/pcDuino_hello_world_gles2

At this point you should see a spinning pcDuino board on a yellow background.

clip_image004
If you have any questions or something doesn't work please leave a comment.

6 comments:

Anonymous said...

Very usefull tutorial. We forward your post to learn.linksprite.com. If you have any other new post about pcDuino(www.pcduino.com) or any other LinkSprite's(www.linksprite.com) products, please feel free to let us know. If you have a new post, could you please give us a backlink?

_fov said...

Thanks for this work. I have succesfully compiled it on another Allwinner A20-based board running cubian. Perhaps instead of calling it a pcDuino version, you might considder it a "sunxi" version?

Most examples work, though I don't seem to have access to the mouse and keyboard. Also the apps halt but don't exit when I send them a ctrl-c (I have to kill -9 them). Do you see them same on your pcDuino, or is this specific to my board/build?

digitalhack said...


Thanks for letting me know of your success. If it works across other sunxi boards I am all for changing the name.

On the pcDuino I both the keyboard and mouse work. To exit an application I have to use the ESC on the keyboard as the ctrl-c doesn't work for me either. As I have a keyboard and can press ESC I haven't worried about looking into it further yet.

There was an issue opened on github regarding a similar problem with the mouse and keyboard: https://github.com/digitalhack/pcDuino-openFrameworks/issues/1. After work today I plan to see what I can come up with to help troubleshoot it.

Anonymous said...

Hello

I am in the early stages of a project where I would have OF on a PCduino to monitor an engine (homebuilt airplane).

I have a prototype running under OS X - just the display and needles moving under keyboard control.
The executable is some 13 MB (compiled in release mode).
Actually, even the do-nothing sample executable is 12 MB...
I am concerned this might not fit on the PCduino.

If OF does not work I'll have to switch to some other PCduino supported graphics library...

Can you comment on this?

Thanks in advance.

CSa

digitalhack said...

CSa,

You didn't give me much to go on but based on the work that I did earlier this year I don't see any reason why the pcDuino / OF combination wouldn't work for you.

digitalhack

nandomtl said...

Digitalhack, thanks for the reply.

I suppose an executable package size depends on the target platform.

I guess I'll have to bite the bullet and change course if it does not work.

Happy New Year!

CSa