Difference between revisions of "WinCE port"

From Free Pascal wiki
Jump to navigationJump to search
m
Line 6: Line 6:
  
 
== TODO ==
 
== TODO ==
* Converting PocketPC SDK headers to Windows unit is needed. It is main show-stopper now.  
+
=== Windows unit ===
 +
Converting PocketPC SDK headers to Windows unit is needed. It is main show-stopper now.
 +
 
 +
Since H2PAS dont eat MS headers the easiest way to port is to use win32
 +
Windows unit and remove all functions which are missing in WinCE. The
 +
following list of WinCE API functions can be used as a reference:
 +
http://www.rainer-keuchel.de/wince/dllexports/ipaq-coredll.txt
 +
First of all there are almost no functions with A suffix and they must be
 +
removed.
 +
Also some functions exists as wrappers (SetEvent,ResetEvent and some other). Some of them are
 +
already implemented in system.pp
  
 
== Building ==
 
== Building ==

Revision as of 11:47, 13 August 2005

The WinCE port is under development. Currently only WinCE on ARM and i386 (WinCE emulator) is supported.

Status

The 2.1.x compiler has compiler support for arm-wince and a partial working system unit.

TODO

Windows unit

Converting PocketPC SDK headers to Windows unit is needed. It is main show-stopper now.

Since H2PAS dont eat MS headers the easiest way to port is to use win32 Windows unit and remove all functions which are missing in WinCE. The following list of WinCE API functions can be used as a reference: http://www.rainer-keuchel.de/wince/dllexports/ipaq-coredll.txt First of all there are almost no functions with A suffix and they must be removed. Also some functions exists as wrappers (SetEvent,ResetEvent and some other). Some of them are already implemented in system.pp

Building

At a certain point this breaks when the native compiler is compiled. This doesn't hurt, because you usually don't need the native compiler.

You should end with the units compiled to fpc/rtl/units/arm-wince and a ppccrossarm.exe in fpc/compiler. Copy them to locations fitting your fpc installation.

Documentation

WinCE port notes

  • chdir always produces an error (WinCE does not support setting of current directory).
  • All file/dir paths must be absolute (started with \).
  • WinCE is unicode OS. All string parameters to API calls must be PWideChar.

First tests

  • There is a writeln pb : text to std output give a runtime error 103. So trying the same code with evc -> result: nothing appear.
  • In fact cmd.exe is not installed by default on pda's ie not text console, no CON: device but this can be installed with external

tools (ms provide one with PowerToys,there are others on the net)

  • After that cmd.exe is installed, running the previous simpliest printf progs, show the expected text in a text window, existing of console.dll in \windows dir have been detected and stdout configured at runtime.
  • The only difference is that a new console is opened every time, even if hello.exe is run from a console !

Links

Contacts

Write any questions regarding WinCE port to Yury Sidorov