From: <dan...@us...> - 2006-08-26 15:51:56
|
Revision: 410 Author: dannybackx Date: 2006-08-26 08:51:39 -0700 (Sat, 26 Aug 2006) ViewCVS: http://svn.sourceforge.net/cegcc/?rev=410&view=rev Log Message: ----------- Add a test subdirectory and an attempt to build a DLL Added Paths: ----------- trunk/cegcc/test/ trunk/cegcc/test/shared/ trunk/cegcc/test/shared/Makefile trunk/cegcc/test/shared/demodll.c trunk/cegcc/test/shared/demodll.def trunk/cegcc/test/shared/testdll.c trunk/cegcc/test/shared/usedemo.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2006-10-10 19:09:58
|
Revision: 705 http://svn.sourceforge.net/cegcc/?rev=705&view=rev Author: dannybackx Date: 2006-10-10 12:09:37 -0700 (Tue, 10 Oct 2006) Log Message: ----------- Move the prerelease info into the other directory, and transform it into a "how to install on linux". Modified Paths: -------------- trunk/cegcc/docs/details.html trunk/cegcc/website/index.html Added Paths: ----------- trunk/cegcc/docs/install-linux.html Removed Paths: ------------- trunk/cegcc/website/prerelease.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2006-10-11 18:03:00
|
Revision: 708 http://svn.sourceforge.net/cegcc/?rev=708&view=rev Author: dannybackx Date: 2006-10-11 11:02:33 -0700 (Wed, 11 Oct 2006) Log Message: ----------- Fine-tune wording about Xscale vs. ARM and CE vs PocketPC Modified Paths: -------------- trunk/cegcc/docs/install-linux.html trunk/cegcc/docs/using.html trunk/cegcc/docs/what.html trunk/cegcc/website/index.html This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2006-10-29 18:14:10
|
Revision: 753 http://svn.sourceforge.net/cegcc/?rev=753&view=rev Author: dannybackx Date: 2006-10-29 10:13:51 -0800 (Sun, 29 Oct 2006) Log Message: ----------- Add a parameter so we can use the Makefile for both cegcc and mingw32ce. Modified Paths: -------------- trunk/cegcc/scripts/linux/build-libs2.sh trunk/cegcc/src/cegcc/libstdc++/Makefile Modified: trunk/cegcc/scripts/linux/build-libs2.sh =================================================================== --- trunk/cegcc/scripts/linux/build-libs2.sh 2006-10-29 06:13:13 UTC (rev 752) +++ trunk/cegcc/scripts/linux/build-libs2.sh 2006-10-29 18:13:51 UTC (rev 753) @@ -8,25 +8,22 @@ . scripts/linux/settings.sh fi # -#if [ -d $BUILD_DIR/libs ]; then -# rm -rf $BUILD_DIR/libs -#fi +# Non-standard build, for both libs. # -# Not in the MingW target -# -if [ $TGT_ARCH = arm-wince-mingw32ce ]; then - exit 0 +if [ $TGT_ARCH = arm-wince-cegcc ]; then + cd $TOP_SRCDIR/src/cegcc/cegccthrd || exit 1 + make clean TARGET=$TGT_ARCH || exit 1 + make all PREFIX=$PREFIX TARGET=$TGT_ARCH || exit 1 fi # -# Non-standard build -# -cd $TOP_SRCDIR/src/cegcc/cegccthrd || exit 1 -make clean TARGET=$TGT_ARCH || exit 1 -make all PREFIX=$PREFIX TARGET=$TGT_ARCH || exit 1 -# cd $TOP_SRCDIR/src/cegcc/libstdc++ || exit 1 make clean TARGET=$TGT_ARCH || exit 1 -make all PREFIX=$PREFIX TARGET=$TGT_ARCH || exit 1 +if [ $TGT_ARCH = arm-wince-mingw32ce ]; then + TSL="-lcoredll" +else + TSL="-lcegcc -lcoredll" +fi +make all PREFIX=$PREFIX TARGET=$TGT_ARCH THE_SYSTEM_LIBS=${TSL} || exit 1 # # End # Modified: trunk/cegcc/src/cegcc/libstdc++/Makefile =================================================================== --- trunk/cegcc/src/cegcc/libstdc++/Makefile 2006-10-29 06:13:13 UTC (rev 752) +++ trunk/cegcc/src/cegcc/libstdc++/Makefile 2006-10-29 18:13:51 UTC (rev 753) @@ -16,6 +16,8 @@ STRIP=$(TARGET)-strip WINDRES=$(TARGET)-windres +THE_SYSTEM_LIBS?="-lcegcc -lcoredll" + LIB_PATH=$(PREFIX)/$(TARGET)/lib LDFLAGS += -Wl,-Map,${MY_DIR}/$(DLLNAME).map @@ -44,8 +46,8 @@ done extract: - cd ${MY_DIR}/_tmp; $(AR) -x $(PREFIX)/lib/libsupc++.a - cd ${MY_DIR}/_tmp; $(AR) -x $(PREFIX)/lib/libstdc++.a + cd ${MY_DIR}/_tmp; $(AR) -x $(PREFIX)/$(TARGET)/lib/libsupc++.a + cd ${MY_DIR}/_tmp; $(AR) -x $(PREFIX)/$(TARGET)/lib/libstdc++.a ${MY_DIR}/stripped/$(DLLNAME): @mkdir -p ${MY_DIR}/stripped @@ -54,6 +56,19 @@ $(STRIP) ${MY_DIR}/$(DLLNAME)-stripped.dll @mv -vf ${MY_DIR}/$(DLLNAME)-stripped.dll ${MY_DIR}/stripped/$(DLLNAME) +# ${MY_DIR}/$(DLLNAME).a \ +# ${MY_DIR}/$(DLLNAME).def \ +# ${MY_DIR}/$(DLLNAME): +# $(CC) $(LDFLAGS) -shared \ +# -Wl,--enable-auto-import \ +# -Wl,--enable-runtime-pseudo-reloc \ +# -Wl,--export-all-symbols \ +# -o ${MY_DIR}/$(DLLNAME) \ +# -Wl,--out-implib,${MY_DIR}/$(DLLNAME).a \ +# -Wl,--output-def,${MY_DIR}/$(DLLNAME).def \ +# -Wl,--whole-archive ${MY_DIR}/_tmp/*.o \ +# -Wl,-no-whole-archive -lcegcc -lcoredll + ${MY_DIR}/$(DLLNAME).a \ ${MY_DIR}/$(DLLNAME).def \ ${MY_DIR}/$(DLLNAME): @@ -65,7 +80,7 @@ -Wl,--out-implib,${MY_DIR}/$(DLLNAME).a \ -Wl,--output-def,${MY_DIR}/$(DLLNAME).def \ -Wl,--whole-archive ${MY_DIR}/_tmp/*.o \ - -Wl,-no-whole-archive -lcegcc -lcoredll + -Wl,-no-whole-archive ${THE_SYSTEM_LIBS} installdll: ${MY_DIR}/stripped/$(DLLNAME) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Pedro A. <ped...@po...> - 2006-10-29 18:28:55
|
dan...@us... wrote: > Revision: 753 > http://svn.sourceforge.net/cegcc/?rev=753&view=rev > Author: dannybackx > Date: 2006-10-29 10:13:51 -0800 (Sun, 29 Oct 2006) > > Log Message: > ----------- > Add a parameter so we can use the Makefile for both cegcc and mingw32ce. > > dlls for mingw32ce runtime should be generated with src/script.sh ... There is the issue of deciding if we want to go the dll route, or leave everything static so we don't have any dll dependency. That is the way MinGW desktop version works, but there are some known problems with it using recent versions of gcc in passing std::string around dlls, and with exception propagation across dlls, so they may switch to dll versions too when they switch to gcc-4.x (they still use gcc-3.x). Cheers, Pedro Alves |
From: <dan...@us...> - 2007-11-22 19:51:44
|
Revision: 1077 http://cegcc.svn.sourceforge.net/cegcc/?rev=1077&view=rev Author: dannybackx Date: 2007-11-22 11:51:03 -0800 (Thu, 22 Nov 2007) Log Message: ----------- Add the FAQ Modified Paths: -------------- trunk/cegcc/docs/build-toolchain.html trunk/cegcc/docs/choosing.html trunk/cegcc/docs/debugging.html trunk/cegcc/docs/details.html trunk/cegcc/docs/dll.html trunk/cegcc/docs/index.html trunk/cegcc/docs/install-linux.html trunk/cegcc/docs/layer.html trunk/cegcc/docs/license.html trunk/cegcc/docs/profile.html trunk/cegcc/docs/reporting.html trunk/cegcc/docs/structure.html trunk/cegcc/docs/using.html trunk/cegcc/docs/what.html trunk/cegcc/website/index.html trunk/cegcc/website/software-that-works.html Added Paths: ----------- trunk/cegcc/docs/faq.html Modified: trunk/cegcc/docs/build-toolchain.html =================================================================== --- trunk/cegcc/docs/build-toolchain.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/build-toolchain.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -277,6 +277,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/docs/choosing.html =================================================================== --- trunk/cegcc/docs/choosing.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/choosing.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -74,6 +74,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/docs/debugging.html =================================================================== --- trunk/cegcc/docs/debugging.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/debugging.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -329,6 +329,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/docs/details.html =================================================================== --- trunk/cegcc/docs/details.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/details.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -235,6 +235,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/docs/dll.html =================================================================== --- trunk/cegcc/docs/dll.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/dll.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -56,6 +56,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Added: trunk/cegcc/docs/faq.html =================================================================== --- trunk/cegcc/docs/faq.html (rev 0) +++ trunk/cegcc/docs/faq.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -0,0 +1,872 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<!-- + The CeGCC FAQ + + last update: see the bottom of this file +--> + +<HTML LANG="en"> + +<HEAD> + +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> + +<TITLE>CeGCC FAQ</TITLE> + +</HEAD> + +<BODY TEXT="#000000" LINK="#000099" VLINK="#660066" BGCOLOR="#FFFFFF" ALINK="#FF0040"> + +<!-- BEGIN OF CONTENT --> + +<H1> +Everything you always wanted to know about CeGCC but were afraid to ask. +</H1> +The author of this FAQ is Jacek M. Holeczek. Thank you Jacek ! + +<HR NOSHADE> + +<H3><A NAME="ToC">Table of Contents</A></H3> + +<OL> + + <!-- QUESTION TEMPLATE BEGIN --- + + <LI><A HREF="#PUT_YOUR_QUESTION_REFERENCE_HERE">PUT_YOUR_QUESTION_HERE</A></LI> + + ---- QUESTION TEMPLATE END --> + +<!-- BEGIN OF QUESTIONS --> + + <LI><A HREF="#WinCE">What are "Windows (Embedded) CE", "Windows Mobile", "Handheld + PC", "Pocket PC", "SmartPhone" and "Portable Media Center"?</A></LI> + + <LI><A HREF="#FileTransfer">How can I transfer files between my PC and my WinCE device?</A></LI> + + <LI><A HREF="#Emulator">Can I debug/test my DLL/EXE entirely on the PC itself (without any risk to make any harm to my WinCE device)?</A></LI> + + <LI><A HREF="#DDD">I hate to use the command-line driven "gdb"! Doesn't there exist any debugger with a graphical front-end?</A></LI> + + <LI><A HREF="#GdbError126Stub">I get "Unable to start remote stub '\gdb\wince-stub.exe'. Windows CE error 126." when I try to debug MyProgram with the "arm-wince-cegcc-gdb".</A></LI> + + <LI><A HREF="#GdbError126User">I get "Error creating process \gdb\MyProgram.exe, (error 126)." when I try to debug MyProgram.</A></LI> + + <LI><A HREF="#GdbMappingError">I get "Error while mapping shared library sections: coredll.dll: No such file or directory." when I try to debug MyProgram.</A></LI> + + <LI><A HREF="#GdbStippedExe">I get "No line number known for MyProcedure", or "(no debugging symbols found)", or "No symbol table is loaded. Use the 'file' command.", when I try to debug MyProgram.</A></LI> + + <LI><A HREF="#GdbDonPedro">I get "/cygdrive/e/pedro/cegcc/0.50/src/mingw/crt3.c: No such file or directory.", or "Function 'main' not defined.", when I try to "list" the source code in the debugger (and who's that mysterious Don Pedro anyhow?).</A></LI> + + <LI><A HREF="#LargeBinaries">Why is my "arm-wince-mingw32ce-g++" compiled DLL/EXE so large?</A></LI> + + <LI><A HREF="#MissingSymbols">The arm-wince-mingw32ce compiler complains about undeclared identifier 'SOME_WIN_CE_IDENTIFIER'.</A></LI> + + <LI><A HREF="#MissingFunctions">The arm-wince-mingw32ce linker complains about undefined reference to 'SomeWinCeFunctionW' (and what's that "W" suffix appended to the function's name?).</A></LI> + + <LI><A HREF="#MissingDLLImports">How can I find/trace any missing "DLL imports"?</A></LI> + <LI><A HREF="#LastErrorC1">I get "GetLastError returns c1" when + I try to use my DLL/EXE.</A></LI> + <LI><A HREF="#BadExeFormat">I get "ERROR_BAD_EXE_FORMAT" when + I try to use my DLL/EXE.</A></LI> + <LI><A HREF="#FileNotWinCEApplication">I get "'MyProgram' is not a + valid Windows CE application" when I try to run MyProgram.</A></LI> + + <LI><A HREF="#More">Need More Informations?</A></LI> + +<!-- END OF QUESTIONS --> + +</OL> + +<HR NOSHADE> + +<OL> + + <!-- ANSWER TEMPLATE BEGIN --- + + <LI> + <STRONG><A NAME="PUT_YOUR_QUESTION_REFERENCE_HERE"> + PUT_YOUR_QUESTION_HERE + </A></STRONG><BR> + <P> + PUT_YOUR_ANSWER_HERE + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + ---- ANSWER TEMPLATE END --> + +<!-- BEGIN OF ANSWERS --> + + <!-- WinCE --> + + <LI> + <STRONG><A NAME="WinCE"> + What are "Windows (Embedded) CE", "Windows Mobile", "Handheld PC", "Pocket PC", + "SmartPhone" and "Portable Media Center"? + </A></STRONG><BR> + <P> + See + <A HREF="http://en.wikipedia.org/">Wikipedia</A> + articles about the + <A HREF="http://en.wikipedia.org/wiki/Windows_CE">Windows CE</A> + and the + <A HREF="http://en.wikipedia.org/wiki/Windows_Mobile">Windows Mobile</A>. + See the + <A HREF="http://www.hpcfactor.com/qlink/?linkID=20">History & Overview of Windows CE</A> + and the + <A HREF="http://www.hpcfactor.com/support/cesd/s/0108.asp">Determining the Windows CE / H/PC version</A> + from the + <A HREF="http://www.hpcfactor.com/support/">HPC:Factor CESD</A>, + the + <A HREF="http://www.pocketpcfaq.com/wce/versions.htm">Windows CE / Windows Mobile Versions</A> + table from the + <A HREF="http://www.pocketpcfaq.com/">Pocket PC FAQ</A>, + and the + <A HREF="http://msdn2.microsoft.com/en-us/windowsmobile/bb264342.aspx">Learn Windows Mobile</A> + from the + <A HREF="http://msdn2.microsoft.com/en-us/windowsmobile/default.aspx">Windows Mobile Developer Center</A>. + In practice, all this means that, different WinCE driven devices come with + different sets of implemented functions in the system provided default + DLLs, and even with partially different sets of system provided default DLLs. + This in turn means that, a utility (or a DLL), which runs on one variation of WinCE, + may refuse to start on another one (even when their kernel versions match), just because + <A HREF="#MissingDLLImports">some required functions are missing in some system DLLs, or even some required system DLLs are missing at all</A>. + <BR>Note also that, while compiling your source code, you may need to +<A HREF="details.html"> +define the "_WIN32_IE" and the "_WIN32_WCE" macros +</A>, +in order to tell the compiler which version of WinCE you're using. + + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- FileTransfer --> + + <LI> + <STRONG><A NAME="FileTransfer"> + How can I transfer files between my PC and my WinCE device? + </A></STRONG><BR> + <P> + Several possibilities exist. +<UL> + +<LI> +If you use PC Windows (x86/x64), you may need to use the + "standard" native tool provided by the system. + WE WILL ALWAYS REFERENCE TO IT AS TO THE + <A HREF="http://en.wikipedia.org/wiki/Activesync">ActiveSync</A> + (USB, Infrared, Serial, Bluetooth, WiFi/LAN/Dial-up TCP/IP - support depends on the version), + while in fact ... + <UL> +<LI> + On Windows XP SP2 and earlier, you need the "real" + <A HREF="http://en.wikipedia.org/wiki/Activesync">ActiveSync</A>. + If you want to connect to a WinCE 6.0 based device, you will definitely need the + <A HREF="http://www.microsoft.com/windowsmobile/activesync/default.mspx">ActiveSync 4.5, or newer</A> + (WinCE 3.0 and newer supported). + On the other hand, starting with this release, Microsoft Office + Outlook 2000 is no longer supported (you need Outlook 2003 or newer). + Hence, if your device is WinCE 5.0 based, you can use the + <A HREF="http://www.microsoft.com/downloads/details.aspx?FamilyID=7269173a-28bf-4cac-a682-58d3233efb4c&DisplayLang=en">ActiveSync 4.2</A> + (WinCE 3.0 and newer supported, see also + <A HREF="http://www.hpcfactor.com/qlink/?linkID=8#Download">here</A>). + For yet older WinCE based devices, try the + <A HREF="http://www.hpcfactor.com/qlink/?linkID=7#Download">ActiveSync 3.8</A> + (from WinCE 2.0 to WinCE 4.2.1, maybe also WinCE 5.0). + <BR>Getting this really big s..t working may often be very, if not + "extremely", difficult. + The best idea, which solves all these problems (and many, many, many more), is + to delete PC Windows and install <A HREF="http://en.wikipedia.org/wiki/Linux">Linux</A>. + If you, however, still insist on running PC Windows, some advices are + <A HREF="http://www.pocketpcfaq.com/faqs/t-shootactivesync.htm">here</A>, + <A HREF="http://www.pocketpcfaq.com/wiki/tiki-index.php?page=Unresolved+Activesync+Problems">here</A>, + <A HREF="http://bevhoward.com/ASync.htm">here</A>, + <A HREF="http://blogs.msdn.com/jasonlan/archive/2006/03/22/556946.aspx">here</A>, + <A HREF="http://modernnomads.info/wiki/index.php?page=ActiveSync+4.0+Troubleshooting">here</A>, + <A HREF="http://modernnomads.info/wiki/index.php?page=ActiveSync+3.8+Troubleshooting">here</A>, + <A HREF="http://www.hpcfactor.com/support/cesd/i/S0017.asp">here</A>, + <A HREF=" http://kb.palm.com/SRVS/CGI-BIN/WEBCGI.EXE?New,Kb=PalmSupportKB,ts=Palm_External2001,Case=obj(41820)">here</A>, + <A HREF="http://support.microsoft.com/?scid=915152">here</A>, + and <A HREF="http://www.microsoft.com/windowsmobile/help/activesync/default.mspx">here</A>. + See also the +<A HREF="http://www.hpcfactor.com/support/syncsoft/">Handheld PC Desktop Synchronisation Software</A> + article from the + <A HREF="http://www.hpcfactor.com/support/">HPC:Factor CESD</A>, +and the +<A HREF="http://www.pocketpcfaq.com/wiki/tiki-index.php?page=ActiveSync">Pocket PC ActiveSync FAQ Wiki</A>. +</LI> +<LI> + On Windows Vista (and newer), you need the "new tool" called + <A HREF="http://www.microsoft.com/windowsmobile/devicecenter.mspx">Windows Mobile Device Center</A> + (WinCE 4.2 based devices and newer supported). + Problems? Install <A HREF="http://en.wikipedia.org/wiki/Linux">Linux</A>! Otherwise, see + <A HREF="http://www.pocketpcfaq.com/faqs/wmdc/t-shoot-wmdc.htm">here</A>, + <A HREF="http://modernnomads.info/wiki/index.php?page=Windows+Mobile+Device+Center+Troubleshooting">here</A>, + and <A HREF="http://www.microsoft.com/windowsmobile/devicecenter/troubleshooting.mspx">here</A>. +</LI> +</UL> +Note, on top of these tools, you can also use the +<A HREF="http://www.xs4all.nl/~itsme/projects/xda/tools.html">Xda RAPI Utilities</A>. +</LI> + +<LI> +If you use <A HREF="http://en.wikipedia.org/wiki/Linux">Linux</A> + (or another UNIX like system with USB, Bluetooth, WiFi/LAN), see the +<A HREF="http://www.synce.org/">SynCE</A> + and the + <A HREF="http://en.wikipedia.org/wiki/OpenSync">OpenSync</A> + projects, for example (note: many contemporary distributions come + with such packages built-in, i.e. ready to use). And, if you (accidentally) do not use <A + HREF="http://en.wikipedia.org/wiki/Linux">Linux</A> (yet), think it through! +</LI> + +<LI> +If your WinCE device has any +<A HREF="http://en.wikipedia.org/wiki/Memory_card">flash memory card</A> +reader (SD, CF, ...), you can use these cards. +</LI> + +<LI> +If your WinCE device has any Internet connectivity (Ethernet, Wi-Fi, or Bluetooth), you can use it. +</LI> + +</UL> + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- Emulator --> + + <LI> + <STRONG><A NAME="Emulator"> + Can I debug/test my DLL/EXE entirely on the PC itself (without any risk to make any harm to my WinCE device)? + </A></STRONG><BR> + <P> + +If you use a contemporary PC Windows (x86/x64) system, then you can + use the free +<A HREF="http://www.microsoft.com/downloads/details.aspx?FamilyID=dd567053-f231-4a64-a648-fea5e7061303&DisplayLang=en">Microsoft Device Emulator 2.0 -- Standalone Release</A>. + +<UL> +<LI> +It runs code compiled for ARM processors. In most cases, you can run the same binaries on the emulator as you do on the device. +</LI> +<LI> +You can connect a runnning Device Emulator to a directory on your PC as if the directory were a drive mounted on the Device Emulator. In the file system for the Device Emulator, the connected directory appears at the root level as Storage Card (you can connect the Device Emulator to only one directory, with all its subdirectories, at a time). +</LI> +<LI> +It supports synchronizing with +<A HREF="#FileTransfer">ActiveSync</A>. +This feature allows you to debug applications that are syncing, or be able to use real synchronized data from within the Device Emulator. +Use the Device Emulator Manager (DEM) to start, connect to, and manage Device Emulator instances on your PC. Using the DEM menu commands, you can connect to the emulator, cradle and uncradle it, shut it down, reset it, bring it to the front, clear saved states, refresh images, and perform other tasks. +When a device is cradled, it can communicate using <A HREF="#FileTransfer">ActiveSync</A> (synchronizing contents of email, calendar, application installations, and so on). The Device Emulator by itself has no equivalent functionality and cannot work with <A HREF="#FileTransfer">ActiveSync</A> unless it is cradled. A common scenario is to launch the Device Emulator, cradle it using the DEM, and then establish an <A HREF="#FileTransfer">ActiveSync</A> (set "File -> Connection Settings... -> Allow connections to one of the following: DMA") partnership with it. +</LI> +</UL> + +In order to use it, you just need to: + +<UL> + +<LI> +(well, if you haven't done it yet, then download and install an appropriate, for + your PC Windows system release, version of the free + <A HREF="#FileTransfer">ActiveSync</A> software) +</LI> + <LI> +download and install the free +<A HREF="http://www.microsoft.com/downloads/details.aspx?FamilyID=04d26402-3199-48a3-afa2-2dc0b40a73b6&DisplayLang=en"> +Virtual PC 2007</A>, +</LI> +<LI> +download and install the free +<A HREF="http://www.microsoft.com/downloads/details.aspx?FamilyID=dd567053-f231-4a64-a648-fea5e7061303&DisplayLang=en"> +Microsoft Device Emulator 2.0 -- Standalone Release</A>, +</LI> +<LI> +download and install the free ARM CPU Emulator Images (you need at least one, you can + install as many of them as you like): + <UL> +<LI> + for Windows Mobile 5.0 MSFP (ARM CPU) operating system images, get the free + <A HREF="http://www.microsoft.com/downloads/details.aspx?familyid=C62D54A5-183A-4A1E-A7E2-CC500ED1F19A&displaylang=en"> + efp.msi</A> file (English language version only, both, the "Pocket PC", and the + "SmartPhone" WinCE 5.0 ARM CPU operating system images + are provided; unfortunately, the pure "WinCE 5.0 Core" + image is not provided); do not install the + "V1Emulator.zip" file, you've already installed the + V2 release of the Device Emulator in the previous step, +</LI> +<LI> + for Windows Mobile 6 MSFP (ARM CPU) operating system images, get the free + <A HREF="http://www.microsoft.com/downloads/details.aspx?familyid=38C46AA8-1DD7-426F-A913-4F370A65A582&displaylang=en">Windows Mobile 6 Localized Emulator Images</A> + (versions for many languages are provided, + <A HREF="http://msdn2.microsoft.com/en-us/windowsmobile/bb264342.aspx#Difference"> + "Professional/Classic" and "Standard"</A> + images are provided, the pure "WinCE 6.0 Core" + image is not provided). +</LI> +</UL> + +</UL> + +The installation will create shortcuts on your start menu from where you can launch the various configurations of the Windows Mobile 5.0/6 MSFP (ARM CPU). You will also see a shortcut for the Device Emulator Manager (DEM) using which you can launch any of the installed images. + +<BR>Note again that, you do NOT need any non-free tools (in particular, you do NOT need the +<A HREF="http://en.wikipedia.org/wiki/Visual_studio"> +Microsoft Visual Studio</A>, +for example). +<BR>For the time being, I do not know if this software can be used on +<A HREF="http://en.wikipedia.org/wiki/Linux">Linux</A> +with the <A HREF="http://www.winehq.org/">Wine</A>), sorry. + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- DDD --> + + <LI> + <STRONG><A NAME="DDD"> + I hate to use the command-line driven "gdb"! Doesn't there exist any debugger with a graphical front-end? + </A></STRONG><BR> + <P> + Well, you can use the free + <A HREF="http://www.gnu.org/software/ddd/">GNU Data Display Debugger (DDD)</A>. + It's a graphical front-end for several command-line debuggers, including the + <A HREF="http://www.gnu.org/software/gdb/gdb.html">gdb</A>. + Besides "usual" front-end features, such as viewing source texts, + <A HREF="http://www.gnu.org/software/ddd/">DDD</A> + has become famous through its interactive graphical data display, + where data structures are displayed as graphs. + When invoking + <A HREF="http://www.gnu.org/software/ddd/">DDD</A>, + you simply need to specify the name under which the inferior debugger is to be invoked: + <UL> + <LI> + ddd --debugger "arm-wince-[cegcc/mingw32ce]-gdb" MyProgram.exe + </LI> + </UL> + Note however, from time to time, you will still need to interact with the + <A HREF="http://www.gnu.org/software/gdb/gdb.html">gdb</A>, via its command-line console window + (integrated in <A HREF="http://www.gnu.org/software/ddd/">DDD</A>). + <BR>For more informations see the + <A HREF="http://www.gnu.org/manual/ddd/html_mono/ddd.html">DDD Manual</A>. + <BR>See also <A HREF="#GdbDonPedro">this answer</A>, if you're debugging a GUI application. + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- GdbError126Stub --> + + <LI> + <STRONG><A NAME="GdbError126Stub"> + I get "Unable to start remote stub '\gdb\wince-stub.exe'. Windows CE error 126." when I try to debug MyProgram with the "arm-wince-cegcc-gdb". + </A></STRONG><BR> + <P> + The arm-wince-cegcc compiled binaries (including the "arm-wince-cegcc-stub.exe") require at least the "cegcc.dll" to be present on your WinCE device. + You can <A HREF="#FileTransfer">copy</A> +the "/opt/cegcc/arm-wince-cegcc/lib/device/cegcc.dll" to the "\gdb" subdirectory, or to the "\Windows" subdirectory, or to any subdirectory that is present in the registry subkey "SystemPath", in the "HKEY_LOCAL_MACHINE\Loader" registry entry, on your WinCE device (any change to the "SystemPath" subkey itself does not take effect until the WinCE device is reset). + <BR>You should not get this error when you try to use the "arm-wince-mingw32ce-gdb" (arm-wince-mingw32ce binaries NEVER need the "cegcc.dll", so also the "arm-wince-mingw32ce-stub.exe" does not need it), unless you are trying to debug an arm-wince-cegcc binary (the arm-wince-cegcc generated binary DLL/EXE will need it, of course), but in this case you should switch back to the "arm-wince-cegcc-gdb". + <BR>See <A HREF="dll.html">Beware! need to install CeGCC DLL's first</A>, and + <A HREF="#MissingDLLImports">How can I find/trace any missing "DLL imports"?</A>. + <BR>Note, the magic error "126", hexadecimal "0x7e", known also as "ERROR_MOD_NOT_FOUND" and "The specified module could not be found", is defined in the "winerror.h". + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- GdbError126User --> + + <LI> + <STRONG><A NAME="GdbError126User"> + I get "Error creating process \gdb\MyProgram.exe, (error 126)." when I try to debug MyProgram. + </A></STRONG><BR> + <P> + Your DLL/EXE could not be loaded/started. + This usually means that, one (or more) DLLs, required by your DLL/EXE, are missing on your WinCE device + (or, if all DLLs exist, one or more functions, which your program needs, are missing in some of them). + + You need to <A HREF="#FileTransfer">copy</A> +the required DLLs to the "\gdb" subdirectory, or to the "\Windows" subdirectory, or to any subdirectory that is present in the registry subkey "SystemPath", in the "HKEY_LOCAL_MACHINE\Loader" registry entry, on your WinCE device (any change to the "SystemPath" subkey itself does not take effect until the WinCE device is reset). + + <BR>See <A HREF="dll.html">Beware! need to install CeGCC DLL's first</A>, + <A HREF="#LastErrorC1">I get "GetLastError returns c1" when I try to use my DLL/EXE.</A>, + and + <A HREF="#MissingDLLImports">How can I find/trace any missing "DLL imports"?</A>. + <BR>Note, the magic error "126", hexadecimal "0x7e", known also as "ERROR_MOD_NOT_FOUND" and "The specified module could not be found", is defined in the "winerror.h". + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- GdbMappingError --> + + <LI> + <STRONG><A NAME="GdbMappingError"> + I get "Error while mapping shared library sections: coredll.dll: No such file or directory." when I try to debug MyProgram. + </A></STRONG><BR> + <P> + So what? Does it really bother you THAT much? Haven't you got any more serious problems in your life? + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- GdbStippedExe --> + + <LI> + <STRONG><A NAME="GdbStippedExe"> + I get "No line number known for MyProcedure", or "(no debugging symbols found)", or "No symbol table is loaded. Use the 'file' command.", when I try to debug MyProgram. + </A></STRONG><BR> + <P> + <UL> + <LI> + The error "No line number known for MyProcedure" means that the debugging symbols are not present in your binary DLL/EXE. It seems, you've forgotten to use the "-g" compiler flag (when compiling your source code). + </LI> + <LI> + The errors "(no debugging symbols found)" and "No symbol table is loaded. Use the 'file' command." mean that symbol table and relocation information have been removed from your binary DLL/EXE. Either you've been using the "-s" compiler flag (when compiling your source code), or you've run "arm-wince-[cegcc/mingw32ce]-strip MyProgram.[dll/exe]" later. + </LI> + </UL> + The best idea is to recompile your source code (with "-g" and without "-s" compiler flags), and then try to debug it once again. + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- GdbDonPedro --> + + <LI> + <STRONG><A NAME="GdbDonPedro"> + I get "/cygdrive/e/pedro/cegcc/0.50/src/mingw/crt3.c: No such file or directory.", or "Function 'main' not defined.", when I try to "list" the source code in the debugger (and who's that mysterious Don Pedro anyhow?). + </A></STRONG><BR> + <P> + You get this error message because, the debugger tries to "list" the source code for the "program entry point routine", which it apparently cannot locate in your source code. + <BR>Most probably, you're trying to debug an application which is a WinCE GUI (Graphical User Interface) application. + The normal user's startup routine for such an application is called "WinMain". + However, the "standard" entry point, for C/C++ language programs, is the "main". + So, CeGCC implements a special glue module which automatically defines the "main" function for you, which then calls your "WinMain" routine. + <BR>The solution is simple, just ask the debugger to "list WinMain", and you should immediately see your source code, unless you have forgotten to <A HREF="#GdbStippedExe">provide the debugging symbols</A>. + <BR>Note also that, when you compile a program that has the "main" routine of its own, then the automatic CeGCC "main" module is simply not used. In this case, you should never get such an error message, unless you have forgotten to <A HREF="#GdbStippedExe">provide the debugging symbols</A> (try to "list main"), of course. + <BR>See <A HREF="profile.html#start and terminate">Startup and termination of WinCE programs</A>. + <BR>Last, but not least, that mysterious <A HREF="mailto:ped...@po...">Don Pedro</A> is the one whoem you own a big tribute, for the possiblility to run your CeGCC binary distribution. He's the one who prepared it for you. + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- LargeBinaries --> + + <LI> + <STRONG><A NAME="LargeBinaries"> + Why is my "arm-wince-mingw32ce-g++" compiled DLL/EXE so large? + </A></STRONG><BR> + <P> + First, let me explain, why I am taking about the "arm-wince-mingw32ce-g++" compiler only, and not about the "arm-wince-cegcc-g++". + The reason is simple. The "arm-wince-mingw32ce" target ALWAYS STATICALLY LINKS the +<A HREF="http://en.wikipedia.org/wiki/C%2B%2B_standard_library">stdc++ library</A> +into your every DLL/EXE binary. + This may cause some really LARGE PARTS of this library to be INCLUDED in EACH of your DLL/EXE. You aks why? So do I! Apparently, it is the conseqence of the fact that, this target comes from the <A HREF="http://www.mingw.org/">MinGW</A> project, and +<A HREF="http://www.mingw.org/mingwfaq.shtml#faq-cpp-size"> +that's how they do it</A>. + The "arm-wince-cegcc" target, on the other hand, uses DYNAMICALLY LINKED +<A HREF="http://en.wikipedia.org/wiki/C%2B%2B_standard_library">stdc++ library</A>, +by default (of course, +<A HREF="dll.html">Beware! need to install CeGCC DLL's first</A>). + + <BR>So, let us now try to get the lowest possible size of your "arm-wince-mingw32ce-g++" compiled binaries. Let us create a very dumb "MyProgram.cpp", which contains just "int main(void) { return 0; }". +<UL> + + <LI> + +If you do not need to debug your DLL/EXE any more, get rid of all symbol table and relocation information from it. Either <A HREF="#GdbStippedExe">remove them using "arm-wince-[cegcc/mingw32ce]-strip MyProgram.[dll/exe]", or recompile your source code WITHOUT the "-g" and WITH the "-s" compiler flags</A>. +<BR>The example "MyProgram.cpp" compiled WITH "-g" is 203 kB long (for "arm-wince-cegcc-g++" it is just 18 kB long), but stripped, it is just 40 kB long (for "arm-wince-cegcc-g++", it is just 3 kB long, when stripped). + + </LI> + + <LI> + +If you do not need the +<A HREF="http://en.wikipedia.org/wiki/Exception_handling">exception handling</A> +(i.e. +"<A HREF="http://www.parashift.com/c++-faq-lite/exceptions.html">try/catch/throw</A>") +in your source code, compile it adding the "-fno-exceptions" compiler flag. +The <A HREF="http://en.wikipedia.org/wiki/Exception_handling">exception handling</A> +generates extra code needed to propagate exceptions, which then triggers some +<A HREF="http://en.wikipedia.org/wiki/C%2B%2B_standard_library">stdc++ library</A> +("/opt/mingw32ce/arm-wince-mingw32ce/lib/libstdc++.a") functions + +to be statically linked into your DLL/EXE. + +<BR>Note that, if you do not specify this option, GNU CC will enable +<A HREF="http://en.wikipedia.org/wiki/Exception_handling">exception handling</A> +by default for languages like C++ which normally require it, +and disable it for languages like C that do not +normally require it. However, you may need to enable this option +when compiling C code (adding the "-fexceptions" compiler flag) +that needs to interoperate properly with exception handlers written in C++. +<BR>The example "MyProgram.cpp" compiled WITH "-fexceptions" (the default), and stripped, is 40 kB long, but compiled WITH "-fno-exceptions", and stripped, is just 4.5 kB long (for "arm-wince-cegcc-g++", it doesn't really matter, it's always about 3 kB long, when stripped). + + <LI> + +Avoid using any +<A HREF="http://en.wikipedia.org/wiki/Standard_Template_Library">Standard Template Library</A> +elements, especially in your DLL libraries, no matter what the cost! +C++ programs (and shared libraries) using the +<A HREF="http://en.wikipedia.org/wiki/Standard_Template_Library">Standard Template Library</A> +(e.g. which "#include <iostream>" or any close "relative") cause a really large part of the +<A HREF="http://en.wikipedia.org/wiki/C%2B%2B_standard_library">stdc++ library</A> +("/opt/mingw32ce/arm-wince-mingw32ce/lib/libstdc++.a") to be statically linked into the binary. +<BR>If the only functions from "libstdc++.a" which you need are language support functions (those listed in +<A HREF="http://www.zib.de/benger/C++/clause18.html">the Clause 18 of the C++ Standard</A>, +e.g. "new" and "delete"), then try linking against "libsupc++.a" (using gcc instead of g++ and explicitly linking in "-lsupc++" for the final link step should do it). This library contains only those support routines, one per object file. But if you are using anything from the rest of the library, such as "IOStreams" or "Vectors", then you'll still need pieces from "libstdc++.a". +<BR>Let us now extend the "MyProgram.cpp" example. Let us add a line in form "#include <iostream>", before our "main" routine (we will NOT use any "IOStreams", it is sufficient to just include this file). The extended example "MyProgram.cpp" compiled WITH "-g" is almost 4 MB long (for "arm-wince-cegcc-g++", it is just 49 kB long). Stripped, it is still 544 kB long (for "arm-wince-cegcc-g++", it is just 3.5 kB long, when stripped). The "-fno-exceptions" compiler flag has no impact on the size now (the +<A HREF="http://en.wikipedia.org/wiki/C%2B%2B_standard_library">stdc++ library</A> +<A HREF="http://en.wikipedia.org/wiki/Exception_handling">exception handling</A> +code is always linked in anyhow, because it's used by the +<A HREF="http://en.wikipedia.org/wiki/Standard_Template_Library">Standard Template Library</A> +routines, I believe). + + </LI> + +</UL> + +Last, but not least, you can, of course, use the above advices to minimize the size of your "arm-wince-mingw32ce-gcc" generated DLL/EXE binaries, too (i.e. when you compile any C source code, except for the +<A HREF="http://en.wikipedia.org/wiki/Standard_Template_Library">Standard Template Library</A> +advice, which is C++ specific). + + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- MissingSymbols --> + + <LI> + <STRONG><A NAME="MissingSymbols"> + The arm-wince-mingw32ce compiler complains about undeclared identifier 'SOME_WIN_CE_IDENTIFIER'. + </A></STRONG><BR> + <P> + + First, make sure that you +<A HREF="details.html"> +properly define the "_WIN32_IE" and the "_WIN32_WCE" macros +</A>, +while compiling your source code (in order to tell the compiler which version of WinCE you're using). + + <BR>If you do, then it's quite possible that you've hit a CeGCC bug. + + <BR>Indeed, we don't have all the macros we should have. Our include files ("/opt/mingw32ce/arm-wince-mingw32ce/include/*") +are inherited from other projects (e.g. <A HREF="http://www.mingw.org/">MinGW</A>). +They're very good, but they tend to lack some WinCE specific stuff (well, WinCE is not their focus). +A patch for our include files would be very welcome. +The good sources for this information are (in this order): +<UL> +<LI> +reliable documentation, such as +<A HREF="http://msdn2.microsoft.com/en-us/library/ms376734.aspx">MSDN</A>, +</LI> +<LI> +publicly avaiable programming examples. +</LI> +</UL> + +A bad source for such information is a copy of a Microsoft include file - that's copyrighted. + +<BR>In any case, please, do inform us about the missing identifier +(regardless whether you were able to fix it, or not), using either the +<A HREF="http://sourceforge.net/tracker/?group_id=173455">CeGCC Tracker</A> +system, and/or the +<A HREF="http://sourceforge.net/mailarchive/forum.php?forum_name=cegcc-devel">cegcc-devel</A> +mailing list. + + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- MissingFunctions --> + + <LI> + <STRONG><A NAME="MissingFunctions"> + The arm-wince-mingw32ce linker complains about undefined reference to 'SomeWinCeFunctionW' (and what's that "W" suffix appended to the function's name?). + </A></STRONG><BR> + <P> + + First, make sure that you +<A HREF="details.html"> +properly define the "_WIN32_IE" and the "_WIN32_WCE" macros +</A>, +while compiling your source code (in order to tell the compiler which version of WinCE you're using). + + <BR>If you do, then it's quite possible that you've hit a CeGCC bug. + +<BR>In general, because the +<A HREF="http://en.wikipedia.org/wiki/Comparison_of_Windows_versions"> +Microsoft Windows System comes in so many flavours</A>, +there exist two mysterious suffixes, "A" and "W", which may get appended to function names. +They directly correspond to the "ASCII" and the "Wide-Character" versions of the Windows API. +The system include files are meant to automatically map a function name into a function with +an added "A" or "W" to its name, depending on whether the "UNICODE" macro is defined, or not. +For WinCE, however, the "UNICODE" should always be defined, as WinCE supports only that part of the API. +Hence, there is no need to append the "W" suffix in this case (and it should not be present). +Our include files ("/opt/mingw32ce/arm-wince-mingw32ce/include/*") are inherited from other projects (e.g. <A HREF="http://www.mingw.org/">MinGW</A>). +They're very good, but they tend to lack some WinCE specific stuff (well, WinCE is not their focus). +<BR>By running "arm-wince-mingw32ce-strings" on the right library file ("/opt/mingw32ce/arm-wince-mingw32ce/lib/*.a"), you can check whether the "SomeWinCeFunction" is present in there. +If it is not there, then +<A HREF="#MissingSymbols">we need to implement this function</A>. +If it is present, however, then it usually requires just some slight modifications of one of our include files +(you should then immediately be able to use this function, no further steps required). + +The fix is to "#ifdef" the function's prototype, in the appropriate header file, with "_WIN32_WCE", +so that this function is always declared as "SomeWinCeFunction", +instead of the non-WinCE "SomeWinCeFunctionA" + "SomeWinCeFunctionW" pair +(which also depends on the "UNICODE" macro). +See, for example, any other function, which is present in the same header file as +"SomeWinCeFunction", in order to learn what needs to be done. + +A patch for our include files would be very welcome. + +<BR>In any case, please, do inform us about this problem +(regardless whether you were able to fix it, or not), using either the +<A HREF="http://sourceforge.net/tracker/?group_id=173455">CeGCC Tracker</A> +system, and/or the +<A HREF="http://sourceforge.net/mailarchive/forum.php?forum_name=cegcc-devel">cegcc-devel</A> +mailing list. + + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- MissingDLLImports --> + + <LI> + <STRONG><A NAME="MissingDLLImports"> + How can I find/trace any missing "DLL imports"? + </A></STRONG><BR> + <P> + Different variations of + <A HREF="#WinCE">Windows CE</A> + based systems come with different sets of functions implemented + in the system provided default DLLs, and with partially different + sets of system provided default DLLs (even when their kernel versions match). + Hence, it sometimes happens that a user added DLL / EXE will not + run on the user's system, just because it misses a specific + function to be imported from some specific system default DLL, + or even the required DLL itself does not exist at all on the user's system. + + <BR>How can one find/trace any missing "DLL imports"? + <BR>You can find the ultimate answer below! + +<UL> + +<LI> + Get the free PC Windows (x86/x64) utility called + <A HREF="http://dependencywalker.com/">Dependency Walker</A>. + Although it is a PC Windows (x86/x64) utility + (on <A HREF="http://en.wikipedia.org/wiki/Linux">Linux</A>, + you can try to run it with the <A HREF="http://www.winehq.org/">Wine</A>), + it can also "scan" WinCE (ARM) libraries + and executables. What one needs to do is to open the "Options -> + Configure Module Search Order" window, remove all "standard PC Windows + subdirectories" from there, and add one's own (which hold WinCE DLLs). + Then, one can "Save..." these settings, in order to easily run the + <A HREF="http://dependencywalker.com/">Dependency Walker</A> + later, giving it the "saved module search order" as + a command line parameter. See the question "Will Dependency Walker + work with Windows CE modules?" in the + <A HREF="http://dependencywalker.com/faq.html">Dependency Walker Frequently Asked Questions (FAQ)</A>, + and read about its + <A HREF="http://dependencywalker.com/help/html/hidd_search_order.htm">Module Search Order</A> + and its + <A HREF="http://dependencywalker.com/help/html/hidr_command_line_help.htm">Command Line Options</A>. + <BR>Note that, in order to "resolve" all dependencies, you will need to + have a copy of the WinCE DLLs, provided by YOUR OWN WinCE device in the + "\Windows" subdirectory, in the PC. However, as these libraries reside in ROM, + they cannot be simply copied to the PC, you cannot + even copy them entirely inside of the WinCE system (using its file manager). +</LI> + +<LI> + Get the free WinCE utility called + <A HREF="http://forum.xda-developers.com/showthread.php?p=1571715">ROM Extractor</A>. + This utility can "extract" DLL / EXE / CPL / ... modules from ROM (files + which have the "FILE_ATTRIBUTE_ROMMODULE" set, i.e. files which cannot be copied by using a + file manager nor by the + <A HREF="#FileTransfer">ActiveSync</A>). + <A HREF="#FileTransfer">Copy</A> these "extracted" files into the PC + (preserving their original names), put them into a separate subdirectory, and use the + "Add Directory" button in the "Options -> Configure Module Search + Order" window (of the + <A HREF="http://dependencywalker.com/">Dependency Walker</A> + ), in order to add this + subdirectory to the "Current Search Order". + <BR>There are two things, I need to mention here. Although my CPU is an + "ARM", the "extracted modules" are marked as "Thumb". This fools the + <A HREF="http://dependencywalker.com/">Dependency Walker</A> + a bit - it will mark all of them in red, to notify + the user that the CPU types do not match. I do not know if this + "Thumb" signature is really put in my ROM, or is it just the + <A HREF="http://forum.xda-developers.com/showthread.php?p=1571715">ROM Extractor</A> + which does it. The solution, however, is very simple. Just + take any tool that can edit binary files (I use the free + <A HREF="http://en.wikipedia.org/wiki/Midnight_commander"> + GNU Midnight Commander</A>) + and change one byte, or two, in each DLL (the bytes which define the + CPU type). Very close to the beginning of the DLL file (usually inside of the first 256 bytes), + you should find a sequence of bytes in form: + "0x50 0x45 0x00 0x00 0xC2 0x01" ("0x50 0x45" = "PE"). + The sequence "0xC2 0x01" means "Thumb" CPU, so we need to change it + into "0xC0 0x01", which means "ARM" CPU (just one, single byte to be changed): + "0x50 0x45 0x00 0x00 0xC0 0x01". + The second thing to mention is related to the usage of the + <A HREF="http://forum.xda-developers.com/showthread.php?p=1571715">ROM Extractor</A>. + On my WinCE system, it keeps closing the "Input Panel" + (i.e. the "Keyboard"), so that I cannot enter the "Save to:" output + file. The solution is to manually open the "Input Panel" BEFORE + starting the + <A HREF="http://forum.xda-developers.com/showthread.php?p=1571715">ROM Extractor</A> + executable (then the "Keyboard" remains available all the time). +</LI> + +</UL> + +And voilà, you can use the + <A HREF="http://dependencywalker.com/">Dependency Walker</A> +to trace your problems! + +<BR> There is still one thing, I need to mention here. As of today, Sun, Nov 11, 2007, +the <A HREF="http://dependencywalker.com/">Dependency Walker</A> has some problems +with binaries (DLL/EXE) generated by the CeGCC-0.50 release (and earlier, I believe). +The problem is related to the DLL names "encoded" inside of the CeGCC generated DLL/EXE files. +All these names miss the ".dll" file name extension. As a result, the +<A HREF="http://dependencywalker.com/">Dependency Walker</A> seeks for files +named "DllName" (which do NOT exist) instead of "DllName.dll" (which, hopefully, DO exist). +A temporary solution is to keep a copy of every "DllName.dll" file as a "DllName" file +(note, you do NOT need these copies on your WinCE device, just on the PC). + +<BR>For the completeness of this description, let me add the following. + +<UL> + +<LI> + There exists a simple free, "command line" driven, WinCE utility called + <A HREF="http://www.geocities.co.jp/SiliconValley-Cupertino/2039/">Executability Check</A>, + which can be helpful (it checks which libraries are needed and it can + "rewrite" both, the library name and it's version), but using it is a + pain. Moreover, as this utility is NOT able to read system DLLs, it + will not tell you which function is missing (if any), nor it will tell + you which functions are provided by the system default DLLs. + Note, this is really a "command line" driven utility. It NEEDS to get + the name of the DLL/EXE file (to be "inspected") in the command line + (as a parameter). It will not start without this parameter. +</LI> + +<LI> + There exists a more advanced free WinCE tool called + <A HREF="http://s-k-tools.com/index.html?m_products.html">PEInfo</A>. + It will provide you with many informations about your DLL/EXE, + including the list of imported functions. However, as this utility is + NOT able to read system DLLs, it will not tell you which function is + missing (if any). Moreover, it does NOT even check whether the required function (to be + imported) is actually exported by the system DLL. As soon as it finds + the required DLL, it will simply happily assume that all required + functions are really provided by it. +</LI> + +</UL> + + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- LastErrorC1 --> + + <LI> + <STRONG><A NAME="LastErrorC1"> + I get "GetLastError returns c1" when + I try to use my DLL/EXE. + </A></STRONG><BR> + <P> + Your DLL/EXE could not be loaded/started. + Are you mistakenly trying to run a PC Windows (x86/x64) DLL/EXE on your WinCE device? + If not (i.e. you are sure this is really a WinCE ARM binary), then + this usually means that one or more functions, which your + program needs, are missing in some system DLLs, or even that + one or more required DLLs are missing at all + (well, you might have also forgotten to <A HREF="#FileTransfer">copy</A> some DLLs, that came + with your program, to your WinCE device, for example). + In such case, one gets a mysterious message "'MyProgram' is not a + valid Windows CE application", often bundled with a mysterious + error message "GetLastError returns c1". The "0xc1", decimal + "193", error is called "ERROR_BAD_EXE_FORMAT". It is defined in + the "winerror.h" file. + <BR>See <A HREF="#MissingDLLImports">How can I find/trace any missing "DLL imports"?</A> + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- BadExeFormat --> + + <LI> + <STRONG><A NAME="BadExeFormat"> + I get "ERROR_BAD_EXE_FORMAT" when I try to use my DLL/EXE. + </A></STRONG><BR> + <P> + That is just another form of the message + "<A HREF="#LastErrorC1">GetLastError returns c1</A>". + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- FileNotWinCEApplication --> + + <LI> + <STRONG><A NAME="FileNotWinCEApplication"> + I get "'MyProgram' is not a valid Windows CE application" when + I try to run MyProgram. + </A></STRONG><BR> + <P> + That is just another form of the message + "<A HREF="#LastErrorC1">GetLastError returns c1</A>". + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + + <!-- More --> + + <LI> + <STRONG><A NAME="More"> + Need More Informations? + </A></STRONG><BR> + <P> + See the <A HREF="index.html">CeGCC Documentation</A>. + </P> + <P><A HREF="#ToC">Table of Contents</A></P> + </LI> + +<!-- END OF ANSWERS --> + +</OL> + +<HR NOSHADE> + + +<!-- END OF CONTENT --> + +</BODY> + +<table border=0 cellspacing=10 width="100%"> <tr> + <td align=left valign=top bgcolor="#ededed" width="50%"> + <h2 align=center>Information</h2> + <ul> + <li> <a href="http://cegcc.sourceforge.net"> CeGCC Home Page on SourceForge </a> + <li> <a href="index.html"> CeGCC Documentation </a> + <li> <a href="http://sourceforge.net/projects/cegcc"> Project page on SourceForge </a> + <li> <a href="http://cegcc.wiki.sourceforge.net"> CeGCC wiki </a> + </ul> + </td> + <td align=left valign=top bgcolor="#ededed" width="50%"> + <h2 align=center>Support</h2> + <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. + <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. + <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> + <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> + </ul> + </td> +</tr></table> +</HTML> Property changes on: trunk/cegcc/docs/faq.html ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/cegcc/docs/index.html =================================================================== --- trunk/cegcc/docs/index.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/index.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -55,6 +55,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/docs/install-linux.html =================================================================== --- trunk/cegcc/docs/install-linux.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/install-linux.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -158,6 +158,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/docs/layer.html =================================================================== --- trunk/cegcc/docs/layer.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/layer.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -57,6 +57,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/docs/license.html =================================================================== --- trunk/cegcc/docs/license.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/license.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -69,6 +69,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/docs/profile.html =================================================================== --- trunk/cegcc/docs/profile.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/profile.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -504,6 +504,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/docs/reporting.html =================================================================== --- trunk/cegcc/docs/reporting.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/reporting.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -39,6 +39,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/docs/structure.html =================================================================== --- trunk/cegcc/docs/structure.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/structure.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -100,6 +100,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/docs/using.html =================================================================== --- trunk/cegcc/docs/using.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/using.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -347,6 +347,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/docs/what.html =================================================================== --- trunk/cegcc/docs/what.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/docs/what.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -92,6 +92,7 @@ <td align=left valign=top bgcolor="#ededed" width="50%"> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/website/index.html =================================================================== --- trunk/cegcc/website/index.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/website/index.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -91,6 +91,7 @@ </ul> <h2 align=center>Support</h2> <ul> + <li> <a href="faq.html">Frequently asked questions ? Read the FAQ</a>. <li> <a href="mailto:ceg...@li...">Questions ? Use the mailing list</a>. <li> <a href="http://sourceforge.net/tracker/?group_id=173455&atid=865514"> CeGCC Bug tracker </a> <LI><A HREF="docs/reporting.html">Information to including when asking help or when reporting problems</A></LI> Modified: trunk/cegcc/website/software-that-works.html =================================================================== --- trunk/cegcc/website/software-that-works.html 2007-11-18 16:36:40 UTC (rev 1076) +++ trunk/cegcc/website/software-that-works.html 2007-11-22 19:51:03 UTC (rev 1077) @@ -1448,4 +1448,30 @@ </tr>... [truncated message content] |
From: <dan...@us...> - 2007-01-20 16:45:10
|
Revision: 868 http://svn.sourceforge.net/cegcc/?rev=868&view=rev Author: dannybackx Date: 2007-01-20 08:45:06 -0800 (Sat, 20 Jan 2007) Log Message: ----------- This is capable of producing RPM files. Modified Paths: -------------- trunk/cegcc/scripts/linux/rpm-create-source.sh trunk/cegcc/src/ChangeLog trunk/cegcc/src/build-cegcc.sh trunk/cegcc/src/build-mingw32ce.sh Added Paths: ----------- trunk/cegcc/scripts/linux/mingw32ce.spec Added: trunk/cegcc/scripts/linux/mingw32ce.spec =================================================================== --- trunk/cegcc/scripts/linux/mingw32ce.spec (rev 0) +++ trunk/cegcc/scripts/linux/mingw32ce.spec 2007-01-20 16:45:06 UTC (rev 868) @@ -0,0 +1,78 @@ +Summary: CeGCC offers cross-development to create Windows CE apps for ARM processors +Name: cegcc-mingw32ce +%define version 0.12 +Version: 0.12 +Release: 1 +License: open +Packager: Danny Backx <dan...@us...> +Group: Development/Tools +Prefix: /opt/mingw32ce +# Source: http://sourceforge.net/project/showfiles.php?group_id=173455 +Source: /tmp/cegcc-mingw32ce-src-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-buildroot + +%description +CeGCC + +%prep +%setup -q +# %setup -n cegcc-minge32ce-0.12 + +%build +rm -rf $RPM_BUILD_ROOT +export PREFIX=/opt/mingw32ce +cd src || exit 1 +# sh build-cegcc.sh . $RPM_BUILD_ROOT $PREFIX all || exit 1 +sh build-mingw32ce.sh all || exit 1 + +%install +cd / +rm -rf $RPM_BUILD_ROOT +mkdir $RPM_BUILD_ROOT +tar cf - opt/mingw32ce | (cd $RPM_BUILD_ROOT; tar xf -) + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +/opt/mingw32ce +#/opt/cegcc/arm-wince-cegcc +#%attr(755, root, root) /opt/cegcc/bin +#/opt/cegcc/include +#/opt/cegcc/lib +#/opt/cegcc/libexec +#/opt/cegcc/share +#/opt/cegcc/COPYING +#/opt/cegcc/COPYING.LIB +#/opt/cegcc/NEWS +#/opt/cegcc/README + +%changelog +* Sat Jan 20 2007 Danny Backx <dan...@us...> +- Copy cegcc.spec into mingw32ce.spec, change the stuff that's required. + +* Sat Dec 31 2006 Danny Backx <dan...@us...> +- Strip out mingw32ce. + +* Sat Dec 30 2006 Danny Backx <dan...@us...> +- Adapt to Pedro's build scripts and /opt/cegcc and /opt/mingw32ce . + +* Wed Nov 1 2006 Danny Backx <dan...@us...> +- Add COPYING.LIB +- Increase level to produce a 0.11 version next time. + +* Wed Oct 11 2006 Danny Backx <dan...@us...> +- Add a couple of text files. + +* Sat Oct 7 2006 Danny Backx <dan...@us...> +- Change to implement arm-wince-cegcc and arm-wince-mingw32ce targets. + +* Sun Sep 17 2006 Danny Backx <dan...@us...> +- Add documentation files. + +* Thu Sep 14 2006 Danny Backx <dan...@us...> +- Fix the path in install so we don't need to have cegcc installed to be + able to run rpmbuild. + +* Sun Sep 3 2006 Danny Backx <dan...@us...> +- initial version of the spec file. Modified: trunk/cegcc/scripts/linux/rpm-create-source.sh =================================================================== --- trunk/cegcc/scripts/linux/rpm-create-source.sh 2007-01-18 17:32:56 UTC (rev 867) +++ trunk/cegcc/scripts/linux/rpm-create-source.sh 2007-01-20 16:45:06 UTC (rev 868) @@ -19,31 +19,57 @@ echo '/*.cvs*' >>/tmp/exclude-$$ echo '*/CVS' >>/tmp/exclude-$$ echo '*/CVS/*' >>/tmp/exclude-$$ -echo 'cegcc-'$CEGCC_RELEASE'/src/build-cegcc' >>/tmp/exclude-$$ -echo 'cegcc-'$CEGCC_RELEASE'/src/build-cegcc/*' >>/tmp/exclude-$$ -echo 'cegcc-'$CEGCC_RELEASE'/src/build-mingw32ce' >>/tmp/exclude-$$ -echo 'cegcc-'$CEGCC_RELEASE'/src/build-mingw32ce/*' >>/tmp/exclude-$$ +echo 'cegcc-cegcc-'$CEGCC_RELEASE'/src/build-cegcc' >>/tmp/exclude-$$ +echo 'cegcc-cegcc-'$CEGCC_RELEASE'/src/build-cegcc/*' >>/tmp/exclude-$$ +echo 'cegcc-cegcc-'$CEGCC_RELEASE'/src/build-mingw32ce' >>/tmp/exclude-$$ +echo 'cegcc-cegcc-'$CEGCC_RELEASE'/src/build-mingw32ce/*' >>/tmp/exclude-$$ +echo 'cegcc-mingw32ce-'$CEGCC_RELEASE'/src/build-cegcc' >>/tmp/exclude-$$ +echo 'cegcc-mingw32ce-'$CEGCC_RELEASE'/src/build-cegcc/*' >>/tmp/exclude-$$ +echo 'cegcc-mingw32ce-'$CEGCC_RELEASE'/src/build-mingw32ce' >>/tmp/exclude-$$ +echo 'cegcc-mingw32ce-'$CEGCC_RELEASE'/src/build-mingw32ce/*' >>/tmp/exclude-$$ echo '*~' >>/tmp/exclude-$$ # cd $TOP_SRCDIR -ln -s . cegcc-$CEGCC_RELEASE +ln -s . cegcc-cegcc-$CEGCC_RELEASE tar --exclude-from=/tmp/exclude-$$ \ - -cz -f /usr/src/rpm/SOURCES/cegcc-src-$CEGCC_RELEASE.tar.gz \ - cegcc-$CEGCC_RELEASE/NEWS cegcc-$CEGCC_RELEASE/README \ - cegcc-$CEGCC_RELEASE/scripts cegcc-$CEGCC_RELEASE/docs \ - cegcc-$CEGCC_RELEASE/website cegcc-$CEGCC_RELEASE/test cegcc-$CEGCC_RELEASE/src -rm cegcc-$CEGCC_RELEASE + -cz -f /usr/src/rpm/SOURCES/cegcc-cegcc-src-$CEGCC_RELEASE.tar.gz \ + cegcc-cegcc-$CEGCC_RELEASE/NEWS \ + cegcc-cegcc-$CEGCC_RELEASE/README \ + cegcc-cegcc-$CEGCC_RELEASE/scripts/linux/cegcc.spec \ + cegcc-cegcc-$CEGCC_RELEASE/docs \ + cegcc-cegcc-$CEGCC_RELEASE/website \ + cegcc-cegcc-$CEGCC_RELEASE/test \ + cegcc-cegcc-$CEGCC_RELEASE/src +rm cegcc-cegcc-$CEGCC_RELEASE # +echo "Ready to build with" +echo " " +echo " rm -rf /opt/cegcc/*" +echo " rpmbuild -tb /usr/src/rpm/SOURCES/cegcc-cegcc-src-"$CEGCC_RELEASE".tar.gz" +echo "Note : " `ls -l /usr/src/rpm/SOURCES/cegcc-cegcc-src-"$CEGCC_RELEASE".tar.gz` +# +ln -s . cegcc-mingw32ce-$CEGCC_RELEASE +tar --exclude-from=/tmp/exclude-$$ \ + -cz -f /usr/src/rpm/SOURCES/cegcc-mingw32ce-src-$CEGCC_RELEASE.tar.gz \ + cegcc-mingw32ce-$CEGCC_RELEASE/NEWS \ + cegcc-mingw32ce-$CEGCC_RELEASE/README \ + cegcc-mingw32ce-$CEGCC_RELEASE/scripts/linux/mingw32ce.spec \ + cegcc-mingw32ce-$CEGCC_RELEASE/docs \ + cegcc-mingw32ce-$CEGCC_RELEASE/website \ + cegcc-mingw32ce-$CEGCC_RELEASE/test \ + cegcc-mingw32ce-$CEGCC_RELEASE/src +rm cegcc-mingw32ce-$CEGCC_RELEASE +# # Remove temp file # rm -f /tmp/exclude-$$ # # Tell packager what to do. # -echo "Now be sure to build with" echo " " -echo " rm -rf /opt/cegcc/* /opt/mingw32ce/*" -echo " rpmbuild -tb /usr/src/rpm/SOURCES/cegcc-src-"$CEGCC_RELEASE".tar.gz" +echo " rm -rf /opt/mingw32ce/*" +echo " rpmbuild -tb /usr/src/rpm/SOURCES/cegcc-mingw32ce-src-"$CEGCC_RELEASE".tar.gz" +echo "Note : " `ls -l /usr/src/rpm/SOURCES/cegcc-mingw32ce-src-"$CEGCC_RELEASE".tar.gz` echo " " # # All done Modified: trunk/cegcc/src/ChangeLog =================================================================== --- trunk/cegcc/src/ChangeLog 2007-01-18 17:32:56 UTC (rev 867) +++ trunk/cegcc/src/ChangeLog 2007-01-20 16:45:06 UTC (rev 868) @@ -1,3 +1,13 @@ +2007-01-20 Danny Backx <dan...@us...> + + * build-mingw32ce.sh, build-cegcc.sh (build_docs) : Copy + some additional files that need to make it into an RPM. + * scripts/linux/rpm-create-source.sh : create two different source tar + files, each containing one SPEC file. For the cegcc and mingw32ce + distributions. + * scripts/linux/cegcc.spec, scripts/linux/mingw32ce.spec : these + versions work. + 2007-01-18 Danny Backx <dan...@us...> * cegcc/importlibs/build.sh : add definition for mmtimer DLL. @@ -7,8 +17,6 @@ * build-mingw32ce.sh, build-cegcc.sh (build_profile) : Copy the options from the mingw_runtime build, so src/profile/Makefile.in gets the right parameters and install stuff in the right place. - * build-mingw32ce.sh, build-cegcc.sh (build_docs) : Copy - some additional files that need to make it into an RPM. 2006-12-30 Danny Backx <dan...@us...> Modified: trunk/cegcc/src/build-cegcc.sh =================================================================== --- trunk/cegcc/src/build-cegcc.sh 2007-01-18 17:32:56 UTC (rev 867) +++ trunk/cegcc/src/build-cegcc.sh 2007-01-20 16:45:06 UTC (rev 868) @@ -313,6 +313,12 @@ tar cf - . | (cd ${PREFIX}/share/docs; tar xf -) || exit 1 cd ${BASE_DIRECTORY}/../website || exit 1 tar cf - images | (cd ${PREFIX}/share; tar xf -) || exit 1 + + cd ${BASE_DIRECTORY}/.. || exit 1 + cp NEWS README ${PREFIX} || exit 1 + cp src/binutils/COPYING ${PREFIX} || exit 1 + cp src/binutils/COPYING.LIB ${PREFIX} || exit 1 + cp src/binutils/COPYING.NEWLIB ${PREFIX} || exit 1 } function build_all() Modified: trunk/cegcc/src/build-mingw32ce.sh =================================================================== --- trunk/cegcc/src/build-mingw32ce.sh 2007-01-18 17:32:56 UTC (rev 867) +++ trunk/cegcc/src/build-mingw32ce.sh 2007-01-20 16:45:06 UTC (rev 868) @@ -270,6 +270,12 @@ tar cf - . | (cd ${PREFIX}/share/docs; tar xf -) || exit 1 cd ${BASE_DIRECTORY}/../website || exit 1 tar cf - images | (cd ${PREFIX}/share; tar xf -) || exit 1 + + cd ${BASE_DIRECTORY}/.. || exit 1 + cp NEWS README ${PREFIX} || exit 1 + cp src/binutils/COPYING ${PREFIX} || exit 1 + cp src/binutils/COPYING.LIB ${PREFIX} || exit 1 + cp src/binutils/COPYING.NEWLIB ${PREFIX} || exit 1 } function build_profile() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2007-11-29 20:29:23
|
Revision: 1082 http://cegcc.svn.sourceforge.net/cegcc/?rev=1082&view=rev Author: dannybackx Date: 2007-11-29 12:29:11 -0800 (Thu, 29 Nov 2007) Log Message: ----------- Implement macros that you can use to determine the version of our distribution, and adapt the release scripts to generate all this correctly. At least, I hope so because this can obviously only be tested when creating the next release. Modified Paths: -------------- trunk/cegcc/scripts/make_release.sh trunk/cegcc/src/build-mingw32ce.sh trunk/cegcc/src/gcc/gcc/ChangeLog.ce trunk/cegcc/src/gcc/gcc/config/arm/mingw32.h trunk/cegcc/src/gcc/gcc/config/arm/wince-cegcc.h trunk/cegcc/src/w32api/ChangeLog.ce Added Paths: ----------- trunk/cegcc/src/w32api/include/cegcc.h.in Modified: trunk/cegcc/scripts/make_release.sh =================================================================== --- trunk/cegcc/scripts/make_release.sh 2007-11-29 19:50:38 UTC (rev 1081) +++ trunk/cegcc/scripts/make_release.sh 2007-11-29 20:29:11 UTC (rev 1082) @@ -205,6 +205,42 @@ # # End level 20 (checkout new tag from SVN) # + RESTARTED=21 + report_status + # +fi + +# +# Level 21 +# +if test $RESTARTED -ge 22 +then + echo "Skip level 21 (create version include file)" +else + echo "Level 21 (create version include file)" + + OK=no + TS1=`date +%Y%m%d` + cd $TAGSDIR/cegcc-$VERSION/src/w32api/includes + CEGCC_VERSION_MAJOR=`echo $VERSION | awk -F. '{print $1}'` + CEGCC_VERSION_MINOR=`echo $VERSION | awk -F. '{print $2}'` + CEGCC_VERSION_PATCHLEVEL=`echo $VERSION | awk -F. '{print $3}'` + L1=`grep -s -n "Automatic changes below" cegcc.h.in | awk -F: '{print $1}'` + L2=`grep -s -n "Automatic changes above" cegcc.h.in | awk -F: '{print $1}'` + head -$L1 cegcc.h.in >cegcc.h + echo "#define __CEGCC_VERSION_MAJOR__ " $CEGCC_VERSION_MAJOR >> cegcc.h + echo "#define __CEGCC_VERSION_MINOR__ " $CEGCC_VERSION_MINOR >> cegcc.h + echo "#define __CEGCC_VERSION_PATCHLEVEL__ " $CEGCC_VERSION_PATCHLEVEL >> cegcc.h + echo "#define __CEGCC_BUILD_DATE__" `date +%Y%m%d` >> cegcc.h + tail +$L2 cegcc.h.in >>cegcc.h + svn commit cegcc.h -m "Version file for release $VERSION" && OK=yes + if [ $OK = "no" ]; then + echo "SVN commit failed, exiting..." + exit 1 + fi + # + # End level 21 (create version include file) + # RESTARTED=30 report_status # Modified: trunk/cegcc/src/build-mingw32ce.sh =================================================================== --- trunk/cegcc/src/build-mingw32ce.sh 2007-11-29 19:50:38 UTC (rev 1081) +++ trunk/cegcc/src/build-mingw32ce.sh 2007-11-29 20:29:11 UTC (rev 1082) @@ -120,6 +120,17 @@ # embedded tabs in the sed below -- do not untabify components=`echo "${components}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` +# Don't build in source directory, it will clobber things and cleanup is hard. +if [ -d ${BUILD_DIR}/.svn ]; then + echo "Don't build in a source directory, please create an empty directory and build there." + echo "Example :" + echo " mkdir build-mingw32ce" + echo " cd build-mingw32ce" + echo " sh ../build-mingw32ce.sh $@" + exit 1 +fi + +# Report about options. echo The following components will be built: ${components} export TARGET="arm-wince-mingw32ce" Modified: trunk/cegcc/src/gcc/gcc/ChangeLog.ce =================================================================== --- trunk/cegcc/src/gcc/gcc/ChangeLog.ce 2007-11-29 19:50:38 UTC (rev 1081) +++ trunk/cegcc/src/gcc/gcc/ChangeLog.ce 2007-11-29 20:29:11 UTC (rev 1082) @@ -1,3 +1,8 @@ +2007-11-29 Danny Backx <dan...@us...> + + * config/arm/mingw32.h, config/arm/wince-cegcc.h : Define + __CEGCC__VERSION__ whose contents is overwritten in cegcc.h . + 2007-11-18 Pedro Alves <ped...@po...> * config/arm/wince-pe.h (ARM_DOUBLEWORD_ALIGN): Define as 0. Modified: trunk/cegcc/src/gcc/gcc/config/arm/mingw32.h =================================================================== --- trunk/cegcc/src/gcc/gcc/config/arm/mingw32.h 2007-11-29 19:50:38 UTC (rev 1081) +++ trunk/cegcc/src/gcc/gcc/config/arm/mingw32.h 2007-11-29 20:29:11 UTC (rev 1082) @@ -35,7 +35,7 @@ #undef CPP_SPEC #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} \ --D__COREDLL__ -D__MINGW32__ -D__MINGW32CE__ \ +-D__COREDLL__ -D__MINGW32__ -D__MINGW32CE__ -D__CEGCC_VERSION__ \ %{!nostdinc: -idirafter ../include/w32api%s -idirafter ../../include/w32api%s }" #undef LIB_SPEC Modified: trunk/cegcc/src/gcc/gcc/config/arm/wince-cegcc.h =================================================================== --- trunk/cegcc/src/gcc/gcc/config/arm/wince-cegcc.h 2007-11-29 19:50:38 UTC (rev 1081) +++ trunk/cegcc/src/gcc/gcc/config/arm/wince-cegcc.h 2007-11-29 20:29:11 UTC (rev 1082) @@ -28,7 +28,8 @@ #undef CPP_SPEC #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ - -D__CEGCC32__ -D__CEGCC__ %{!ansi:-Dunix} -D__unix__ -D__unix \ + -D__CEGCC32__ -D__CEGCC__ -D__CEGCC_VERSION__ \ + %{!ansi:-Dunix} -D__unix__ -D__unix \ %{mwin32: -DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ } \ %{!nostdinc:%{!mno-win32: -idirafter ../include/w32api%s -idirafter ../../include/w32api%s }} \ " Modified: trunk/cegcc/src/w32api/ChangeLog.ce =================================================================== --- trunk/cegcc/src/w32api/ChangeLog.ce 2007-11-29 19:50:38 UTC (rev 1081) +++ trunk/cegcc/src/w32api/ChangeLog.ce 2007-11-29 20:29:11 UTC (rev 1082) @@ -1,6 +1,11 @@ -2007-11-25 Pedro Alves, Danny Backx <dan...@us...> +2007-11-29 Danny Backx <dan...@us...> - * w32api/libce/icmplib.def: Remove proxy for icmplib, MSDN says it's + * w32api/include/cegcc.h.in : Add file to provide version tracking + macros. + +2007-11-25 Pedro Alves, Danny Backx <dan...@us...> + + * w32api/libce/icmplib.def : Remove proxy for icmplib, MSDN says it's a static library only. 2007-11-16 Danny Backx <dan...@us...> Added: trunk/cegcc/src/w32api/include/cegcc.h.in =================================================================== --- trunk/cegcc/src/w32api/include/cegcc.h.in (rev 0) +++ trunk/cegcc/src/w32api/include/cegcc.h.in 2007-11-29 20:29:11 UTC (rev 1082) @@ -0,0 +1,35 @@ +/* + * Version information about CeGCC + */ +#ifndef _CEGCC_H_ +#define _CEGCC_H_ + +#ifndef __CEGCC_VERSION__ +#error __CEGCC_VERSION__ isn't defined by the compiler. Huh? +#endif + +#undef __CEGCC_VERSION__ + +/* Automatic changes below */ +#define __CEGCC_VERSION_MAJOR__ 9 +#define __CEGCC_VERSION_MINOR__ 99 +#define __CEGCC_VERSION_PATCHLEVEL__ 9 +#define __CEGCC_BUILD_DATE__ 99999999 +/* Automatic changes above */ + +#define __CEGCC_VERSION__ \ + (((__CEGCC_VERSION_MAJOR__) << 16) + + ((__CEGCC_VERSION_MINOR__) << 8) + + (__CEGCC_PATCHLEVEL__)) + +#ifdef __cplusplus +extern "C" { +#endif + +extern int _CeGCCVersion(void); + +#ifdef __cplusplus +} +#endif + +#endif /* _CEGCC_H_ */ Property changes on: trunk/cegcc/src/w32api/include/cegcc.h.in ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |