LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 11-09-2009, 05:02 AM   #1
raphtor
Member
 
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 file.now i need to build it so that i can write data to display on board.so 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
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

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

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

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:54 AM.

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