Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-09-2009, 05:02 AM   #1
Registered: Aug 2008
Location: india
Posts: 174

Rep: Reputation: 30
using gcc built for arm for building a .c file

i have to interface a display on limex dev board using SPI interface.i downloaded the library for the interface which has a spi.c driver i need to build it so that i can write data to display on how do i use this arm toolchain i built for arm which also has gcc for arm to build?
Old 11-09-2009, 09:46 PM   #2
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 128Reputation: 128
On the arm device or with a cross compiler correctly configured:
gcc spi.c -o outputFile
Old 11-10-2009, 09:08 AM   #3
Registered: Aug 2008
Location: india
Posts: 174

Original Poster
Rep: Reputation: 30
k but the problem is its not a single c has some .h supporting files.a make file would be convienient but its i need to compile it to produce a main.bin without using do i do that?
Old 11-11-2009, 05:51 PM   #4
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,698

Rep: Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291
Just place the ' spi.c ' in a new empty folder
together with all headers.h .

And if not already done, add these #include lines to spi.c :

.. like this .. the quotes tell : look for the headers in the spi.c directory.

#include "header.h"
#include "header2.h"
#include "header3.h"

.. and then ..
cd new/
gcc spi.c -o main.bin

Last edited by knudfl; 11-11-2009 at 07:14 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile the linux2.6.14.1 for arm must ues the arm-linux-gcc-3.4.4? frankyue Linux - Embedded & Single-board computer 2 12-20-2008 07:28 AM
Problem in building the GNU-ARM compiler abhi123 Linux - Kernel 0 09-29-2006 03:09 AM
building on suse 9 using some libraries built on RH? nkshirsagar SUSE / openSUSE 1 05-06-2005 03:41 PM
running software built with gcc 3.0.2 on Redhat 8 - gcc 3.2 dst1989 Linux - Software 3 03-08-2004 10:23 PM
a doubt with host gcc and arm-linux-gcc renjithgopal Linux - General 1 09-11-2003 04:02 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration