LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   freeware sdk for ARM development such as mobile etc... (http://www.linuxquestions.org/questions/linux-newbie-8/freeware-sdk-for-arm-development-such-as-mobile-etc-831157/)

ramitwadhwa 09-09-2010 05:26 AM

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.

jf.argentino 09-09-2010 06:19 AM

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

theNbomr 09-09-2010 12:15 PM

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.

ramitwadhwa 09-13-2010 01:14 PM

what next...
 
thanks for ur reply

i have downloaded buildroot now what should i do next

theNbomr 09-13-2010 02:11 PM

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.

ramitwadhwa 09-13-2010 08:15 PM

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.

theNbomr 09-15-2010 01:25 PM

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.

ramitwadhwa 09-16-2010 12:26 PM

thanks that was help full...
i ll ask more Qs as i get stuck in the way...till then thanx

ramitwadhwa 09-17-2010 02:13 AM

Quote:

Originally Posted by theNbomr (Post 4098515)
...., 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

theNbomr 09-17-2010 08:53 AM

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.

ramitwadhwa 10-07-2010 11:52 AM

Quote:

Originally Posted by theNbomr (Post 4100610)
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.


All times are GMT -5. The time now is 06:46 AM.