LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-09-2010, 05:26 AM   #1
ramitwadhwa
LQ Newbie
 
Registered: Sep 2010
Posts: 11

Rep: Reputation: 0
Question freeware sdk for ARM development such as mobile etc...


i would like to use a sdk or compiler to run/execute a program on ARM type processors but to compile the programs in desktop PC.
the sdk or compiler should be a freeware.
 
Old 09-09-2010, 06:19 AM   #2
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 492

Rep: Reputation: 50
It looks like you haven't searched so much...
As compiler you have GCC which is able to compile code for ARM architecture.
If by SDK you need libraries, OS services etc... Many flavor of linux run on ARM (see embedian for example), and if linux is oversized take a look to eCos and other freeRTOS
 
Old 09-09-2010, 12:15 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
To do cross development, you will want to use a cross toolchain (hint: Google search term). You can build one, using Crosstool-NG. It can support Linux or bare-metal architectures (many some other OS's; not sure). It is probably possible to integrate the cross toolchain into Eclipse, to create what I guess most would call a SDK. AFAIK, most cross development is done simply with commandline tools and Makefiles.

--- rod.
 
Old 09-13-2010, 01:14 PM   #4
ramitwadhwa
LQ Newbie
 
Registered: Sep 2010
Posts: 11

Original Poster
Rep: Reputation: 0
what next...

thanks for ur reply

i have downloaded buildroot now what should i do next
 
Old 09-13-2010, 02:11 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Well, assuming you have unrolled the tarball to a suitable location, you would read the documentation in the docs/ directory. buildroot.html seems like a good place to start. Having done that, the following steps should reveal themselves.

Incidently, what made you choose buildroot?

--- rod.
 
Old 09-13-2010, 08:15 PM   #6
ramitwadhwa
LQ Newbie
 
Registered: Sep 2010
Posts: 11

Original Poster
Rep: Reputation: 0
i have performed 'make' successfully and also there are some files in the './output' dir.
how should i use them and what should i do next.

also i have downloaded qemu how should i use it.

basically how should i write my 1st program for ARM device, compile it and see the result.

Last edited by ramitwadhwa; 09-14-2010 at 11:51 AM.
 
Old 09-15-2010, 01:25 PM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Somewhere in the buildroot doc's it should describe where the toolchain that you specified will get built. It will probably be a directory containing other tools such as linkers, assemblers, debuggers, etc. It will have a name composed of the tuple describing the target architecture, perhaps something like armeb-linux-uclib-gcc. Simply use that to compile your source code. The use of a basic Makefile will simplify matters:
Code:
GNU_PREFIX = arm-ctng142-linux-gnu
GNU_PATH   = /usr1/local/support/Xtools/$(GNU_PREFIX)
SYSROOT    = $(GNU_PATH)/$(GNU_PREFIX)/sys-root
CC         = $(GNU_PATH)/bin/$(GNU_PREFIX)-gcc

CFLAGS  += -fPIC -g --verbose
LDFLAGS += -Bstatic
then...
Code:
make helloWorld
This simply leverages the built-in conventions of make to understand the meanings of certain macros, and saves you from typing/remembering where everything is. Of course, the actual directory and filenames will need to be changed to reflect what you have actually installed.

You can/should add specific rules to the Makefile to describe how to build your application.

Can't help you with the details of running your code under qemu. Sorry.


--- rod.

Last edited by theNbomr; 09-16-2010 at 12:30 PM.
 
Old 09-16-2010, 12:26 PM   #8
ramitwadhwa
LQ Newbie
 
Registered: Sep 2010
Posts: 11

Original Poster
Rep: Reputation: 0
thanks that was help full...
i ll ask more Qs as i get stuck in the way...till then thanx
 
Old 09-17-2010, 02:13 AM   #9
ramitwadhwa
LQ Newbie
 
Registered: Sep 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by theNbomr View Post
...., perhaps something like armeb-linux-uclib-gcc. Simply use that to compile your source code.....

--- rod.
i have copied my program Hello.c in the buildroot/output/..../bin.
bin dir contains arm-linux.gcc, ~-ld,.... as u mentioned.
i manually performed ./arm-linux-gcc hello.c
a.out is created.

now how do i execute this a.out. when i type ./a.out(as done for normal programs) i get an error :not able to execute binary file.

please suggest a method of how can i view my executable
 
Old 09-17-2010, 08:53 AM   #10
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Since the executable binaries created by your cross compiler are targeted to an ARM host, you can only run them on such a host. As you mentioned earlier, you can use an emulator, such as Qemu.
--- rod.
 
Old 10-07-2010, 11:52 AM   #11
ramitwadhwa
LQ Newbie
 
Registered: Sep 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by theNbomr View Post
Since the executable binaries created by your cross compiler are targeted to an ARM host, you can only run them on such a host. As you mentioned earlier, you can use an emulator, such as Qemu.
--- rod.
i have copied a simple program and executed it successfully on a qemu emulator by typing the command './hello.out'. but i want to run this program at the boot time automatically without the user login etc. i have tried to experiment with inittab but could not do the needfull.
 
  


Reply

Tags
arm, basics, embedded, programming


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
LXer: Samsung's mobile OS SDK ships, runs on Linux LXer Syndicated Linux News 0 12-08-2009 10:10 PM
Two ARM Cortex-M3 Boards for embeded development kennyfly899 Linux - Hardware 1 07-03-2009 07:41 AM
ARM development platforms and BSP rsashok Linux - Embedded & Single-board computer 3 09-27-2008 04:32 AM
LXer: Development tools accelerate the ARM race LXer Syndicated Linux News 0 04-29-2006 11:33 AM
Mobile programming / ARM unholy Programming 2 03-14-2005 07:48 AM


All times are GMT -5. The time now is 05:04 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration