From: Dave H. <dhy...@gm...> - 2007-10-23 14:03:00
|
Hi Anil, > I have compiled a file on my linux machine for dialing out from the > serial terminal of gumstix. > > Now i want it to load on my gumstix board and execute it.Also > please tell me that when i compile using gcc then i > get a .o extension .so can i use this fuile to load on my gumstix > board. So, you probably want to work your way through the hello-world example over here: <http://docswiki.gumstix.com/Sample_code/C/Hello_World> Assuming you have an intel based host machine running linux, then gcc produces x86 code, which won't run on the gumstix. You need to use the arm-linux-uclibcgnueabi-gcc compiler which can be found in the gumstix-buildroot/build_arm_nofpu/staging_dir/bin directory after you've built buildroot successfully. Here's a web page that has some introductory material to programming in C: <http://aplawrence.com/Linux/c_compiling_linux.html> .o files are object files, which contain unresolved references. Executables are basically a collection of object files which are linked together to resolve the unresolved references. Under linux, executable normally don't have an extension. Under windows the equivalent file types would be .obj and .exe When you have an executable program to run on the gumstix, you can check to see if it's the right type by using the file command. Running "file hello" on the hello-world example produces: hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped Running "file hello" on an exectuable produced by gcc produces: hello2: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux 2.6.4, not stripped -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |