EmbDev.net

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


Author: Andrew Kocsis (top_sli)
Posted on:

Rate this post
0 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
?

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 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/por... . The
lite version is free.

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

Author: Andrew Kocsis (top_sli)
Posted on:
Attached files:

Rate this post
0 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/por... . 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.

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 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.

Author: Andrew Kocsis (top_sli)
Posted on:

Rate this post
0 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.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.