Hello!
I am using Eclipse on Ubuntu 13.04 x64 and would like to setup a project for cross-compilation for ARM, but I'm quite clueless as how to do it, being a comple te n00b with these 'embedded' things, I find myself staring in disbelief at the screen, unable to get a simple "Hello World" program to compile through and through.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!";
return 0;
}
I've downloaded Sourcery CodeBench and the GNUARM plugin for Eclipse to use that toolchain, but failed to build a correct elf image, because the linker complains about not finding a __start symbol. If I try to execute the file (Test.elf) on the board, the terminal complains that the file itself cannot be found (!!!) even though I have rwx permissions on it and have chown-ed it. I have also downloaded Linaro and GNUARM toolchains. Building with those outputs a slew of warnings and/or errors that I have not (and SHOULD NOT EVER) seen before. (like: invalid floating point option -mfpu=vfpv3, or: bad value -march=armv7-a -- not supposed to happen)
My question is, can you guide me in the right direction of setting up a toolchain (environment variables and makefiles is fine, if not with Eclipse), because scouring the Internet has left me wanting for something that is more specific to imx.
Kind Regards,
Peter
解決済! 解決策の投稿を見る。
There are several toolchains you can use. You can try the one installed by LTIB, or the one compiled (yes, compiled) by Yocto. For the Yocto case, setup a Yocto system (there are many docs regarding this), then on the build folder thy these:
$ bitbake meta-toolchain
$ sh tmp/deploy/sdk/poky-eglibc-x86_64-arm-toolchain-1.4.1.sh
$ source /opt/poky/1.4.1/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi
$ arm-poky-linux-gnueabi-gcc -v
Now you can compile your hello world app.
Leo
For stand-alone applications it is needed to provide a start-up code (crt.s), linker file (.ld), minimal syscalls.c
that may be application dependent.
There are several toolchains you can use. You can try the one installed by LTIB, or the one compiled (yes, compiled) by Yocto. For the Yocto case, setup a Yocto system (there are many docs regarding this), then on the build folder thy these:
$ bitbake meta-toolchain
$ sh tmp/deploy/sdk/poky-eglibc-x86_64-arm-toolchain-1.4.1.sh
$ source /opt/poky/1.4.1/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi
$ arm-poky-linux-gnueabi-gcc -v
Now you can compile your hello world app.
Leo
If my application use Source file of other folders than from /opt/poky/1.8/ how to include these files in environment variable?
I am using Eclipse Yocto Autotool Project for application development.
In the project i can use function of any file from "/opt/poky/1.8/sysroots/cortexa9hf-vpf-neon-poky-linux-gnueabi/user/include".
But i want to use files from other directory. so i add paths in "C/C++ General/Path and symbols/include directories".
Now function reference can be found by eclipse. I can also Jump to relavent .h file by F3.
But when i compile i get "fatal error: No file or directory"
Finally! That + Yocto Project Development Manual did it.