i386-wince: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: i386-wince
| Old | New | Line | |
|---|---|---|---|
| 1 | + | *(WinCE only)* | |
| 2 | + | ||
| 3 | + | This page has been created to collect all information regarding [[i386-wince]] target.This page only describes usage of Win32 as a development Host. Although most of today's PDAs, Phones, Tablets use ARM CPUs - dealing with i386 version of CE might make sense as: | |
| 4 | + | ||
| 5 | + | - There exists a certain amount of industrial controllers running under i386-wince. Some of them originally where XPe but have been migrated to CE. Some of them have been created by the Alliance SIEMENS/Microsoft. | |
| 6 | + | - As Intel tries to regain market share in the embedded area (also Mobile/Tablet), it might be that more mobile/tablet will use X86 platforms ([Atom 2460 for example](http://www.anandtech.com/show/5365/intels-medfield-atom-z2460-arrive-for-smartphones)) again. | |
| 7 | + | ||
| 8 | + | ## Prerequisites | |
| 9 | + | ||
| 10 | + | - A Windows-CE Emulator (i386 Version!)\ | |
| 11 | + | For example [Windows CE 5.0 Device Emulator](http://www.microsoft.com/download/en/details.aspx?id=18481)(V 8.2.160.0).Install this to a folder. Create a Shortcut to executable(to be able to call it with command line parameters). Edit command line of link to something like\ | |
| 12 | + | "{path to exe}Emulator_500.exe" /ceimage NK.cem /ethernet virtualswitch\ | |
| 13 | + | This will startup the emulator using the NK.cem image and creates a bridged ethernet connection(set IP in emulator to fit your network if you have no DHCP server running). Also this emulator allows a shared folder between Host-PC and emulator(This can be your Lazarus project's working folder) | |
| 14 | + | - FPC Source code (I used [fpcbuild-2.6.0.zip](http://gd.tuwien.ac.at/languages/pascal/fpc/dist/2.6.0/source/fpcbuild-2.6.0.zip)) | |
| 15 | + | - Lazarus (I used a snapshot of 20120225 \[<ftp://ftp.hu.freepascal.org/pub/lazarus/snapshots/Lazarus-0.9.31-35595-fpc-2.6.1-20120226-win32.exe> Lazarus-0.9.31-35589-fpc2.6.1-20120215-win32.exe). The daily shapshot I used has been removed, but that one in the link should work too. | |
| 16 | + | ||
| 17 | + | ## Setup Lazarus/FPC for compiling i386-wince | |
| 18 | + | ||
| 19 | + | **1) Install Lazarus from above Link (just as for compiling Win32 apps)**\ | |
| 20 | + | We use PATH=C:\Prog\lazarus\931\\ in the example {lazfolder}\ | |
| 21 | + | **2) Unzip the fpc sources to a convenient folder**\ | |
| 22 | + | We use C:\Prog\fpc\2.6.0src\\ in this example\ | |
| 23 | + | **3) Create a batch file (mkCE.bat) with the following content:**\ | |
| 24 | + | ||
| 25 | + | PATH=C:\Prog\lazarus\931\fpc\2.6.0\bin\i386-win32;C:\Prog\fpc\2.6.0src\fpcsrc\compiler | |
| 26 | + | make clean all OS_TARGET=wince CPU_TARGET=i386 PP=ppc386.exe | |
| 27 | + | ||
| 28 | + | Save this batchfile to C:\PROG\FPC\2.6.0src\fpcsrc. Start this batchfile by doubleclick. (It should run from the command line too, but in my setup, from the commandline there was an error message thrown (*** no libgdb.a found, supply NOGDB=1 to disable debugger support....) - but run from the Windows GUI this run just fine. The popping up console window will show compile progress for some time until it closes again. Then you will find a new file 'build-stamp.i386-wince' in the fpsrc folder. (In this case you can be happy that all worked OK)\ | |
| 29 | + | **4) Now there are lots of compiled subfolders in the fpc tree, that need to be copied over into (other positons) of the Lazarus folders.**\ | |
| 30 | + | * **packages\\{packagename}\units\i386-wince** goes to **{lazfolder}\fpc\2.6.0\units\i386-wince\\{packagename}**\ | |
| 31 | + | where no units subfolder has been created during build, omit this folder\ | |
| 32 | + | * **rtl\units\i386-wince** goes to **{lazfolder}\fpc\2.6.0\units\i386-wince\rtl**\ | |
| 33 | + | the packages are: bzip2,chm,fastcgi,fcl-base,fcl-db,fcl-fpcunit,fcl-image,fcl-js,fcl-json,fcl-net,fcl-passrc,fcl-process,fcl-registry,fcl-res,fcl-web,fcl-xml,fftw,fpmkunit,fppkg,hash,hermes,httpd22,ibase,libgd,mysql,numlib,odbc,oggvorbis,openssl,oracle,pasjpeg,paszlib,postgres,regexpr,rtl,sdl,sqlite,symbolic,tcl,unzip,winceunits,zlib | |
| 34 | + | ||
| 35 | + | (I will provide a batchfile soon for this...) | |
| 36 | + | ||
| 37 | + | ## Test Applications | |
| 38 | + | ||
| 39 | + | If your system is a core WindowsCE and not a Windows Mobile device, you might run into an error message:\ | |
| 40 | + | *Cannot find {your app name } (or one of it's components). Make sure the path and filename are correct...*\ | |
| 41 | + | In this case, this might be most probable a missing aygshell.dll (See [[WinCE Programming Tips]]). aygshell.dll might be found in the web, but most/all of them will be for ARM or MIPS. So to get hold of one, you will have to install the Windows CE 5.0 Trial version and build a sample device. | |
| 42 | + | ||
| 43 | + | \<work in progress, will be updated...\> | |
| 44 | + | ||
| 45 | + | ### Simple graphical Hello | |
| 46 | + | ||
| 47 | + | As WinCE by default has no console, it's easier to try a graphical hello tesprogram.(for the console app you would have to install a console program or enable it first by a registry hack) \<Sourcecode\> \<Screenshot\> \<prebuilt application\> | |
| 48 | + | ||
| 49 | + | - runs on WinCE 4.2 (YES/NO) | |
| 50 | + | - runs on WinCE 5.0 (YES/NO) | |
| 51 | + | - runs on WinCE 6.0 (YES/NO) | |
| 52 | + | ||
| 53 | + | ## Useful 3rd Party Tools, Libraries, Links | |
| 54 | + | ||
| 55 | + | - Check [[WinCE port Hints]] for more details on programming under Windows CE platform. | |
| 56 | + | - [lNet](http://lnet.wordpress.com/) TCP/IP library seems to work fine (tested Visual/Nonvisual Lazarus packet and a Telnet client connecting from emulator to telnet host on Host-PC | |
| 57 | + | ||
| 58 | + | --- | |
| 59 | + | *From the Free Pascal wiki, page "i386-wince", 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).* | |
| 60 | + | Category: WinCE | |
| 61 | + | Category: x86 |
