Sign in Join
Wiki copytemporary

WinCE port: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: WinCE port

OldNewLine
1+WinCE port is quite complete and usable. The port was started and maintained by Yury Sidorov. Oliver (Oro06) ported WinCE API headers.
2+
3+## Status
4+
5+- FPC 2.2.0 or later supports WinCE target.
6+- CPU support for WinCE target:
7+ - [[ARM]] CPU is fully supported. See [[arm-wince]] how to setup a crosscompiling enviroment.\
8+ There are readymade crosscompiler package available(See Lazarus download sources)
9+ - [[i386]] CPU support was not tested too much and may contain bugs. Patches are welcome.\
10+ Normally there is no readymade crosscompiler package for this CPU. See [[i386-wince]] howto setup a cross compile enviroment(Win32 Host)
11+- The following platforms are supported:
12+ - Devices based on WinCE 3.0 or later
13+ - Pocket PC 2002 – WinCE version: 3.0
14+ - Pocket PC 2003 – WinCE version: 4.20
15+ - Pocket PC 2003 Second Edition – WinCE version: 4.21
16+ - Windows Mobile 5 – WinCE version: 5.0
17+ - Windows Mobile 6 – WinCE version: 5.2
18+ - Windows Mobile 6.5 - WinCE version: 5.2.1
19+- [RTL](http://community.freepascal.org:10000/docs-html/rtl) and [FCL](http://community.freepascal.org:10000/docs-html/fcl) units are working.
20+
21+## Debugging WinCE applications
22+
23+GDB can be used to debug your WinCE applications remotely via ActiveSync. Download GDB 6.4 for Win32 host and arm-wince target here: <ftp://ftp.freepascal.org/pub/fpc/contrib/cross/gdb-6.4-win32-arm-wince.zip>
24+
25+**Some hints:**
26+
27+- Pass `--tui` parameter to GDB to enable TUI interface which makes debugging more comfortable.
28+- Use unix line endings (LF only) in your pascal source files. Otherwise GDB will show sources incorrctly.
29+
30+**How to use:**
31+
32+First, make ActiveSync connection to your Pocket PC device.
33+
34+Then launch gdb:
35+
36+`gdb --tui <your_executable_at_local_pc>`
37+
38+On gdb prompt type:
39+
40+`run` or just `r`
41+
42+GDB will copy your executable to the device in `\gdb` folder and run it.
43+
44+Here is a short list of most needed GDB commands:
45+
46+- `r args` - run program with args arguments.
47+- `s` - step into.
48+- `n` - step over.
49+- `ni` - step over instrument.step over assembly instruction.
50+- `c` - continue execution.
51+- `br <function_name>` - set a breakpoint at `function_name`. Use `PASCALMAIN` to set a breakpoint at program start.
52+- `br <source_file>:<line_number>` - set a breakpoint at specified source line.
53+- `disas` - show disassembly of current location.
54+- `x/fmt address` - dump memory at address with special format.use "help x" for more informations.
55+- `bt` - back trace.print back trace of the call stack.
56+- `where` - Display the current line and function and the stack of calls that got you there.
57+- `q` - Quit gdb.
58+
59+To learn more how to use GDB read its documentation here: <http://www.gnu.org/software/gdb/documentation>
60+
61+For example you want to build FCL. Go to `fpc\fcl` folder and execute the command above. You will get FCL compiled units in `fpc\fcl\units\arm-wince`.
62+
63+## See Also
64+
65+- [[WinCE port Hints|WinCE port hints]]
66+- [Windows CE interface for Lazarus](http://wiki.lazarus.freepascal.org/Windows_CE_Interface)
67+- [Windows CE Development Notes](http://wiki.lazarus.freepascal.org/Windows_CE_Development_Notes)
68+- [[KOL-CE|WinCE port of KOL GUI library]]
69+
70+## Links
71+
72+- Useful WinCE info <http://www.rainer-keuchel.de/documents.html>
73+- Standalone Pocket PC device emulator from Microsoft. It emulates ARM CPU. Get it [here](http://www.microsoft.com/downloads/details.aspx?FamilyId=C62D54A5-183A-4A1E-A7E2-CC500ED1F19A&displaylang=en)
74+- Mamaich Pocket PC port of GCC <http://mamaich.uni.cc>
75+- [Buildfaq](http://www.stack.nl/~marcov/buildfaq.pdf) is a general FAQ about how to build and configure FPC.
76+
77+Here are some links related to ARM CPU Architecture
78+
79+- [ARM Core Developers Forum](http://www.armcorepro.com/) Not that much active though.
80+- [GCC ARM Improvement Project](http://www.inf.u-szeged.hu/gcc-arm/)
81+- [ARM ASSEMBLER](http://www.heyrick.co.uk/assembler/index.html) Good information and codes related to arm assembly language.
82+- [GNU ARM toolchain for Cygwin, Linux and MacOS](http://www.gnuarm.com/)
83+- [Microsoft Windows CE .NET 4.2 ARM Guide](http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcechp40/html/ccrefarmguide.asp)
84+- [ARM Instruction Sets & Programs](http://soc.csie.ndhu.edu.tw/source/intro_embedded/ch2-arm-2.ppt) Very good and consice information about arm architecture
85+- [The ARM Instruction Set](http://web.njit.edu/~baltrush/arm_stuff/ARMInst.ppt) Another fine power point file about arm
86+
87+## Contacts
88+
89+Write any questions regarding WinCE port to [Yury Sidorov](mailto:yury_sidorov@mail.ru)
90+
91+---
92+*From the Free Pascal wiki, page "WinCE port", as it stood on 2020-08-09 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history