Write an OS for PocketPc

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
molux
Posts: 15
Joined: Fri May 16, 2008 8:36 am

Post by molux »

Hello Sirs,

It is so interesting, thanks Dex for yours explainations and thanks Karlosoft for this intersting link.

I be part of the "Intel Architecture Software Developer’s Manual" reader, and i think i'm "formated" under this arch. I want to play with my old iPaq3600 to try to port my little kernel.

I have some questions:
(Sorry for my bad english and amount of questions...)

1 - Bootloader:
...No BIOS to set things up for you...
... all that happans when you turn the device on is 4k of code is load from Rom to ram starting at 0 and than it jumps to the 0 address...
- Ok, If i understand, the bootloader are at the begining of the ROM, it's size is 4Ko and it automatically load in RAM after POST ?
- Do you think is the same under PocketPC ?

2 - Kernel and Hardware:
...And most things that need setting up are differant on the differant ARM chips. ...
- Ok, but there is a Bios under an ARM mainboard ?
- For exemple how to get the memory size under and ARM arch ?
- Or an other exemple how to acces to an UART serial port ? (inport/outport ?)
- And for the Pocket PC screen, how it's mapper ?
- if i understand, you say for exemple that under a ARM chips A there is an instruction or register to get the memory size and on and ARM chip B there is different instruction or register ?

3 - Constructors:
- I see that constructor "dont play the game" to deliver datasheet or information about Pocket PC plateform, someone know where to find a ipaq3600 datasheet or other document about pocket PC plateforme ?

4 - Emulations:
- For emulation of Pocket PC, i think i have to map some device on memory,screen, I/O port, etc... how can emulate this ? (perhaps i go to bad way...)

The ARM arch seems very interesting, but i dont find a lot under pocket Pc plateform, if you have document or entry point, i want it please.

Sorry for this amount of question but i want to understand and x86unformat my brain.

Thanks for read me
(thanks for the effort)

Molux
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

There's a big difference between embedded development and desktop development: embedded systems typically are all the exact same, so the memory map is predefined, all devices are known before hand, etc... Of course, you might have a USB bus or a PCI bus on your ARM board, but you hopefully get the basic idea. They also don't usually have a BIOS - you need to do everything yourself.

A desktop has a BIOS, but you also don't know what hardware the user might have and how your system will work on their hardware.

Hope this helps!
molux
Posts: 15
Joined: Fri May 16, 2008 8:36 am

Post by molux »

Hello pcmattman,

Thanks for your response, yes it's help me.

In fact, if i understand, programming Pocket PC ARM arch il like programming à Microcontroler ATmel or Microchip 16Fx, 18Cx, etc...
(i play with microntroleur...)

In my microcontroleur board, i design myself so i know where are the UART, on wich port the 8bits LCD screen is connected or How my i2C or SPI bus are organised (Adr of EEPROM, Audio CODEC or Ethernet Interface).And you have right, there is no bios at all on my board.

* But on the Pocket PC, i dont know the organisation of the board and i don't find data about for exemple my iPaq. So the question is where tofind this kind of datasheet ? reverse ingeniering ?( ourch !)

On my microcontroler board, i use ICSP or Chip programmer to put my program on the chip, and i wrote some RS232 bootloader or other.
If my bootloader crash i can re-use the ICSP to reprogramm it

* But on Pocket PC, how to program the ARM in situ ? it's possible ?

* How does WinCE do the hardware "adaptation", does WinCE be "compiled" for each platforme ? Microsoft provide a compiler to do that ? can we compile WinCE for "ALL" architecture ?

I think is quite diffuclte to start an OS for "Pocket PC" plateforme, but i think there is a basics "compatibility" bases for microsoft dont "reinvent the weel" for new Pocket PC plateform...

Big Thanks for yours informations and for read my very bad english

Molux
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

I would assume, given that Pocket PC is a Microsoft product (correct me if I'm wrong, please), that the documentation about it wouldn't be available in the public domain. You might have to pay to get it, or find some code someone else has already written and figure it out from that.

You could try searching for Pocket PC operating systems and see if any are open source, and if so, contact the project owners and find out where they got their information.

EDIT: Don't know if this site will help you?
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

Here's the basics without BIOS, first chose your chip, then get as much info as you can (Remember i talking ARM here).
Now i am programing the Gp2x which as two Arm chips, see here for doc
http://wiki.gp2x.org/wiki/Hardware_Documentation
Now the GP2X's main Processor is the MP2520F, then you down load the pdf eg:
http://mudiweb.com/gp2x/MP2520F_Manual_Eng_V1.0.pdf

Now from the info in the pdf, you will find that changing bits to 0 or 1 at differant offset's, change stuff, turn stuff on or off or test's for things etc.

I use a opensource ARM bootloader, that does most of the setting up for me, than it boots my image, instead of linux. image.

Here is a example of the offsets for UART in that device.

Code: Select all

/* ***** UART ***** */

#define nMSP_LCON0                (0xC0001200)
#define nMSP_UCON0                (0xC0001202)
#define nMSP_FCON0                (0xC0001204)
#define nMSP_MCON0                (0xC0001206)
#define nMSP_TRSTATUS0            (0xC0001208)
#define nMSP_ESTATUS0             (0xC000120A)
#define nMSP_FSTATUS0             (0xC000120C)
#define nMSP_MSTATUS0             (0xC000120E)
#define nMSP_THB0                 (0xC0001210)
#define nMSP_RHB0                 (0xC0001212)
#define nMSP_BRD0                 (0xC0001214)
#define nMSP_TIMEOUTREG0          (0xC0001216)

#define nMSP_LCON1                (0xC0001220)
#define nMSP_UCON1                (0xC0001222)
#define nMSP_FCON1                (0xC0001224)
#define nMSP_MCON1                (0xC0001226)
#define nMSP_TRSTATUS1            (0xC0001228)
#define nMSP_ESTATUS1             (0xC000122A)
#define nMSP_FSTATUS1             (0xC000122C)
#define nMSP_MSTATUS1             (0xC000122E)
#define nMSP_THB1                 (0xC0001230)
#define nMSP_RHB1                 (0xC0001232)
#define nMSP_BRD1                 (0xC0001234)
#define nMSP_TIMEOUTREG1          (0xC0001236)

#define nMSP_LCON2                (0xC0001240)
#define nMSP_UCON2                (0xC0001242)
#define nMSP_FCON2                (0xC0001244)
#define nMSP_MCON2                (0xC0001246)
#define nMSP_TRSTATUS2            (0xC0001248)
#define nMSP_ESTATUS2             (0xC000124A)
#define nMSP_FSTATUS2             (0xC000124C)
#define nMSP_MSTATUS2             (0xC000124E)
#define nMSP_THB2                 (0xC0001250)
#define nMSP_RHB2                 (0xC0001252)
#define nMSP_BRD2                 (0xC0001254)
#define nMSP_TIMEOUTREG2          (0xC0001256)

#define nMSP_LCON3                (0xC0001260)
#define nMSP_UCON3                (0xC0001262)
#define nMSP_FCON3                (0xC0001264)
#define nMSP_MCON3                (0xC0001266)
#define nMSP_TRSTATUS3            (0xC0001268)
#define nMSP_ESTATUS3             (0xC000126A)
#define nMSP_FSTATUS3             (0xC000126C)
#define nMSP_MSTATUS3             (0xC000126E)
#define nMSP_THB3                 (0xC0001270)
#define nMSP_RHB3                 (0xC0001272)
#define nMSP_BRD3                 (0xC0001274)
#define nMSP_TIMEOUTREG3          (0xC0001276)

#define nMSP_INTSTATREG           (0xC0001280)
#define nMSP_PORTCON              (0xC0001282)
molux
Posts: 15
Joined: Fri May 16, 2008 8:36 am

Post by molux »

yip ha.
I undestand, thanks a lot for yours explanations, i love you mens.
I find a linux version for ppc ipaq and it must be a good learnig stuff.
gp2x must be a good learning stuff too.
i'm going to read that.

an other thanks

Molux
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

Post by Karlosoft »

I'm sorry, I've only now seen this reply :oops:
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

See here for the best device http://www.osdev.org/phpBB2/viewtopic.p ... 515#127515
For OS Dev on a none x86 device.
molux
Posts: 15
Joined: Fri May 16, 2008 8:36 am

Post by molux »

Hy,

Thanks for this link, i know now what is GP32, but in my country it's not very popular. Pocket PC is more common hardware, perhapse so common.

Bye

Molux
molux
Posts: 15
Joined: Fri May 16, 2008 8:36 am

Re: Write an OS for PocketPc

Post by molux »

Hello Sirs,

I have some question, sorry for my bad english:

* Does someone know how can i put a compiled programme into the Pocket PC ROM ?

* I know a methode to write ROM with the bootloader, but how to write the bootloader itself and rewrite it if it's buggly ?

* There is a "special" port like ICSP or JTAG to reprogramme Pocket PC ROM without bootloader ?

Thanks lot for your help

Molux
Post Reply