Cross C compiler for LINUX based boards
Hi all
As a newbe to LINUX based embedded bords, I need to understand the concept of C cross compilers . How c code is written on those cross compilers ? Do I have to include LINUX header files at design time, so I can write tasks and threads within the C code? Example of C cross compiers for LINUX based SBC boards ? Elico |
to make it simple: you write your code as usual, you compile and build your code as usual, the only difference is that the target environment is not the local system but another one. You need to have platform specific headers and platform specific compiler (you need to install this cross-compiler, headers and all the related stuff).
|
Thanks
Elico |
The process of creating a cross compiler or more accurately, cross toolchain, is not trivial. If you do not already have one, I suggest using something such as Crosstool-NG and others, to aid you. You will need to understand some key things about your target environment, such as the hardware architecture (CPU and CPU variant type, and perhaps other CPU factors such as MMU and FPU), OS if present, standard C library, and some build-host based factors. It is not quite as simple as a complete mix & match of toolchain components, as the cross dependencies are abundant. If building a cross toolchain, be prepared to spend a considerable time trying different combinations before you find one that works for your build-host and target. Don't even think about trying to build one yourself.
--- rod. |
Thanks
Elico |
All times are GMT -5. The time now is 12:17 AM. |