16-bit ucLinux?

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.

formatting link

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?

Reply to
Ghazan Haider
Loading thread data ...

No, the instructions are 16 bits each. The data and registers are 32- bits. So it just an instruction compression technique.

Addresses are still 32-bit.

Your initial premise is wrong, and so the question doesn't apply.

Peter

Reply to
Peter Dickerson

16bit == length of opcodes.

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

regards

Wolfgang

Reply to
Wolfgang Mües

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.

Reply to
David Brown

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

Reply to
Michael Schnell

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

Reply to
Peter Dickerson

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
 Click to see the full signature
Reply to
Grant Edwards

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 L> >

Reply to
Ghazan Haider

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.

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
 Click to see the full signature
Reply to
Grant Edwards

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
 Click to see the full signature
Reply to
Tauno Voipio

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

Reply to
Peter Dickerson

No need to apologize.

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               
 Click to see the full signature
Reply to
Grant Edwards

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

Reply to
Peter Dickerson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.