install Pre-Built Croostool-Olimex CS-EP9302??????

HI…

i have the Olimex CS-EP9302 board. it is shipped with a package called “crosstool-linux-gcc-4.0.1-glibc-2.3.5.tar.bz2”.

this is suppoded to be a prebuilt toolchain.

I ma facing problems to install it. also it has not any ReadMe or Install guides.

does any one have installed it before? or any clues?

thanks

If it’s the same file that can be found on [ftp.embeddedarm.com, do

tar xjCf / crosstool-linux-gcc-4.0.1-glibc-2.3.5.tar.bz2

as root.

It will unpack into /opt/crosstool](ftp://ftp.embeddedarm.com/old/ts-arm-linux-cd/cross-toolchains/)

Hi,

yes is the same…after i unpack it, do i need to install it? fi yes, plz How?

thansk

Are you aware that this package is not for Windows?

Hi.

denial:
Are you aware that this package is not for Windows?

Lol, yes I am working Ubuntu

( i am new to Linux generally.)

Q1.I completed the unpacking. After that what are other procedures i have to do? (i think like adding the PATH, .bashrc, etc…)

Q2. I found i text file “arm-unknown-linux-gnu.crosstoolconfig.txt” contains many deatils like

.

TARGET=arm-unknown-linux-gnu

TARGET_CFLAGS=-O

.

.

does this mean that whenever i want to compile a code lets say “LED.c”

i have to type on command line:

arm-unknown-linux-gnu-gcc -c test test.c

Thanks

raedbenz:
Q1.I completed the unpacking. After that what are other procedures i have to do? (i think like adding the PATH, .bashrc, etc…)

You can add /opt/crosstool/gcc-4.0.1-glibc-2.3.5/bin to PATH, /opt/crosstool/gcc-4.0.1-glibc-2.3.5/man to MANPATH, and /opt/crosstool/gcc-4.0.1-glibc-2.3.5/info to INFOPATH, but it will work without.

Q2. I found i text file “arm-unknown-linux-gnu.crosstoolconfig.txt” contains many deatils like

.

TARGET=arm-unknown-linux-gnu

TARGET_CFLAGS=-O

.

.

These are the options that were used to build the package with [crosstool.

does this mean that whenever i want to compile a code lets say “LED.c”

i have to type on command line:

arm-unknown-linux-gnu-gcc -c test test.c

No,

arm-unknown-linux-gnu-gcc -c LED.c

:slight_smile:

Tab completion is your friend.](Building and Testing gcc/glibc cross toolchains)

HI Denial

i have added the th epath using this code:

export PATH=/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-gnu/bin:${PATH}
``` and i didnt get any errors

then when i type 

raed@raed-laptop:~/projects$ arm-unknown-linux-gnu-gcc -c LED.c

i get this error msg: 

bash: arm-unknown-linux-gnu-gcc: command not found
raed@raed-laptop:~/projects$

Did it unpack into /opt/crosstool?

It should have when calling tar with “xjCf / …”.

denial:
Did it unpack into /opt/crosstool?

It should have when calling tar with “xjCf / …”.

yes it did.

here is the full path:```
/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-gnu

how can i know if the PATH is correctly added? may be thats the problem

have u tried it on ur PC?

thanks

raedbenz:
how can i know if the PATH is correctly added? may be thats the problem

```
echo $PATH

Did you execute arm-unknown-linux-gnu-gcc in the same shell where you entered the export command?

To make it permanent it must be added to /etc/profile

denial:

raedbenz:
how can i know if the PATH is correctly added? may be thats the problem

```
echo $PATH

Did you execute arm-unknown-linux-gnu-gcc in the same shell where you entered the export command?

To make it permanent it must be added to /etc/profile
Hi thanks a lot it works fine now..

more over.

Q1. some times when i type "echo PATH " i get only the word PATH, why?

Q2. is there a configuration file that i can edit it, and change the command from arm-unknown-linux-gnu-gcc to sthg simpler like ```
arm-linux-gcc


Q3. do i have to specify the architecture of target e.g. for ARM EP93xx, using the "-mcpu=arm920t"? 

thanks

raedbenz:
Q1. some times when i type "echo PATH " i get only the word PATH, why?

You need to give it some money.

Q2. is there a configuration file that i can edit it, and change the command from arm-unknown-linux-gnu-gcc to sthg simpler like ```
arm-linux-gcc

There is no configuration file but you can create links that point to the long filename.

cd /opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-gnu/bin
ln -s arm-unknown-linux-gnu-gcc arm-linux-gcc

Q3. do i have to specify the architecture of target e.g. for ARM EP93xx, using the “-mcpu=arm920t”?

Use -march=ep9312 (there is no -march=ep9302).

Don’t use -mfpu=maverick, it will not work with the math library on the system and [is known to give incorrect results.](MaverickCrunch - Wikipedia)

HI, :slight_smile:

what do u mean with:

You need to give it some money.

Q1. Moreover i have found this pdf file http://www.idt.mdh.se/kurser/cdt214/lab4.pdf ,if u look to page 4, there is a hello wrold code for embedded linux.

does the printf () executes on my embedded linux? which directories of my kernel mentions the supported libraries for my Architecture?

Q2. Can i send this executable (a.out) to the /tmp directory as mentioned in the pdf file above(middle of page 4) using serial port? if yes how?

Note:if u know a better code to start with for beginners(like blinking an LED on CS-E9302) plz let me know.

thanks

raedbenz:
what do u mean with:

You need to give it some money.

echo [u]**$**[/u]PATH

does the printf () executes on my embedded linux?

It’s a lot of work to build a useful Linux system without printf and it only saves a few kilobytes. I doubt they did it.

which directories of my kernel mentions the supported libraries for my Architecture?

You mean which libraries are on your flash?

Can i send this executable (a.out) to the /tmp directory as mentioned in the pdf file above(middle of page 4) using serial port? if yes how?

Uhm, I’ve never worked with that board.

What serial protocol does it use?

Plain serial console?

PPP?

SLIP?

If it’s a plain console, it depends on what is installed on the flash.

For copying a single file I’d use [rz.

There are ways to “upgrade” a console to a network connection but it’s probably easier to just connect via ethernet.](http://linux.die.net/man/1/rz)

HI Daniel…

which directories of my kernel mentions the supported libraries for my Architecture? You mean which libraries are on your flash?

yes i mean the libraries on flash.
Q2. Can i send this executable (a.out) to the /tmp directory as mentioned in the pdf file above(middle of page 4) using serial port? if yes how?

Assume i send the executable (a.out) to the /tmp directory using a RS232 for time being?? Bcoz i want to run on my Olimex board CS-E9302 a simple task, like flashing LED, do u have any idea how(where are the files that control the GPIO of the ARM)?

From your other thread I read that you get a shell with busybox.

Use your terminal program to upload the file with the xmodem protocol.

In Linux there is minicom instead of Hyperterminal.

Before you can execute a.out, you need to do```
chmod a+x a.out


To get a list of all dynamic libraries, do```
/sbin/ldconfig -p

I don’t know if the Olimex kernel contains drivers to expose the GPIO lines as device files.

denial:

raedbenz:

Q3. do i have to specify the architecture of target e.g. for ARM EP93xx, using the “-mcpu=arm920t”?

Use -march=ep9312 (there is no -march=ep9302).

Hi daniel

why u told me not to use “-mcpu” option and to use “-march” ? based on what exactly?

Moreover, my busybox installed, if u type “help” u see all supported commands.here they are:

~ # help

Built-in commands:
-------------------
\0x09. : alias bg break cd chdir continue eval exec exit export false
\0x09 fg getopts hash help jobs kill let local pwd read readonly return
\0x09 set shift times trap true type ulimit umask unalias unset wait

hence how can i send codes to my board instead of “rz” ?

thanks

raedbenz:
why u told me not to use “-mcpu” option and to use “-march” ? based on what exactly?

-mcpu only reorders instructions for the selected cpu

-march additionally enables instructions that may not be supported on the default architecture

~ # help

help does not list all available commands. As it says, only the ones built into the shell.

What does it do if you try to execure “rx”?

denial:

raedbenz:
What does it do if you try to execure “rx”?

Hi,

when i type these commands in cutecom , i get:

~ # rz
-sh: rz: not found
~ # rb
-sh: rb: not found
~ # rx
-sh: rx: not found

any help plz.

e.g. i want to transfer “hello.out” to “/tmp” of my embedded linux

thanks