16-bit ucLinux?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View

The way I understand things, the thumb ISA in ARM processors is 16-bit
in nature. It is 16-bit in the data it handles and memory it addresses.
And yet the following link claims the Cortex M3 supports uCLinux.

http://linuxdevices.com/news/NS7814673959.html

Cortex M3 is Thumb-2 only, no ARM32 ISA. Thumb-2 is just Thumb with
some more extensions. Is the uclinux compilation for the Cortex the
first 16-bit Linux out there, or should we not call it 16-bit by the
virtue of the size of memory it can address?

Lastly if the addressable memory is not what makes the bits of a cpu,
can someone make a simplistic 8-bit core with enough instructions to
make it Turing-complete and able to address at least 1MB of memory to
boot uclinux?


Re: 16-bit ucLinux?
Quoted text here. Click to load it
No, the instructions are 16 bits each. The data and registers are 32- bits.
So it just an instruction compression technique.

Quoted text here. Click to load it
Addresses are still 32-bit.

Quoted text here. Click to load it
Your initial premise is wrong, and so the question doesn't apply.

Peter



Re: 16-bit ucLinux?
Ghazan,

 
Quoted text here. Click to load it

16bit == length of opcodes.

Quoted text here. Click to load it

No. Registers are 32 bits, even in thumb mode.

regards

Wolfgang


Re: 16-bit ucLinux?
Quoted text here. Click to load it

Being Turing-complete does not mean that any program can be compiled to
run on your cpu.  But it *does* mean that you can write a simulator for
a different target as a go-between.  So you can take your 8-bit PIC
(with sufficient amounts of external memory, of course), and write a
simulator for, say, an ARM CPU, and run ucLinux under the simulator.
There are probably better ways to spend your time, however.

Re: 16-bit ucLinux?
Quoted text here. Click to load it

Is there really a Linux for a Thumb-only ARM ? AFAIK, up till recently
there was no thumb used in the Kernel. No big problem for the pure C
sources, but there is a lot of ASM in the Kernel that is done in ARM32
ISA and would have to be ported manually.

-Michael

Re: 16-bit ucLinux?
Quoted text here. Click to load it

My understanding is that the Thumb-2 can assemble ARM (32) instructions to
their Thumb-2 equivalent. Thumb-2 (which has 16- and 32-bit instructions) is
essentially a recoding of the ARM ISA.

Peter



Re: 16-bit ucLinux?

Quoted text here. Click to load it

What does that sentence mean?  

The Thumb-2 CPU translates from ARM 32 to thumb2 on the fly?

--
Grant Edwards                   grante             Yow!  Why are these
                                  at               athletic shoe salesmen
We've slightly trimmed the long signature. Click to see the full one.
Re: 16-bit ucLinux?

It means theres no seperate Thumb ISA decoder on the chip, but it just
expands the opcodes to ARM32 opcodes on the fly and executes them. So
if you change an ARM32 opcode's function it will affect the equivalent
Thumb opcode too, and there is no Thumb opcode without an ARM32 opcode.

Thumb is simply a compressed ARM32 ISA that is decompressed (to
32-bits) on the fly and transparently right before execution in the
core.

I just wasn't sure if I could call it 16-bit Linux when Linux is
compiled to Thumb code.

Grant Edwards wrote:
Quoted text here. Click to load it


Re: 16-bit ucLinux?

Quoted text here. Click to load it


I know.


I know all that, but I still don't know what was meant by

  "Thumb-2 can assemble ARM (32) instructions to their Thumb-2
   equivalent."

I know that the CPU converts thumb isntructions to ARM32 instructions
before executing them, but the sentence above is seems to be
referring to something doing the converse: converting ARM32 to
Thumb-2.

Quoted text here. Click to load it

No, it's still a 32-bit architecture.  The instruction width is
irrelevent.  Many IA32 instructions are much longer than 32
bits, but it's still a "32-bit architecture."

--
Grant Edwards                   grante             Yow!  This PIZZA symbolizes
                                  at               my COMPLETE EMOTIONAL
We've slightly trimmed the long signature. Click to see the full one.
Re: 16-bit ucLinux?

Quoted text here. Click to load it
to

Sorry, my poor english. My understanding is that the latest ARM software
tools can assemble (as in using Assembler) ARM(32) instruction syntax to
Thumb-2 binary format (with some limitations). That for every ARM(32)
instruction there is one or more Thumb-2 instructions that behave the same.
The more than one bit is for several reasons - limited range of constants in
instructions and predicated instructions, which ar handled differently.

Peter



Re: 16-bit ucLinux?

Quoted text here. Click to load it

No need to apologize.

Quoted text here. Click to load it

Ah.  So that should allow ARM32 assembly language to be
assembled into Thumb2 instructions for targets that are
thumb-only.  If that's true, it's probably just the ARM Inc.
tools and not the Gnu tools upon which Linux depends.  Until
Gnu tools can do such a trick, you probably won't see Linux on
the thumb-only platform (unless somebody ports the ARM32
assembly language stuff).

--
Grant Edwards                   grante             Yow!  My NOSE is NUMB!
                                  at              
We've slightly trimmed the long signature. Click to see the full one.
Re: 16-bit ucLinux?
Quoted text here. Click to load it

That's Thumb-2 only, presumably, not thumb-only. The only Thumb-2-only core
is the CortexM3, which doesn't have an MMU and is targetted well below
Linux' resource usage.

Peter



Re: 16-bit ucLinux?
Quoted text here. Click to load it

Both Thumb instruction sets are subsets of the 32 bit ARM
instruction set. There are unique translations from all
Thumb instructions to equivalent ARM instructions, but
all ARM instructions do not have direct Thumb(-2) equivalents.

The Thumb-2 instruction set extends the original Thumb set
by such system control instructions which would be impossible
to handle with the original Thumb set (e.g. PSR handling).

IMHO, it's possible to port ucLinux to Thumb-2, but it will
need manual work.

--

Tauno Voipio
tauno voipio (at) iki fi

Site Timeline