EmbDev.net

Forum: ARM programming with GCC/GNU tools Building compiler stuff for embedded device


von Andrew K. (top_sli)


Rate this post
useful
not useful
Hi!

I am trying to use "WinARM-20060606.exe" for my purposes, and have
problem ofc.

There is an Embedded Device based on Atmel AT91SAM9260. It boots up a
modified uCLinux. This product has got a full developer environment for
Linux (eclipse based IDE, and "arm-linux-gcc" compiler). I wanna compose
something compiler tool for Windows (ofc without eclipse, java, cygwin
and others, simple native command line compiler will be welcome).

Thought simple cut Linux environment's include & lib materials, paste it
into WinARM (i need windows executable gcc), and probably it will work.
It doesn't. Materials changed in:
\WinARM\lib
\WinARM\include
\WinARM\arm-elf\lib
\WinARM\arm-elf\include

Whole directory structure replaced. Test program is only one line in
main.c:

int main(void) {return 0;}

Compiler says o.k. (hehh, what else?), but linker sends error message:

d:/winarm/arm-elf/bin/ld.exe: crt0.o: No such file: No such file or
directory
collect2: ld returned 1 exit status

I have "crt1.0", "crti.o", "crtn.o" in d:\WinARM\arm-elf\lib\ folder,
but
really have not "crt0.o" there :((

Well, main question is: is this idea very bad, or has it got some chance
?

von Martin T. (mthomas) (Moderator)


Rate this post
useful
not useful
Uff, this approach somehow looks like banging on some iron and plactic
with a hammer and expecting that it will turn into a car someday. Even
if parts of the "bare metal" WinARM can be reused "Material changed" is
not enough information.

I expect the reason for the error is that the linker looks for the
default startup for the "changed" libc in another directory (not
arm-elf). Which libc is used in the given Linux cross-toolchain?

Just try the prebuild cross-toolchain from Codesourcery for ARM/ucLinux
first. A package for Win32 hosts is available from
http://www.codesourcery.com/gnu_toolchains/arm/portal/release645 . The
lite version is free.

BTW since you are using a SAM9260 why ucLinux and not "full" Linux.

von Andrew K. (top_sli)


Attached files:

Rate this post
useful
not useful
Hi Martin !

Thank you for help. Also i know, this first step was such as a
barbarism, but this was the first step.

> I expect the reason for the error is that the linker looks for the
> default startup for the "changed" libc in another directory (not
> arm-elf). Which libc is used in the given Linux cross-toolchain?

I found folder names in target environment "4.1.1", so i guess, that is
also a 4.1.1 version lib as in WinARM 06/2006, but directory structure
seems different. Very different at some point. Attached file here is the
result of "ls -alR ./cdt >full_dir.txt" winRARed (240K -> 29K). That
directory contains the compiler's binaries & headers & libs & others.

I am newbie in compiler's world. I use compilers for build up programs
since many years, but this is the first time, my target is the compiler
itself.

> Just try the prebuild cross-toolchain from Codesourcery for ARM/ucLinux
> first. A package for Win32 hosts is available from
> http://www.codesourcery.com/gnu_toolchains/arm/portal/release645 . The
> lite version is free.

Target compiler's result:
ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14,
dynamically linked (uses shared libs), for GNU/Linux 2.6.14, stripped

CodeSourcery Lite gave me this as default:
BFLT executable - version 4 ram

CS's directory structure seems much more difficult than WinARM, and not
the best result. Something doc will be great about that stuff, but i not
found.

> BTW since you are using a SAM9260 why ucLinux and not "full" Linux.

Hmm, main purpose is let the developer environment more comfortable.
Replace the full system not the same. Much job, and why ? Can it help
something ? ucLinux already supported by the manufacturer. My problem is
the compiler.

von Martin T. (mthomas) (Moderator)


Rate this post
useful
not useful
Andrew Kocsis wrote:

>...
>> BTW since you are using a SAM9260 why ucLinux and not "full" Linux.
>
> Hmm, main purpose is let the developer environment more comfortable.
> Replace the full system not the same. Much job, and why ? Can it help
> something ? ucLinux already supported by the manufacturer. My problem is
> the compiler.

Could you please send a link to the manufacturers support pages? Maybe
they provide some information on how they have built the cross-toolset.
Maybe I can help if I can see this information.

von Andrew K. (top_sli)


Rate this post
useful
not useful
Martin Thomas wrote:
>
> Could you please send a link to the manufacturers support pages? Maybe
> they provide some information on how they have built the cross-toolset.
> Maybe I can help if I can see this information.

This product:

http://sysbas.com/e-Products/?sNum=400

Look for "Eddy-S1/DB9 v2.0" & "Eddy-S1/PIN v2.0" on this page. All these
products based on a CPU module, and it has got a "motherboard".

Manufacturer didnt release hardware reference manual or so, but cpu
module uses atmel at91sam9260 processor, and sst39vf3201 flash.

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
No account? Register here.