2013年10月25日 星期五

WinCE如何使用Platform Builder Debug

參考以下步驟,
  1. Building Debug版的OS Image
    • 從"Platform"選單選擇"Settings" 
    • 在"Settings" dialog選擇"debug configuration" 
    • 在"Build Options" table勾選"Enable Kernel Debugger" 
  2. 連結PC與Target device 
    • 於PC設定static IP 
    • 於Target device eboot選單中,設定static IP,讓PC與Target device於同一網域內
      或 
    • PC連接至DHCP server 
    • Targe device設為DHCP模式,皆由DHCP獲得IP 
  3. 設定Download and Debugging方式 
    • 從"Target"選單選擇"Configure Remote Connection" 
    • 於"Download Service"選擇"Ethernet" 
    • 於"Kernel Transport"選擇"Ethernet" 
    • 打開Target device進入download模式 
    • 按下"Configure"按鈕,等到收到"Device ID"後,選擇此ID 
  4. Platform Builder顯示download進度 
  5. Platform Builder於debug window顯示booting message 
  6. 使用"Debug" tool進行debug

WinCE4.2 Loadcepc Floppy can't detect C:

建立win98開機片,並從loadcepc磁片複製"AUTOEXEC.BAT"、"CONFIG.SYS"及"HIMEM.SYS"到win98開機片,成為新的loadcepc磁片。

輸入Windows Embedded CE PID

依照下列步驟,
  1. 開啟Platform Builder 
  2. 於"File"選單下選擇"License Binary Image" 
  3. 輸入25字的PID 
  4. 按下"Stamp Binary"按鈕,完成PID的輸入

WinCE ignore Build Warning Message

使用compiler option - /W,/w來設定 Warning Level。

Warning Level
Description
/w
Turns off all warning messages. Use this option when you compile programs that deliberately include questionable statements. The /w option applies to the remainder of the command line, or applies until the next occurrence of a /w option on the command line. /W and /W0 are the same as /w.
/W1
Default. Displays severe warning messages.
/W2
Displays an intermediate level of warning messages. Level 2 includes warnings such as the following: 
  • Use of functions with no declared return type 
  • Failure to put return statements in functions with non-void return types 
  • Data conversions that would cause loss of data or precision
/W3
Displays a less severe level of warning messages, including warnings about function calls that precede their function prototypes in the source code.
/W4
Displays the least severe level of warning messages, including warnings about the use of non-ANSI features and extended keywords.
/WX
Treats all warnings as errors. If there are any warning messages, the compiler generates an error message, and continues compilation.

CL environment variable – 
SET CL=[[ [[option]] ... [[file]] ...]] [[/link [[ link-libinfo]] ]]
CLxxx [[option...]] file... [[option | file]]... [[lib...]]
[[/link link-opt...]][[@response-file]]
Argument
Description
Option
One or more compiler options.
  • All options apply to all specified source files.
File
Specifies the name of one or more source files, object files, or libraries. You must specify at least one file name. The compiler compiles the source files and passes the names of the object files and libraries to the linker.
Lib
Specifies one or more library names. The compiler passes the names of these libraries to the linker for processing.
Link-opt
Specifies one or more of the linker options. The compiler command passes these options to the linker for processing.
Response-file
Specifies a response file that can contain multiple options and file names that you would otherwise type on the command line or specify by using the CL environment variable.

在WinCE6.0上使用MFC

WinCE6.0轉支援ATL8移除了MFC component。
我們可利用下列方式讓WinCE6.0支援MFC。
  1. 將所有MFC的DLL檔案包到OS Image
    • DLL來源位置:$(_SystemRoot)\Program Files\Microsoft Visual Studio 8\VC\ce\DLL\Platform
    • 將其包進.bib file於MODULES section
  2. 加入OS Dependencies for .NET Compact Framework 2.0及.NET Compact Framework 2.0 components
P.S. 我們可以利用此project建出來的SDK來開發其application

WinCE compiler after modifying reginit.ini

依下列步驟,
  1. 選擇"Open Release Directory",打開DOS視窗。 
  2. 執行"regcomp reginit.ini [release directory]"。 
  3. 執行"romimage ce.bib"。

WinCE compiler after modifying ce.bib

依下列步驟,
  1. 選擇"Open Release Directory",打開DOS視窗。 
  2. 執行"romimage ce.bib"。