Compiler for CFA 910

jdmulloy

New member
Can anyone give me guidance on setting up a compiler for the CFA 910? I found that gcc wasn't installed by default on the CFA 910, I'll try installing it from the package manager. Are there any instructions for setting up a cross compiler?
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

jdmulloy

New member
I managed to install the gcc package through opkg but it doesn't provide a "gcc" command. I tried compiling a Hello World program with "arm-angstrom-linux-gnueabi-gcc" but it complains about not being able to execute cc1. Are there other packages I need to install to get this to work?
 

CF Support

Administrator
Greetings,

GCC does not come installed on the CFA-910. We customarily do not compile right on the CFA-910. Usually we use a cross-compiler as built from the Angstrom tool chain on a host computer.

You can build you tool chain by following the Angstrom build instructions at:
https://www.crystalfontz.com/forum/showthread.php?t=6813

This will rebuild all the tools for building for the CFA-910 (including cross-compilers) as well as its applications and libraries.

You may have some luck with pre-built opkgs. From what you have said, it sounds like you may need another gcc package to provide the c backend compiler or to set up the links and/or paths for the toolchain.
 

jdmulloy

New member
We have the tool chain built and we are able to compile basic C programs, but I can't figure out how to compile a GTK application. We've been using the compiler in "angstrom/tmp/cross/armv5te/bin" and it's been working but I'm not sure that is the correct way to compile things. Are there any instructions on the right way to compile programs for the CFA?
 

jdmulloy

New member
I figured out how to get compile GTK program and I have been able to compile and run a GTK application on the CFA.

Here's my Makefile in case anyone else needs to figure this out in the future.

Code:
PATH=/data/angstrom/tmp/cross/armv5te/bin:/data/angstrom/tmp/sysroots/i686-linux/bin:/data/angstrom/tmp/sysroots/i686-linux/usr/bin:$PATH

vpath %.h ./inc
vpath %.c ./src

all: gtk_fe.arm

gtk_fe.arm:
	arm-angstrom-linux-gnueabi-g++ -Wall -I ./inc `pkg-config --cflags --libs gtk+-2.0 | /bin/sed s/i686-linux/armv5te-angstrom-linux-gnueabi/g` -L/data/angstrom/tmp/sysroots/armv5te-angstrom-linux-gnueabi/lib ./src/main.cpp -g -o gtk_fe.arm
	
clean: 
	rm gtk_fe.arm
 
Top