uClinux compiler

38 views
Skip to first unread message

Alex

unread,
Feb 2, 2012, 6:46:21 AM2/2/12
to pico-SAM9G45 Mini-Box.com ARM embedded system board
Hello
I would like to compile a program for my pico-SAM9G45 using uClinux
CodeSourcery G++ Lite.
How I have to set the option :
-march= ??????
-mcpu= ?????

Alex

Daniel Palmer

unread,
Feb 2, 2012, 7:04:05 AM2/2/12
to pico-s...@googlegroups.com
Why do you want to use uClinux? (I think everything that was uClinux
is in the mainline kernel now any how).. The ARM core in the SAM9G45
has an MMU so it can run a "real" kernel and crippling yourself with
ulibc makes no sense on the Pico because it has 256MB of RAM.

Anyhow ..

From the GCC docs:

-march=name<snip snip>
Permissible names are: `armv2', `armv2a', `armv3', `armv3m', `armv4',
`armv4t', `armv5', `armv5t', `armv5te', `armv6', `armv6j', `iwmmxt',
`ep9312'.

From my machine ..

daniel@ein:~$ cat /proc/cpuinfo
 Processor : ARM926EJ-S rev 5 (v5l)
BogoMIPS : 199.06
Features        : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture : 5TEJ

So I would guess you want armv5te. If you want your binaries to run on
almost any ARM9 machine you want one of the armv4 options however.

Alex

unread,
Feb 2, 2012, 7:10:54 AM2/2/12
to pico-SAM9G45 Mini-Box.com ARM embedded system board
In that case , what is the best compiler for Linux Angstrom over pico-
SAM9G45 ?


Daniel Palmer

unread,
Feb 2, 2012, 7:25:06 AM2/2/12
to pico-s...@googlegroups.com
There should be a way to install GCC (CodeSourcery is basically the
same thing) on Angstrom.. If there isn't a precompiled GCC as long as
you have headers you can build binutils and gcc from source. If you
are going to do lots of work on the machine itself you might want to
install Debian instead of Angstrom so that you can get access to all
the libraries etc you want out of the box.

Alex

unread,
Feb 2, 2012, 7:48:11 AM2/2/12
to pico-SAM9G45 Mini-Box.com ARM embedded system board
What's about crosscompiler ? They are not so flexible ?

Daniel Palmer

unread,
Feb 2, 2012, 8:08:20 AM2/2/12
to pico-s...@googlegroups.com
Compiling a cross compiler isn't impossible, but it gets nasty when
you have lots of libraries etc that you want to use. If you are
running Debian or Ubuntu you can use the supplied cross compilers
(Debian has a massive set of them in emdebian).. and there are tools
to pull in libraries etc from the ARM versions of the distro so that
you can link with them.

bdutta

unread,
Feb 20, 2012, 7:41:43 AM2/20/12
to pico-SAM9G45 Mini-Box.com ARM embedded system board
On Feb 2, 5:04 pm, Daniel Palmer <danier...@gmail.com> wrote:
> Why do you want to use uClinux? (I think everything that was uClinux
> is in the mainline kernel now any how).. The ARM core in the SAM9G45
> has an MMU so it can run a "real" kernel and crippling yourself with
> ulibc makes no sense on the Pico because it has 256MB of RAM.
>
> Anyhow ..
>
> From the GCC docs:
>
> -march=name<snip snip>
> Permissible names are: `armv2', `armv2a', `armv3', `armv3m', `armv4',
> `armv4t', `armv5', `armv5t', `armv5te', `armv6', `armv6j', `iwmmxt',
> `ep9312'.
>
> From my machine ..
>
> daniel@ein:~$ cat /proc/cpuinfo
>  Processor           : ARM926EJ-S rev 5 (v5l)
> BogoMIPS           : 199.06
> Features              : swp half thumb fastmult edsp java
> CPU implementer : 0x41
> CPU architecture  : 5TEJ
>
> So I would guess you want armv5te. If you want your binaries to run on
> almost any ARM9 machine you want one of the armv4 options however.
>

Apparently a few mass-produced, very application specific ARM9 based
designs use uClinux, allowing for a leaner-meaner OS. Although, having
heard the argument that much of uClinux has already found it's way
into the mainstream linux kernel, I wonder if the benefit of "lean-
mean" still exists.

Daniel Palmer

unread,
Feb 20, 2012, 8:10:02 AM2/20/12
to pico-s...@googlegroups.com

Apparently a few mass-produced, very application specific ARM9 based
designs use uClinux, allowing for a leaner-meaner OS. Although, having
heard the argument that much of uClinux has already found it's way
into the mainstream linux kernel, I wonder if the benefit of "lean-
mean" still exists.


I'm not sure if uClinux for ARM has made its way into the kernel.. I.e. I'm not sure if you can run linux on a ARM7TDMI microcontroller.. but for m68k at least the uClinux stuff is in the mainline, and I got the impression when I asked about porting linux to a new mmu-less m68k board that uClinux and Linux are now basically the same thing. 

There's nothing to stop you taking the mainline linux source and building a userland that uses ulibc instead of glibc if you are short on memory. For some boards like the Bifferboard that only have 32MB of RAM ulibc and a custom userland are essential but I don't think it makes a lot of sense for the Pico because it has 256MB of RAM (I can still remember when that was a lot for a desktop). The Pico isn't limited to some tiny amount of flash rom for storage either.
Reply all
Reply to author
Forward
0 new messages