[beagleboard] Re: how to install ARM c compiler in Ubuntu 12.04 i am not able to find any package containing armcc ???

If you want to install gcc on your beagle board running Ubuntu use
"sudo apt-get install gcc". Although you probably what to use "sudo
apt-get install build-essential" which will install gcc as well as the
other important tools

- Jim

Not only gcc, "apt-cache search arm" will reveal a whole raft of ARM tools including rootstock.
Regards
Sid.

Why not just download the TI’s Linux EZSDK for BeagleBoard-xM (LINUXEZSDK-BBXM) from “http://www.ti.com/tool/linuxezsdk-sitara” and you got everything you need.

Tsan-Ming

2012/6/7 Sid Boyce <sboyce@blueyonder.co.uk>

@Josenivaldo Benito Junior

Can you throw some light on how to generate my own toolchain for ARMv7 cortex A-8 processor(BeagleBoard -xM) ??

because i installed and set the path variable requirements for the codesourcery tool chain which you adviced to download but when i tried to use it to compile my code it was throwing some error like
" /opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-gcc: cannot execute binary file"

i downloaded the package from here
https://sourcery.mentor.com/GNUToolchain/release1802?lite=arm

name is :- IA32 GNU/LINUX TAR (Advanced Packages)

i think this type of error is coming due to some architecture differences.

My OS is Ubuntu 12.04

Are you trying to run this on the Beagle? The CodeSourcery tools run only on
your standard [x86] desktop.

ohh so what is the best option for programming c on beagleboard ???

As Robert Nelson indicated (the very first reply on this thread):
   % sudo apt-get install gcc

This will install the GCC compiler (and other useful utilities) which run
on the BeagleBoard and also generate code for the ARM target.

I have already installed the GCC
but the c code compiled by GCC takes a hell lot of time to run
that’s why i was taking these cross compilation tool chains into consideration.

Why do you think a cross compiler should generate better/different code than
the compiler that's running natively on the BeagleBoard? The CodeSourcery tools
are just repackaged versions of GCC, so in fact the code should be identical.

Perhaps you should evaluate why the code in question is running so slowly.
Is there something special about it?

code has nothing special in it it is just doing the histogram normalization of a matrix
and time complexity of the algorithm i used is N*M for N by M matrix.
on beagleboard this code is running 25 times slower than on my laptop having intel processor
i understand that beagleboard has ARM processor which will be slow than intel processors but this much of performance problem should not be there.

How big are N & M?
What kind of values are they (float, fixed, ...)?
What operations are being performed?

Can you post the code?

N and M are just row and column sizes of the matrix.

all the operations are on integers only accept at one place i have done histogram calculation.

well i can post the code but i haven’t done the proper naming and all
but this is the link for my algorithm

http://en.wikipedia.org/wiki/Histogram_equalization

N and M are just row and column sizes of the matrix.

Yes, but how large are the actual values, i.e. how many rows and columns?

all the operations are on integers only accept at one place i have done histogram calculation.
well i can post the code but i haven't done the proper naming and all
but this is the link for my algorithm
Histogram equalization - Wikipedia

Please quote at least the part of the message you are replying to - not everyone
reads these messages using a web interface (especially not me). From the email
message itself, it's impossible to follow since I have no idea what you are
replying to.

25x slower is more than can be explaned by the difference in CPU clock rate, but there may be other reasons:

  1. Perhaps the problem is the time taken to read your data. Reading from SD card could be much slower than reading from a PC hard disk. Also the PC has more RAM for cacheing. Try to separate out reading data and doing your calculation and time them separately.

  2. Alternatively it could be a floating-point issue. You may need to enable the NEON instructions, see here:

http://elinux.org/BeagleBoard#ARM_Cortex-A8_Floating_Point

Hello Rajan,

You are probably using this “inside” the beaglebone right? This toolchain is meant to run on the X86 PC not on the ARM. If you want a toolchain to run in the beaglebone (that is already running ubuntu) you just need to use apt-get as mentioned before.

apt-get install build-essentials (please check late e-mails on this thread for details).

In time, sorry for late reply, it was holiday here in Brazil last Thursday so I went out with my family. Despite the rain it was amazing weekend. Sorry!

Regards,

cross compilation is the best way to do. Write you code on linux cross compile it and send it to your BBB