Difference between revisions of "WinCE port"
m (Move platform template to page template; remove category already in page template) |
|||
(50 intermediate revisions by 14 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{WinCE port}} | ||
+ | |||
WinCE port is quite complete and usable. The port was started and maintained by Yury Sidorov. Oliver (Oro06) ported WinCE API headers. | WinCE port is quite complete and usable. The port was started and maintained by Yury Sidorov. Oliver (Oro06) ported WinCE API headers. | ||
== Status == | == Status == | ||
− | * | + | * FPC 2.2.0 or later supports WinCE target. |
− | * [[ARM]] CPU is supported. | + | * CPU support for WinCE target: |
+ | ** [[ARM]] CPU is fully supported. See [[arm-wince]] how to setup a crosscompiling enviroment.<br> There are readymade crosscompiler package available(See Lazarus download sources) | ||
+ | ** [[i386]] CPU support was not tested too much and may contain bugs. Patches are welcome.<br>Normally there is no readymade crosscompiler package for this CPU. See [[i386-wince]] howto setup a cross compile enviroment(Win32 Host) | ||
* The following platforms are supported: | * The following platforms are supported: | ||
− | ** Pocket PC 2002 – WinCE version: 3.0 | + | ** Devices based on WinCE 3.0 or later |
− | ** Pocket PC 2003 – WinCE version: 4.20 | + | ** Pocket PC 2002 – WinCE version: 3.0 |
− | ** Pocket PC 2003 Second Edition – WinCE version: 4.21 | + | ** Pocket PC 2003 – WinCE version: 4.20 |
− | * | + | ** Pocket PC 2003 Second Edition – WinCE version: 4.21 |
− | * Windows | + | ** Windows Mobile 5 – WinCE version: 5.0 |
− | + | ** Windows Mobile 6 – WinCE version: 5.2 | |
− | + | ** Windows Mobile 6.5 - WinCE version: 5.2.1 | |
− | + | * [http://community.freepascal.org:10000/docs-html/rtl RTL] and [http://community.freepascal.org:10000/docs-html/fcl FCL] units are working. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Debugging WinCE applications == | == Debugging WinCE applications == | ||
Line 143: | Line 42: | ||
Here is a short list of most needed GDB commands: | Here is a short list of most needed GDB commands: | ||
+ | * <tt>r args</tt> - run program with args arguments. | ||
* <tt>s</tt> - step into. | * <tt>s</tt> - step into. | ||
* <tt>n</tt> - step over. | * <tt>n</tt> - step over. | ||
+ | * <tt>ni</tt> - step over instrument.step over assembly instruction. | ||
* <tt>c</tt> - continue execution. | * <tt>c</tt> - continue execution. | ||
* <tt>br <function_name></tt> - set a breakpoint at <tt>function_name</tt>. Use <tt>PASCALMAIN</tt> to set a breakpoint at program start. | * <tt>br <function_name></tt> - set a breakpoint at <tt>function_name</tt>. Use <tt>PASCALMAIN</tt> to set a breakpoint at program start. | ||
* <tt>br <source_file>:<line_number></tt> - set a breakpoint at specified source line. | * <tt>br <source_file>:<line_number></tt> - set a breakpoint at specified source line. | ||
− | + | * <tt>disas</tt> - show disassembly of current location. | |
+ | * <tt>x/fmt address</tt> - dump memory at address with special format.use "help x" for more informations. | ||
+ | * <tt>bt</tt> - back trace.print back trace of the call stack. | ||
+ | * <tt>where</tt> - Display the current line and function and the stack of calls that got you there. | ||
+ | * <tt>q</tt> - Quit gdb. | ||
To learn more how to use GDB read its documentation here: http://www.gnu.org/software/gdb/documentation | To learn more how to use GDB read its documentation here: http://www.gnu.org/software/gdb/documentation | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
For example you want to build FCL. Go to <tt>fpc\fcl</tt> folder and execute the command above. You will get FCL compiled units in <tt>fpc\fcl\units\arm-wince</tt>. | For example you want to build FCL. Go to <tt>fpc\fcl</tt> folder and execute the command above. You will get FCL compiled units in <tt>fpc\fcl\units\arm-wince</tt>. | ||
− | == | + | == See Also == |
− | + | * [[WinCE_port_Hints|WinCE port hints]] | |
− | * | + | * [http://wiki.lazarus.freepascal.org/Windows_CE_Interface Windows CE interface for Lazarus] |
− | + | * [http://wiki.lazarus.freepascal.org/Windows_CE_Development_Notes Windows CE Development Notes] | |
− | + | * [[KOL-CE|WinCE port of KOL GUI library]] | |
− | |||
− | |||
− | * | ||
− | * | ||
== Links == | == Links == | ||
* Useful WinCE info http://www.rainer-keuchel.de/documents.html | * Useful WinCE info http://www.rainer-keuchel.de/documents.html | ||
− | * Standalone Pocket PC device emulator from Microsoft. It emulates ARM CPU. | + | * Standalone Pocket PC device emulator from Microsoft. It emulates ARM CPU. Get it [http://www.microsoft.com/downloads/details.aspx?FamilyId=C62D54A5-183A-4A1E-A7E2-CC500ED1F19A&displaylang=en here] |
* Mamaich Pocket PC port of GCC http://mamaich.uni.cc | * Mamaich Pocket PC port of GCC http://mamaich.uni.cc | ||
* [http://www.stack.nl/~marcov/buildfaq.pdf Buildfaq] is a general FAQ about how to build and configure FPC. | * [http://www.stack.nl/~marcov/buildfaq.pdf Buildfaq] is a general FAQ about how to build and configure FPC. | ||
Line 185: | Line 80: | ||
* [http://www.gnuarm.com/ GNU ARM toolchain for Cygwin, Linux and MacOS] | * [http://www.gnuarm.com/ GNU ARM toolchain for Cygwin, Linux and MacOS] | ||
* [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcechp40/html/ccrefarmguide.asp Microsoft Windows CE .NET 4.2 ARM Guide] | * [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcechp40/html/ccrefarmguide.asp Microsoft Windows CE .NET 4.2 ARM Guide] | ||
+ | * [http://soc.csie.ndhu.edu.tw/source/intro_embedded/ch2-arm-2.ppt ARM Instruction Sets & Programs] Very good and consice information about arm architecture | ||
+ | * [http://web.njit.edu/~baltrush/arm_stuff/ARMInst.ppt The ARM Instruction Set ] Another fine power point file about arm | ||
== Contacts == | == Contacts == | ||
+ | |||
Write any questions regarding WinCE port to [mailto:yury_sidorov@mail.ru Yury Sidorov] | Write any questions regarding WinCE port to [mailto:yury_sidorov@mail.ru Yury Sidorov] |
Latest revision as of 03:15, 9 August 2020
This article applies to Windows CE only.
See also: Multiplatform Programming Guide
│
English (en) │
italiano (it) │
português (pt) │
русский (ru) │
中文(台灣) (zh_TW) │
WinCE port is quite complete and usable. The port was started and maintained by Yury Sidorov. Oliver (Oro06) ported WinCE API headers.
Status
- FPC 2.2.0 or later supports WinCE target.
- CPU support for WinCE target:
- ARM CPU is fully supported. See arm-wince how to setup a crosscompiling enviroment.
There are readymade crosscompiler package available(See Lazarus download sources) - i386 CPU support was not tested too much and may contain bugs. Patches are welcome.
Normally there is no readymade crosscompiler package for this CPU. See i386-wince howto setup a cross compile enviroment(Win32 Host)
- ARM CPU is fully supported. See arm-wince how to setup a crosscompiling enviroment.
- The following platforms are supported:
- Devices based on WinCE 3.0 or later
- Pocket PC 2002 – WinCE version: 3.0
- Pocket PC 2003 – WinCE version: 4.20
- Pocket PC 2003 Second Edition – WinCE version: 4.21
- Windows Mobile 5 – WinCE version: 5.0
- Windows Mobile 6 – WinCE version: 5.2
- Windows Mobile 6.5 - WinCE version: 5.2.1
- RTL and FCL units are working.
Debugging WinCE applications
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
Some hints:
- Pass --tui parameter to GDB to enable TUI interface which makes debugging more comfortable.
- Use unix line endings (LF only) in your pascal source files. Otherwise GDB will show sources incorrctly.
How to use:
First, make ActiveSync connection to your Pocket PC device.
Then launch gdb:
gdb --tui <your_executable_at_local_pc>
On gdb prompt type:
run or just r
GDB will copy your executable to the device in \gdb folder and run it.
Here is a short list of most needed GDB commands:
- r args - run program with args arguments.
- s - step into.
- n - step over.
- ni - step over instrument.step over assembly instruction.
- c - continue execution.
- br <function_name> - set a breakpoint at function_name. Use PASCALMAIN to set a breakpoint at program start.
- br <source_file>:<line_number> - set a breakpoint at specified source line.
- disas - show disassembly of current location.
- x/fmt address - dump memory at address with special format.use "help x" for more informations.
- bt - back trace.print back trace of the call stack.
- where - Display the current line and function and the stack of calls that got you there.
- q - Quit gdb.
To learn more how to use GDB read its documentation here: http://www.gnu.org/software/gdb/documentation
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.
See Also
- WinCE port hints
- Windows CE interface for Lazarus
- Windows CE Development Notes
- WinCE port of KOL GUI library
Links
- Useful WinCE info http://www.rainer-keuchel.de/documents.html
- Standalone Pocket PC device emulator from Microsoft. It emulates ARM CPU. Get it here
- Mamaich Pocket PC port of GCC http://mamaich.uni.cc
- Buildfaq is a general FAQ about how to build and configure FPC.
Here are some links related to ARM CPU Architecture
- ARM Core Developers Forum Not that much active though.
- GCC ARM Improvement Project
- ARM ASSEMBLER Good information and codes related to arm assembly language.
- GNU ARM toolchain for Cygwin, Linux and MacOS
- Microsoft Windows CE .NET 4.2 ARM Guide
- ARM Instruction Sets & Programs Very good and consice information about arm architecture
- The ARM Instruction Set Another fine power point file about arm
Contacts
Write any questions regarding WinCE port to Yury Sidorov