-
Notifications
You must be signed in to change notification settings - Fork 0
Windows
To set up a development environment on Windows, there are a number of options.
- Download and install VMWare Player
- Download one of the pre-build Linux VMWare appliances (i.e. Ubuntu Desktop) from the VMWare Virtual Appliances Marketplace.
- Boot the appliance in the VMWare Player
- Follow the Linux steps inside the Virtual PC.
Cygwin creates a *NIX-like environment on Windows.
-
Download and set up Cygwin with at least the following packages:
- binutils
- includes
- gcc bootstrap
- newlib
- dll preliminary, not thread-capable
- CE libraries
- gcc, g++ complete build
- dll complete
- additional libraries (threads support, C++ DLL)
- gdb
- the debugging stub
-
Download the CeGCC cross-compiler for PocketPC version 0.55 tarball (54 MB) by clicking here: http://cegcc.svn.sourceforge.net/viewvc/cegcc/tags/cegcc-0.55/?view=tar.
-
Start a Cygwin shell (e.g., using the Start Menu shortcut created during Cygwin setup), and go to the folder where the tarball was downloaded.
-
Extract the tarball by entering the command
tar -zxvf cegcc-cegcc-0.55.tar.gz
. -
Then issue the following commands:
cd cegcc-0.55/src
mkdir build
cd build
../scripts/build-mingw32ce.sh
- Wait... The build script should eventually complete successfully, having built the cross-compiler in Cygwin's
/opt/mingw32ce/
directory. Confirm that this folder exists and isn't empty. - Exit the Cygwin shell.
- Replace the shlobj.h file with one "patched" to work for LK8000:
- Go to https://gist.github.com/820689.
- Click "download", and save the file. To simplify the next steps, change the (very long) file name to something brief (e.g., shlobj.tar.gz), and save it in your Cygwin directory (e.g.,
C:\cygwin
). - Start a Cygwin shell, navigate (using the "cd" command) to the folder where you saved the downloaded file, and extract the file by executing this command:
tar -zxvf shlobj.tar.gz
. - Replace the shlobj.h at
cygwin/opt/mingw32ce/arm-mingw32ce/include
with the one just extracted.
- Add
/opt/mingw32ce/bin:
to the PATH setting (inserting it just after "PATH=") in the fileC:\cygwin\etc\profile
. - Start the Cygwin shell again (
printenv PATH
should show the modified PATH). - Modify the LK8000 Makefile to link statically against libstdc++ like so:
LDLIBS := -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lcommctrl
-
make TARGET=PNA
should result in an LK8000-PNA.exe.
- Install MinGW, make sure to install the C++ compiler and the MinGW Developer toolkit.
- Start a MinGW shell.
- Download the LK8000 sources.
- Edit the LK8000 Makefile as follows:
ifeq ($(CONFIG_PC),y)
#TCPATH :=i386-mingw32-
TCPATH :=
and:
ifeq ($(CONFIG_PC),y)
#LDLIBS := -lmingw32 -lcomctl32 -lkernel32 -luser32 -lgdi32 -ladvapi32 -lwinmm -lmsimg32 -lstdc++
LDLIBS := -Wl,-Bstatic -lstdc++ -lmingw32 -lcomctl32 -lkernel32 -luser32 -lgdi32 -ladvapi32 -lwinmm -lmsimg32
This last change may not required anymore. If you still need to do this change, and if you're using LiveTracker then also add -lwsock32
.
- Build LK8000-PC.exe with:
make TARGET=PC
Notes:
- With this setup, it's only possible to compile the PC version of LK8000.
- The resulting executable is slightly larger (~10%) than the released version.