Page 1 of 2

which architecture?

Posted: Sat Oct 06, 2007 12:00 am
by Zacariaz
As you prbably allready know, i am looking for some embedded hardware.
I do however have trouble figuring out which architecture is best for me.
ARM seems nice, but what little tutorials i have been able to find have had assembly and BBS BASIC all mixed up, and that is not something i want go get involved with.

The requirement are simple
CPU:
Needs to be efficient yet simple, pasively cooled, not super fast but still, not too slow either.
I think a risc architecture is best.
I/O:
I really dont need anything more than ethernet or usb or something simular.
Storage:
Im thinking something like a flash card or simular. I have to be able to remove it though.

Allso, and this is important, i will need to assemble any code written on a x86 architecture machine. I dont know how great a problem that poses.

As i have said before the easy solution is the via eden px10000, but sadly it is allso one of the more expensive ones, and i really dont need half of what it offers.


Well, gimme your best shot.


Regards

Re: which architecture?

Posted: Sat Oct 06, 2007 12:28 am
by Brendan
Hi,

I'd probably start with this Embedded Processor and System-on-Chip Quick Reference Guide. The bonus here is that all these systems run (some flavour of) Linux, so you know there's at least some example source code...


Cheers,

Brendan

Posted: Sat Oct 06, 2007 1:24 am
by Zacariaz
nice link but i dont know half of it and dont understand the rest.
Fx. the MIPS processor.
Yes i know the name and have some idea where it has been used, but really i know nothing about it.
How can i then discide anything?

Yes i can realy about it on the web, and i have done so, but it is not rally possible to get one chart with all the information you want, there allways something missing. It tough. If i was a rich dude i could just bye some different testbeds and try em out, but that not an option.

Posted: Sun Oct 07, 2007 11:38 am
by Zacariaz
I have had the pleasure of playing around with the new iphone today, and though i get spots of various sizes and colors all over my boddy when the subject turns to anything with an 'I' infront of it, i must say i was impressed.

So, i want the same hardware ;)
I know it has an ARM processor (ARM11/ARMv6KZ/ARM1176JZ(F)-S - who knows what all this means?) but apart from that i have no idea ;)
Anyway, an ARM it is and know i just got to find some ARM assembly tutorials, which so far has been complicated at best.

Posted: Sun Oct 07, 2007 1:09 pm
by Dex
You should go for a GP2X, which as two arm chips, it comes with linux, also the bootloader can be modified, so if you press start on boot up, you can load your own image into memory from SD card, which is great for OS dev, without arming the default linux distro.
The GP2X is what i am using for porting DexOS to arm.
You can also use FasmArm to code it, see here for a simple arm boot example
http://www.osdev.org/phpBB2/viewtopic.php?t=15077

Here's a direct link to the ARM reference is here
NOTE: Its 12MB

Also you could start with a GBA or DS, as they have arm chips.
Here is a simple GBA demo, code with fasmarm.

Code: Select all

; GBA Header and test prog by Dex,Coded with FasmARM.
; c:\fasmarm test.asm test.gba
format binary
org	0			; code starts at offset 0.
use32				; use 32-bit code.

    b    rom_start
NintendoLogo:
    db    0,0,0,0,0,0,0,0,0,0   ; Nintendo Logo space(156 bytes).
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0,0,0,0,0
    db    0,0,0,0,0,0
GameTitle:
    db    "TEAM DEX4U  "        ; Game Title (12 bytes).
GameCode:
    db    "1234"                ; Game Code (4 bytes).
MakerCode:
    db    "_$"                  ; Maker Code (2 bytes).
FixedValue:
    db    0x96                  ; Fixed value (1 byte).
MainUnit:
    db    0                     ; Main unit code (1 byte).
DeviceType:
    db    0                     ; Device Type (1 byte).
ReservedBytes: 
    db    0,0,0,0,0,0,0         ; Reserved (7 bytes)
SoftwareVersion:  
    db    0                     ; Software version (1 byte).
ComplementCheck:
    db    0                     ; Complement check (1 byte).
Reserved2:
    db    0,0                   ; Reserved (2 bytes).

align 4

;********************************;
; Rom start.                     ;
;********************************;
rom_start:  
	mov r0, 0x4000000
	mov r1, 0x400
	add r1, r1, 3
	str r1, [r0]

	mov r0, 0x6000000
	mov r1, 0xff
	mov r2, 0x9600
loop1:
	strh r1, [r0], 2
	subs r2, r2, 1
	bne loop1

LetsLoop:
	b LetsLoop

times 20000- ($-0)  db 0
Heres some work on porting DexOS to GBA and Ds.
http://www.dex4u.com/images/gbademo.jpg

I would write some ARM OS Dev tut's, if there was enough demand.

Posted: Sun Oct 07, 2007 3:30 pm
by Brynet-Inc
You can setup an ARM binutils/GCC cross compiler as well :)

Googling revealed:
http://www.arm.com/documentation
http://www.arm.com/miscPDFs/9658.pdf
http://www.heyrick.co.uk/assembler/
http://www.inf.u-szeged.hu/gcc-arm/

It seems to be a very fascinating architecture. 8)

Posted: Sun Oct 07, 2007 3:41 pm
by Zacariaz
i investigated GP2X and it seems to cost $300+ and thats simply too much for something just to play around with, good idea though.

Posted: Sun Oct 07, 2007 3:48 pm
by Brynet-Inc
$300? Why not buy it used or something... Like from eBay for instance... ;)

EDIT: This place sells a less expensive model..
http://www.gp2xstore.com/products/Gp2x_ ... 100-0.html

Posted: Sun Oct 07, 2007 4:06 pm
by Zacariaz
Brynet-Inc wrote:EDIT: This place sells a less expensive model..
http://www.gp2xstore.com/products/Gp2x_ ... 100-0.html
Indeed, and much cooler!
However i doubt that shipping from california to Denmark will be free ;)

Posted: Sun Oct 07, 2007 4:11 pm
by Zacariaz
i just need to be sure here. those gameconsoles which uses ARM chip havent got build in bootloader/Kernel etc. which you cant alter? what about bios? (yes i dont know much about the subject and it might be stupid questions)

Anyway, it seems that this way is a great way to start, asuming you can get hold on some hardware that does not contain anything "extra" buildin software which cannot be easily altered or removed.

edit:
i have actually found a gp2x (used) to around $110 maybe cheeper, its an auction which ends in 10 days.

deman...

Posted: Sun Oct 07, 2007 6:35 pm
by com1
dex you said you would write some ARM os tuts if there was enough demand... well count me in for wanting one!

Posted: Sun Oct 07, 2007 7:29 pm
by Dex
Here is a list of gp2x suppliers http://wiki.gp2x.org/wiki/Where_to_Buy%3F
Also good about the gp2x, is yo are free to write code for it and there's even a coding compo every year, with big prizes for the winning programs or OS etc.
And sure i will see what i can do to write a simple ARM OS Dev tut, base around FasmArm.


Here is the best place to start, if you want info on arm console, OS Dev, eg: DS.
Look at these links
http://www.dslinux.org/
http://dslinux.org/wiki/Running_DSLinux

Posted: Sun Oct 07, 2007 8:04 pm
by Zacariaz
the gp2x is veru intregin indeed, however there are a thing or two which annoys me.

1. dual cpu.
You may say that the more the better, but im afraid it is only going to confuse me further.
2. if i want to connect a keybord (which tecnically i dont need, but the possibility would be nice) i have to connect via usb and buy a £ 38 Cradle.
3. no vga out (the cradle supports "video" out but i dont think that by that they mean vga ;) )

I will probably buy it anyway if i can get it at the right price (we'll see in 9 days ;) )

Posted: Sun Oct 07, 2007 8:46 pm
by Dex
Zacariaz wrote:the gp2x is veru intregin indeed, however there are a thing or two which annoys me.

1. dual cpu.
You may say that the more the better, but im afraid it is only going to confuse me further.
2. if i want to connect a keybord (which tecnically i dont need, but the possibility would be nice) i have to connect via usb and buy a £ 38 Cradle.
3. no vga out (the cradle supports "video" out but i dont think that by that they mean vga ;) )

I will probably buy it anyway if i can get it at the right price (we'll see in 9 days ;) )
To answer ? 1. the second CPU is unused and even linux only users the first one, but it good to have.
2. Yes for keyboard you do need a Cradle, but the Cradle is also good for debugging etc.
3. Your right, its not for VGA, its so you can output to your TV :wink: .

Posted: Sun Oct 07, 2007 8:57 pm
by Zacariaz
well, 2 out of 3 is still pretty good ;) however usb keyboard requires purchase of more hardware, as i dont have a usb keyboard lying around and btw wont it be hell to impliment? i mean ps2 vs usb i should think there is a difference.

Anyway, as of right now im searching the net for a good ARM emulator, but while there a quite a few, it is a jungle. Ive allready downloaded 3 of which only one proved interesting. Its called qemu, but im still somewhat confused whether or not it is what im looking for...

Let me know if you know any.