Author Topic: C1000's Architecture(pxa270)&cross Compiler Env.  (Read 5358 times)

tuna

  • Newbie
  • *
  • Posts: 3
    • View Profile
C1000's Architecture(pxa270)&cross Compiler Env.
« on: June 07, 2007, 04:50:24 pm »
It is my understanding that the c1000 offers the pxa270
that would be armv5tel;

now, from an assembly programming pov:
my main questions are: since the pxa270 is not the pxa250 and i have only been able to find the pxa250 architecture manuals from http://www.arm.com where would i find the architecture manuals for the pxa270
and if there isn't a big difference between pxa250 and pxa270, where/what are the differences? if anyone knows

i'd like to setup a cross-compile environment, so i used qemu(on windows) and emulated armv5tejl(j denotes the native ability to execute java bytecode?) could i also use this to create binaries for armv5tel?
if this is completely uninformed already, then my next obvious question is: how do i go about creating a cross-development environment for specifically armv5tel?

i'm really in the dark, so if someone has some links that could help a programmer
please

thanks : D
sl-c1000

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
C1000's Architecture(pxa270)&cross Compiler Env.
« Reply #1 on: June 07, 2007, 07:51:54 pm »
Quote
It is my understanding that the c1000 offers the pxa270
that would be armv5tel;

now, from an assembly programming pov:
my main questions are: since the pxa270 is not the pxa250 and i have only been able to find the pxa250 architecture manuals from http://www.arm.com where would i find the architecture manuals for the pxa270
and if there isn't a big difference between pxa250 and pxa270, where/what are the differences? if anyone knows

i'd like to setup a cross-compile environment, so i used qemu(on windows) and emulated armv5tejl(j denotes the native ability to execute java bytecode?) could i also use this to create binaries for armv5tel?
if this is completely uninformed already, then my next obvious question is: how do i go about creating a cross-development environment for specifically armv5tel?

i'm really in the dark, so if someone has some links that could help a programmer
please

thanks : D
[div align=\"right\"][a href=\"index.php?act=findpost&pid=162809\"][{POST_SNAPBACK}][/a][/div]

not sure about the difference so i might be wrong here, but i believe the newer processors support the xscale and iwmmxt instructions as well which can improve performance significantly.

as for the cross compile tools, use the pdaXrom cross compiler or builder, or even OpenEmbedded.
both allow you to cross compile from x86 linux machines and run the resulting binary on arm/armv5tel platforms

pdaXrom targets armv5tel specifically (and also does armv4) wheras OpenEmbedded is more generic and can target any arm processor (i think, but the builds for Zaurus are arm or armv5te on OpenZaurus. Angstrom is another story...).
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
C1000's Architecture(pxa270)&cross Compiler Env.
« Reply #2 on: June 10, 2007, 01:48:57 pm »
internally there is no real diffrence to the processor to an applications programmer who wants to program in asm, it mainly has to do with hardware such as built in usb client and there  was an update to the frame buffer (did the pxa250 even have a frame buffer ?)

ethier way it implements the arm architecture so if you dont use iwmmxt instructions then it should just copy to nearly all arm processors. however arm code wont just copy across to the pxa (has to do only with self modifiing code if i remeber correcttly, had to do with the split instruction and data cache which was implemented diffrentlly to a standard arm processor)

as for the armv5tel vs armv5tejl diffrences, just target armv5tel and dont use java byte code and your code will run on both platforms

if you are doing iwmmxt work then i hope you are working on mplayer improments  or an accelerated X server (please)

i am more than willing to help, i am sure i can point you in some helpful directions, i can be contacted in private if need be or on this fourm but i belive others would benifit from hearing about how to get started

firstlly what resources do you need, an intro to arm asm and iwmmxt? or eabi info.

as for a cross compiler taht can be a tricky one, i recomend the 4.x series and you have 2 options here. bitbake/OE or kegels crosstools. i havent been able to get crosstools to bouild anything new so i would recomend you get OE as perhaps you could add a recipe or two but at least you will have the latest arm patches if you chose to get your code through it as well
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

tuna

  • Newbie
  • *
  • Posts: 3
    • View Profile
C1000's Architecture(pxa270)&cross Compiler Env.
« Reply #3 on: June 14, 2007, 04:35:01 pm »
da_blitz, first i'd like to thank you for your help
specifically i'm working on a lisp implementation
your advice has made me realize i'll be compiling with iwmmxt optimizations only under armv5tel specific situations  such as with mcpu= and mtune=

page 42 of this[registers/register aliases and their use]:
http://ajaydudani.googlepages.com/Programm...ded_Systems.pdf

if you can read a verbose, primitive english, this i've found:
http://translate.google.com/translate?hl=e...l%3Den%26sa%3DG

^ for my needs, it looks like these do well, but i'm looking for something more technically informative; [if not free, and online, then in a bookstore]

as for a cross-compiler env. yes, it's a bit tricky; [i'll give bitbake/oe a shot]
ideally i wanted to use poky with qemu, we'll see. [i'm more interested in what any of you know off-hand about this]

cheers
sl-c1000

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
C1000's Architecture(pxa270)&cross Compiler Env.
« Reply #4 on: June 16, 2007, 08:18:45 am »
learn from here: http://www.heyrick.co.uk/assembler/

its not that hard to pick up at all if you already know assembler.

there are a couple of nice things such as optinal execution of every instruction, there is no "test and branch" or "test and jump" instruction instead there is only a jmp instruction. however as i said there is conditinnal exectuion of every asm instruction, you could combind this with a compare with zero instruction and negate it to jump to a specified piece of code if the perivos statment was not zero

another nice thing is the free "shift" you can do with any argument to an asm instruction, there is a barrelel shifter in the alu that gives you the ability to shift to the right or left as part ofan instruction without effecting exectution time, i cant remeber if there is a shift instruction but i belive there is not

to performe a shift you would exectue a mov instruction to move the contents from a to b but incorperate a shift in the instruction

Code: [Select]
Shift r1 left arethmatically 3 places and place in r2
mov r2,  [r1 #ASL  3 ]

also note that the destinatoin and source are backwards (ie r1 will end up in r2). not sure why they did this but its not hard to get used to

the Program counter is also a register (r15) so a jump can be porformed as a mov instruction

Code: [Select]
mov PC, r1
Pc is an alias for r16 in this case however the important thing to note is that you can calculate a value to do a computed jump, i dont know if x86 programmers do this but i do know PIC micro and atmel programers do for impleminting jump tables and pulling values out of a table

to do that you would have a list of instructions that do somthing like

Code: [Select]
mov r1,
mov PC, r14  

to jump to this table you would have some code to calculate the index then jump to it and pull the value returned out of r1, the jump would be a bl instruction (branch with link) which is the analog of branch on a x86, the standard branch dosent save the PC and so exectuets what is commanly refered to as a jmp

anyway the code:

Code: [Select]
Note this is only the jump part
bl r1

this jumps to the code pointed by the second register (r1). this is not a useful thing in most cases, its mainly used where computaition is to be avoided (it can eat huge ammounts of memorey, if i remeber correcttly its 8x the table size) but for some things it can give huge speed benifits (as your answers are precaculated

teh main advantage is it executes in a set ammount of time, hence why its used in real time and embedded (and why i know of it) and that it dosent require a powerful cpu to calcutale the answer

another nice thing about this is very short select case statments because of the conditinol execution part eg

Code: [Select]
Code as implemented in windows mobile:

cmp 'a'
beq die
cmp 'b'
beq kill_window
cmp 'c'
bne error_msg
cmp 'd'
b lock_up

here we can see the branch instruction mixed with conditinals, eq, ne for example which are branch if equal and branch if not equal, can be mixed with most instructions to do stuff like add if not equal or if greater than x then maxe zero (to cap values)

eg

Code: [Select]
cmp #70, r1
moveq r1, #0

which is if  r1 = 70 then r1 = 0

anyway the site is much better than i am at explaining it and i am a little rusty, if you need more info cantact me however for the iwmmxt stuff its on the intel website. be careful as the iwmmxt is implemented as coprocessor instructions and conflicts with the floating point unit on other platforms, so i would check to make sure your code is actualy running on a iwmmxt processor (just read the processor detaails from /proc)

hope it helps, still here if you need me

and finally from the site:
Any sufficiently advanced technology is indistinguishable from a rigged demo.
« Last Edit: June 16, 2007, 08:20:09 am by Da_Blitz »
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware