Hi Guys, I have just bought a single board computer that has an atmel AT91SAM9260 ARM9 core onboard. Linux is also installed on this core. I am trying to get started, but am having real problems with the cross compiling. I am currently running windows and am using cygwin as my shell. I have downloaded this file from the GNUarm website "bu-2.17_gcc-4.1.1-c-c++_nl-1.14.0_gi-6.5" and installed this. I can compile a simple hello world .c file and transfer over to the SBC, but then I get the error "illegal instruction" when I try to run it. Below is my process carried out... Installed cygwin and GNUarm file above wrote hello world file in text editor and saved as .c using command arm-elf-gcc test.c it converted the .c file into an a.out file transferred binary file to SBC via USB typed command ./a.out and got error "illegal instruction" If anyone could help with this I'd be very grateful, I have spent hours trying to figure this out and have gone nowhere
Are you sure that you are actually compiling a Linux executable, not a "bare metal" application? A system with Linux installed on it needs differently compiled applications compared to a system without any OS.
Hi Guys, thanks for the quick responses. You can find the SBC here just to try and remove some of the confusion with regards to sebastian's comment... http://www.glomationinc.com/product_9260.html However I have literally just got this working, the file i found was here... http://www.tomtom.com/page.php?Page=gpl#toolchain I am still very unsure how these toolchains work though, could someone explain the concept to me as I really don't understand why the toolchain i had before didn't work, but the one i currently have does work. Just to clarify my system... Windows XP OS Cygwin bash shell toolchain above SBC with ARM9 core, embedded linux installed.
I guess you are using the "Cygwin x86 toolchain". I wonder why there are two different Linux toolchains - one seems to be meant for a different chip type. Not sure if the Cygwin version supports both. Your board manufacturer, Glomatic, mentions a toolchain ("Linux cross development tool chain") in the product specification. Are you absolutely sure that you got the right one? The TomTom toolchain may be customized for a different system. Just a thought.
hi, thanks for the reply, it is indeed the cygwin x86 toolchain you can find the arm cross development tool chain that glomation refer to here "http://www.glomationinc.com/support.html" However there are 3 toolchains... Generic-arm_gcc-4.2.3-glibc-2.3.3.tar.bz2 - generic linux PC e.g. debian, suse etc to compile to SBC arm-elf-gcc-3.2.1-full.tar.bz2 - compiling direct to arm processor with no linux? arm-linux-gcc-3.3.tar.bz2 - seems to be for a linux PC compiling to SBC i tried arm-elf and arm-linux, arm-elf compiled but didnt execute and i couldnt even compile arm-linux please let me know your thoughts
the toolchains with linux in the filename dont work, because when extracted they create binary files, which aren't understood. the elf toolchain and the one from tomtom create .exe files when extracted and so run under windows, does this help? I presume that the binary files don't work, because they are linux versions of windows exe's and so cannot run on windows?
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.