Another boring notification while debugging Windows Mobile devices, is linked to the default security level of the OS. On every start of the debugger, VS2005 launch required applications on the device that are not digitally signed, so device warn you.
One solution to disable those warning messages, is to disable and change the security level. Of course this will completely remove all the security on the device... so make sure to revert your changes after debugging process to avoid any damages on your device.
On the device you have to set the following :
[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
"00001001"=dword:1
"0000101a"=dword:1
- Nicolas
Monday, November 24, 2008
Debugging Windows Mobile devices
Posted by Nicolas BESSON [MVP] 0 comments
Labels: Debugging, VS2005, Windows Mobile
ActiveSync Tweak
If you are like me, connecting, disconnecting, all day long, various Windows Mobile and Windows CE devices to you computer through ActiveSync, at each connection ActiveSync bother you make a partnership !
Partnership are nice while it's your personal or business device and you bring it everywhere with you to get an updated schedule and email... but while you are debugging applications, you don't want to be prompted.
ActiveSync have a "secret" registry key to always associate connected device as guest and will never prompt you anymore for any partnership.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows CE Services]
"GuestOnly"=dword:1
Set this value on your desktop computer and then plug your devices !!!
To revert this, just set GuestOnly to 0(zero) and partner ship will be enabled.
- Nicolas
Posted by Nicolas BESSON [MVP] 1 comments
Labels: ActiveSync, Debugging, Windows CE 6.0, Windows Mobile
Wednesday, November 19, 2008
ARM European Technical Conference
The ARM European Technical Conference will take place tomorrow November 20 th in Paris. It's not too late to register for the event (link).
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Monday, November 17, 2008
Dll Imports
When you are connecting managed code to native, it is often a pain to figure out how to write the “DllImport” properly. I'm using this site CONSTANTLY when I need access to native code from C#. It allows you to search on a function name and see user contributed definitions for the DLL Import…
http://www.pinvoke.net/
(Thanks to Joe)
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Tuesday, October 14, 2008
Flash back to Windows CE .Net 4.2
typedef struct _SERIAL_PACKET_HEADER
{
UCHAR headerSignature[HEADER_SIGNATURE_BYTES];
UCHAR pktType;
UCHAR Reserved;
USHORT payloadSize;
UCHAR crcData;
UCHAR crcHdr;
} SERIAL_PACKET_HEADER;
With :
- headerSignature : the signature of the header : { 'k', 'I', 'T', 'L' }
- pktType : use by KITL to identify the service associated to the frame
- payloadSize : packet data size, not including this header
- crcData : packet data check sum (simple, 8-bit crc)
- crcHdr : header data checksum (simple, 8-bit crc)
The simple 8 bits check sum algorithm :
UCHAR ComputeChecksum(PUCHAR pBuf, USHORT len)
{
USHORT s = 0;
UCHAR csum = 0;
for(s = 0; s < len; s++)
csum += *(pBuf + s);
return csum;
}
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: Debugging, KITL, Windows CE 4.2
Wednesday, October 1, 2008
FTF EMEA 2008
I will present on the Microsoft booth at the Freescale FTF EMEA 2008 that will take place October 7th in Paris. If you get a chance to come, it will be a great pleasure to exchange with you about the Microsoft Embedded Technologies.
If you didn't register yet, follow this link. See you then.
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Wednesday, September 17, 2008
Exam Preparation Kit in foreign languages available for download
The Exam Preparation Kit book (link) for the Microsoft Certification for Windows Embedded CE 6.0 is available for download in the following languages:
- English
- French
- German
- Simplified Chinese
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: General, Microsoft, Windows CE 6.0
Adeneo delivers Windows Embedded CE training course with FREE development kits
Adeneo announced the planning for the next training session in the USA.
- Seattle, WA – Sept 22nd to 26th 2008
- Dallas, TX – Nov 17th to 21st 2008
- Los Angeles, CA - Feb 16th to 20th 2009
- Boston, MA - Apr 13th to 17th 2009
- Denver, CO - Jun 8th to 12th 2009
- Seattle, WA - Sept 21st to 25th 2009
- Dallas, TX - Nov 16th to 20th 2009
Cost per attendee: $2,500
Included in price:
- 5 days of instructor led training on Windows Embedded CE 6.0. The training is delivered by one of our Senior Windows Embedded Developers who has the highest level of technical expertise on Windows Embedded CE - Training materials (printed manuals and a CD with all training manuals and files needed to complete the different labs)
- Complete ARM based development kit which attendees can keep after the training session ($975 value)
Registration and information: Please contact contact.msembedded@adeneocorp.com
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: General, Press Release
Thursday, August 14, 2008
SQL Compact 3.5 SP1
CE 6.0 July Update 2008 (includes SQL Compact 3.5 SP1)
CE 5.0 July Update 2008 (includes SQL Compact 3.5 SP1)
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: QFE, Windows CE 5.0, Windows CE 6.0
Windows CE 6.0 MCTS Exam - Companion CD
This translation is nearly done and the release of those books will be grouped to the access to the companion CD.
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: General, Microsoft, Windows CE 6.0
Thursday, July 31, 2008
Registry Modifications Notifications
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: General, Windows CE 5.0, Windows CE 6.0
Wednesday, July 30, 2008
New Books
Two new books are available for the Windows Embedded CE 6.0 operating system
- Professional Microsoft Windows Embedded CE 6.0 from Samuel Phung
- Windows® Embedded CE 6.0 Fundamentals from Stanislav Pavlov and Pavel Belevsky
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: Press Release, Windows CE 6.0
Hardware runnning Windows CE ?
Have a look to this list here.
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: General, Microsoft, Windows CE 5.0, Windows CE 6.0
Search Engine for Windows CE
Go there.
[Note] Thanks to Pierre for this link.
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: General, Microsoft, Windows CE 6.0
Thursday, June 12, 2008
An alternative solution to web browsing for Windows Mobile
The Mozilla Labs has posted a video of an alternative solution to web browsing, a direct competitor to the Pocket Internet Explorer. The Firefox browser for Windows Mobile, with current project codename Fennec.
See the video here
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: Windows Mobile
Microsoft North America Awards 2008
Microsoft announced during the TechEd in Orlando, FL the list of the Windows Embedded Partner Excellence Awards for North and South America.
Awards were listed by Microsoft as follows:
- Distributor -- Bsquare, "for continuing to raise the bar on providing Microsoft customers with world-class professional services and logistics capabilities for connected devices"
- Independent Hardware Vendor -- Phytec, "for driving adoption of Windows Embedded CE by providing single board computers and board support packages"
- Portable Navigation Device Partner -- Intrinsyc, "for the impact it has had with its strategic OEM design engagements"
- Silicon Vendor -- RMI, "for its innovative work in providing highly integrated system-on-chip modules"
- Systems Integrator -- Bsquare, "for its leadership role in providing a broad range of engineering services for Windows Embedded CE and Windows XP Embedded"
- Training Partner -- Adeneo, "for its leadership in providing a variety of innovative training deliverables"
- WEPOS (Windows Embedded for Point of Service) OEM -- NCR, "for its commitment to leading how the world connects, interacts, and transacts"
- WEPOS partner -- Odyssey Software, "for delivering innovative device management solutions to key strategic retail customers"
- Windows Embedded CE OEM -- Magellan, "for its commitment to creating devices"
- Windows XP Embedded OEM -- HP, "for its continued leadership in the thin-client space"
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Tuesday, May 27, 2008
Windows Embedded CE book
A good way to learn about Windows Embedded CE 6.0 is by reading the training book associated to the Microsoft Certification for Windows Embedded CE 6.0 Exam.
Enjoy the reading here.
- Nicolas
Posted by Nicolas BESSON [MVP] 4 comments
Monday, May 5, 2008
Who want to be an MCP II
- Chapter 01: Customizing the Operating System Design
- Chapter 02: Building and Deploying the Runtime Image
- Chapter 03: Performing System Programming
- Chapter 04: Debugging and Testing the System
- Chapter 05: Customizing a Board Support Package
- Chapter 06: Developing Device Drivers
If you are not a English native reader, this book will be translated in 5 additional languages in the next weeks and will be also accessible for download for FREE.
I hope that you will enjoy reading this book as much as I had writing it.
For the exam details and download follow the link .
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: General, Windows CE 6.0
Tuesday, April 29, 2008
Running Windows Mobile 6.1 on your PC
A good way to test the compatibility of your applications with the next release of the OS for a time to market as short as possible.
Get the WM 6.1 Images on the Device Emulator with MDM here.
Enjoy.
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: Windows Mobile
Monday, April 28, 2008
Accessing native API from C#
[DllImport ("coredll.dll")]
private static extern int CreateFile(
string lpFileName, int dwDesiredAccess,
int dwShareMode, int lpSecurityAttributes,
int dwCreationDisposition, int dwFlagsAndAttributes,
int hTemplateFile);
Accessing Device Drivers from C#
[DllImport ("coredll.dll")]
private static extern int CreateFile(
string lpFileName,
int dwDesiredAccess,
int dwShareMode,
int lpSecurityAttributes,
int dwCreationDisposition,
int dwFlagsAndAttributes,
int hTemplateFile);
[DllImport ("coredll.dll")]
private static extern int CloseHandle(int hObject);
[DllImport ("coredll.dll")]
private static extern int ReadFile(
int hFile,
byte[] lpBuffer,
int nNumberOfBytesToRead,
ref int lpNumberOfBytesRead,
ref OVERLAPPED lpOverlapped);
[DllImport ("coredll.dll")]
private static extern int WriteFile(
int hFile,
byte[] lpBuffer,
int nNumberOfBytesToWrite,
ref int lpNumberOfBytesWritten,
ref OVERLAPPED lpOverlapped);
[DllImport ("coredll.dll")]
private static extern int SetFilePointer(
int hFile,
int nDistanceToMove,
ref int lpDistanceToMoveHigh,
uint nMoveMethod);
[DllImport ("coredll.dll")]
private static extern int DeviceIoControl(
int hFile,
uint dwIoControlCode,
byte[] lpInBuffer,
uint nInBufferSize,
byte[] lpOutBuffer,
uint nOutBufferSize,
ref uint lpBytesReturned,
ref OVERLAPPED lpOverlapped);
private class OVERLAPPED
{
public int Internal; // Reserved for operating system use.
public int InternalHigh; // Reserved for operating system use.
public int Offset; // Specifies a file position at which to start the transfer.
public int OffsetHigh; // Specifies the high word of the byte offset at which to start the transfer.
public int hEvent; // Handle to an event set to the signaled state when the operation has been completed.
}
For example the Open function published by a device driver wrapper class could be write like this :
int m_intHandle = INVALID_HANDLE_VALUE;
public bool Open(String strDriverName)
{
m_intHandle = CreateFile(strDriverName, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
return m_intHandle != INVALID_HANDLE_VALUE;
}
Avoid Memory Leaks
- Nicolas
Posted by Nicolas BESSON [MVP] 3 comments
Labels: .Net Compact FrameWork, Device Drivers, Windows CE 5.0, Windows CE 6.0, Windows Mobile
Thursday, April 17, 2008
ESC Silicon Valley (San Jose, CA)
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: General
MVP Global Summit 2008
This 4 days event has been closed by Steve Ballmer, who as usual, did his show and received few gift from the Canadian MVPs and an US MVP (the Simpson tie).
Posted by Nicolas BESSON [MVP] 0 comments
Labels: General
Saturday, April 12, 2008
Power Management under Windows CE [part 3/3]
Applications can also interact with the power manager to change the current power state of the system or to be notified on power state transitions.
Application System Interaction
Using the Power Manager, applications can request system power state using the SetSystemPowerState. This is true for the system but applications can also interact with drivers. Imagine that a device driver is powered off after being used, this for power consumption reason, when applications requires an access to this driver, the driver must be turned on again. Using SetPowerRequirement, applications can ask drivers through the Power Manager, to switch to a specific power state. Then using ReleasePowerRequirement, the power requirement will be release and the driver will switch back to his original power state.
Request power notification
Using message queue, applications can be notified of power transition occurring on the system. When system is entering suspend, this is transparent for applications, and the only way for applications to be notified of resuming from suspend is to register to this message queue using the RequestPowerNotification function. The messages read from the message queue provide information on the status of the system.
Modify the Power Manager
The source code of the power manager is provided with Windows Embedded CE and can be located in %_WINCEROOT% \PUBLIC\COMMON\OAK\DRIVERS\PM . This gives you a chance to adapt the behavior of the Power Manager to your requirements. Most of the time, you do not have to make any modification in the code; instead use the registry to change the default behavior.
In conclusion the power management is straightforward for Windows Embedded CE when the power requirement of your device is simple, but can start to be tricky when more complicated. In any case, the system can be fully customized through the registry or for advanced usage by modifying the behavior of the Power Manager by directly modifying the source code. Applications can be notified of power transition and act if required, but it can also interact with the system to change the power state of drivers or the system. On their side device drivers can implement power management to support 5 different levels, and optimize the power consumption of your device. The Power Manager is the only one on the system to manage the power, applications and drivers always have to send request to the Power Manager that will relay the requests to the correct system component according to his internal state machine.
-Nicolas
Posted by Nicolas BESSON [MVP] 2 comments
Labels: General, Windows CE 5.0, Windows CE 6.0
Friday, April 11, 2008
Power Management under Windows CE [part 2/3]
In the last article we saw that the Power Manager is in charge of the management of the power on a Windows CE device, and interact with the system to change the system power consumption according to the user and system activity. Each driver can support 5 different levels of power states that can be setup from the registry.
Device Drivers Interface
The Power Manager is using IoControls to communicate with the drivers, to set, get the current power state of the driver. So drivers have to implement the support of those IoControl codes if they can manage the power of the managed device. The command codes are the following:
- IOCTL_POWER_CAPABILITIES: used by the Power Manager to identify the power capabilities of the device driver. This command is called once when Power Manager enumerates the device on the system.
- IOCTL_POWER_GET: used to get the current power state of the device.
- IOCTL_POWER_SET: used to request a power transition.
- IOCTL_POWER_QUERY: used to validate that the driver will support a power transition from its current state to the specified state.
Power Manager interface for device drivers
The device drivers cannot change their power state by themselves, without notifying the power manager; otherwise the power manager is not aware of state modification and cannot optimize the power on the device. When drivers require power level modification, they should request the power manager for that by calling DevicePowerNotify from the driver. Then the power manager will use the IoControls to request user to change is power state.
Next time we will identify how the applications can request system power transition.
[Updated] : Access to part 3/3
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: General, Windows CE 5.0, Windows CE 6.0
Thursday, April 10, 2008
Power Management under Windows CE [part 1/3]
System Power States
- On : in this state the device is full active and user can use all the different peripherals, and by consequence the current consumption is maximum
- User Idle : this state is reach when user is not using the device after a time out, the power consumption can be reduced by, for example, decreasing the display backlight intensity and disabling peripherals.
- System Idle : after application inactivity, the power manager switch to this state.
- Suspend : in this state the device is consuming the less power as possible, but the device cannot be used, the processor clock is decreased (or turned in a suspend state if supported), the peripherals are usually turned off and the SDRAM is still refreshed.
"ACUserIdle"=dword:5 ; in seconds
Drivers Power States
- D0 : Full on, the peripheral is fully functional
- D1 : Low On, fully functional the device consumption is reduce comparing to D0 state
- D2 : Standby, device is partially powered, and able to wake up on request
- D3 : Sleep, the device is consuming as less power as possible and can be used to wake up the system
- D4 : Off, the device is off an do no consume any power
System Power States vs Drivers Power States
- On -> D0
- User Idle -> D1
- System Idle -> D2
- Suspend -> D3
"bkl1:"=dword:4 ; backlight off
[HKLM\SYSTEM\CurrentControlSet\Control\Power\State\SystemIdle]
"bkl1:"=dword:4 ; backlight off
[HKLM\SYSTEM\CurrentControlSet\Control\Power\State\Suspend]
"bkl1:"=dword:4 ; backlight off
"Default"=dword:4 ; D4
That’s all for today, but two additional articles are following in the next few days. I will talk about the device driver interface requirements, and application interface used to communicate with the Power Manager and receive notification from him.
[Updated] : Access to part 2/3
- Nicolas
Posted by Nicolas BESSON [MVP] 1 comments
Labels: General, Windows CE 5.0, Windows CE 6.0
Tuesday, April 8, 2008
NXP LH7A404 ARM-9 based processor runs Windows CE 6.0
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: Press Release, Windows CE 6.0
Friday, April 4, 2008
Windows Embedded CE Webcast
Few weeks ago I did a live web cast session for the device drivers development under Windows Embedded CE 6.0 R2. All the webcast sessions recorded at this time are available now from the Microsoft Embedded Seminars website. For the Device Driver development session use this link.
Enjoy the nice French accent of your host.
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: Device Drivers, Webcast, Windows CE 6.0
Thursday, March 27, 2008
Enable Bluetooth support in Windows Embedded CE
The Bluetooth stack is natively supported by Windows Embedded CE, and can be integrated to your runtime image. This required of course a Bluetooth controller that can be either a Serial, USB,… dongle. Based on this stack you can enable Bluetooth capabilities to your device and applications, using the Bluetooth API. Enabling Bluetooth in your applications is not straightforward, as it requires to implement mechanism for at least the discovery and pairing with other devices (paired devices are trusted devices).
A Windows Embedded CE device can either connect to services provided by other devices or host service for other devices.
Profiles:
On a Bluetooth device, the different remote or local services provided by the Bluetooth stack are called profiles. The Bluetooth specifications provides a complete definition of the different Bluetooth profiles that can be enabled on a Bluetooth device. Unfortunately Microsoft do not provide all the profiles listed in this specifications, but only a subset is accessible like:
- Service Discovery Protocol (SDP) used to discover the other Bluetooth enabled devices in the range of your device
- Serial Server Profile (SPP) providing a serial interface for communication between two devices
- Object Push (OPP) to send files to other devices, can be used to send business card
- File Transfer Protocol (FTP) to provide an access (push or get) to a remote file system
- Personal Area Networking (PAN) to enable IP support to communicate through the bluetooth connection
- Dial Up Networking (DUN) to perform network connection to remote servers
- …
Existing Bluetooth Manager:
When using Bluetooth, you need a Bluetooth Manager that will allow user (or applications) to support the discovery of the in range Bluetooth devices and provide access to the remote and local Bluetooth profiles.
- Microsoft provides by default a very basic Bluetooth manager for the discovery and pairing to remote devices.
- Adeneo provides a Bluetooth Manager with an interesting layered architecture that provide a way to easily integrate in your applications the Bluetooth support. A GUI illustrates how their Bluetooth engine works. More details on their product is available here. They also provide a version compatible and certified for Windows Mobile 5.0 (Product Reference).
Required System Components:
To enable the Bluetooth on your platform, it will requires the following components in your OSDesign:
- USB Host Support (or Serial Port Support)
- Bluetooth Stack with Integrated CSR Chipset Driver
- Bluetooth Stack with Integrated USB Driver (or UART-Only Driver)
Sample source code:
You can find some sample source code for the Bluetooth handling :
_WINCEROOT\PUBLIC\COMMON\OAK\DRIVERS\BLUETOOTH\SAMPLE
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: Bluetooth, Windows CE 5.0, Windows CE 6.0
Thursday, March 20, 2008
.Net Compact Framework 3.5
The January Windows CE 4.x, 5.0 and 6.0 QFEs (Quick Fix Engineering) enable the .Net CF 3.5 for Windows CE. Now this feature can be directly integrated inside a runtime image by selecting the associated component in the platform builder catalog. The .Net CF 3.5 introduce new graphical components and fix some well know issues of the framework.
Windows Embedded CE QFEs are accessible here
- Nicolas
Posted by Nicolas BESSON [MVP] 2 comments
Labels: .Net Compact FrameWork, Windows CE 6.0
Business Solution Accelerator 2008
Need help to implement features in your .NET Compact Framework 3.5 application, Microsoft just released the Business Solution Accelerator 2008 for Windows Mobile, providing free and reusable source code and associated documentation.
In the mean time, the Windows Mobile blog will in the future discuss of the best practices in .Net CF development (blog link).
[Updated] Microsoft's Reed and Steve wrote a complete article on this LOB Solution Accelerator.
[Updated] See also Fabien's blog article for details about it.
The complete package and detail are accessible from the Microsoft Web site.
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: .Net Compact FrameWork, Windows Mobile
Tuesday, March 4, 2008
Who want to be an MCP
Microsoft is currently working on a Microsoft Certification Professional (MCP) Exam for the Windows Embedded CE technology. Few months ago some eMVP has been consulted to create a set of questions on the different technical aspects that must be masterized to generate, debug and use Windows Embedded Runtime binary images.
The exam 70-571, actually in beta test, should be accessible by every body in April time frame.
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: General, Windows CE 6.0
Thursday, February 28, 2008
Windows Mobile Trojan
WindowsForDevices post an article on the first trojan discovered by MacAfee's Avert Lab on WiMo devices. This trojan opens security permission on the device and can contaminate other devices using SDCards.
Read full article ...
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: Windows Mobile
Tuesday, February 26, 2008
Readers contribution
First of all, thanks all for your fidelity.
To exactly match your expectation in term of content, I'm opening a suggestion emailbox to submit your questions and ideas for the next articles to publish on this blog.
You can send your requests to : nbesson DOT blog AT gmail DOT com
Again, thanks for your help.
- Nicolas
Posted by Nicolas BESSON [MVP] 2 comments
Labels: General
Tuesday, February 19, 2008
Smart Device deployment and debugging using VS2005
When developing smart device application, in C# or C++ (Win32 or MFC) using Visual Studio 2005, you have different solutions for the deployment and debugging of your application.
ActiveSync :
This is the easiest way as it just required the support of ActiveSync in your Run Time image and a Serial or USB Function interface correctly setup. When connecting the device to you development computer ActiveSync should start and connect to the device. VS2005 is setup to use the ActiveSync link automatically for the deployment and debugging. No particular actions are required for this connection type.
KITL :
If you have the chance to have a KITL connection between the device and Platform Builder, you can directly use this connection with another instance of VS2005.
Before been able to use the KITL connection from VS2005, you have to create and setup a device configuration. To do so you have to open the Connectivity Options window in the VS2005 instance running the Platform Builder plug-in. Use the Create Device button to add a new device to the list of devices identified by Platform Builder. Associate this new device to an SDK if you got one or to the Generic Platform Builder OSDesign in the drop list as shown bellow.
Then select this new device and setup the Transport and Download information as you are usually doing it with your target device. Then attach and download the Runtime image to the target. This VS2005 instance will be use to debug the OS, and not your application. You will be able to add break point in the drivers and/or OAL.
Connect
In the second VS2005’s instance start/load your application solution and go to the Tools menu followed by Options then Device Tools group, select Devices, select the device created previously in the list and edit the Properties. Check that the Transport configuration is KITL. Validate all the open windows and close.
Now your system is ready to deploy and debug your application on the device using the KITL layer.
Corecon :
Corecon use the network interface to communicate with Visual Studio and requires to launch two applications on the device, but before you need least the following files on your device:
- clientshutdown.exe
- CMAccept.exe
- ConmanClient2.exe
- DeviceDMA.dll
- eDbgTL.dll
- TcpConnectionA.dll
Those files can be directly integrated in the nk.bin using the project.bib file or copied on the device at runtime using USB flash key or FTP connection.
Those files are not provided directly with the Windows Embedded CE 5.0/6.0 development environment, but are located in the VS2005 folders in the folder :
c:\Program Files\Microsoft Shared\CoreCon\1.0\Target\wce400\ProcessorType\
Binary versions are available for all processors supported by WinCE (ProcessorType).
Pre-requisite
The two applications, CMAccept and Conmanclient2 have to be launched manually when a connection to VS2005 is required. To do so you have to get a way to launch them, using the explorer window on the device, or using a telnet connection. You will also need the IP address of your device to correctly setup VS2005 connection. Without this IP address VS2005 would not be able to connect to the device.
Launch and connect
Under VS2005 you have to select and edit the device connection property by going to the menu Tools followed by Options then Device Tools group, select Devices, select the device in the list and edit the Properties.
In the Properties window select the Transport as TCP Connect Transport and then Configure. In the Configure window check the Use Specific IP address andx enter the IP address of the device. Validate all the open windows and close.
On the device you have to launch the ConmanClient2 application, followed by CMAccept. At this time you have approximately 3 minutes to connect the VS2005/2008 instance with your target. Elapsing this time you will have to launch the CMAccept application again before trying to connect.
In the VS2005, select the device in the device drop box list and click on Tools followed by Connect To Device. The connection may succeed and you should be able to start the deployment and/or debugging.
Those three configuration are using different communication layers but will provide the same set of functionalities for the deployment and debugging of Smart Device applications.
For the Windows Mobile user, to get all the steps for those platforms, you can check out the article on the Fabien blog.
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: Smart Device, VS2005, Windows CE 5.0, Windows CE 6.0
Monday, February 18, 2008
Catalog item notification
BSP components (drivers, or custom applications) require some attention from the user and should notify him. A catalog description of a you can easily integrates a notification messages that will show up when user will add this component to the OSDesign, like the one displayed when adding the FTP server or Telnet server to an OSDesigns.
By adding that kind of notification message Platform Builder will also display an exclamation mark icon next to the check box of the catalog component. The notification message and title can personalized, for that add to a specific component the Notification Html (body message) and the Notification Title (shown in bold in the notification window) as shown bellow.
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: Catalog, Windows CE 6.0
Monday, February 11, 2008
Dynamic JIT Debugging [Updated]
If the debugger is not launched exceptions are not handled correctly, and second chance exceptions neither.
Inclusion of the JIT Debugger
In the project.bib file of the current OSDesign, add the following lines in the FILES section :
kd.dll $(_FLATRELEASEDIR)\kd.dll NK SHK
osaxst0.dll $(_FLATRELEASEDIR)\osaxst0.dll NK SHK
osaxst1.dll $(_FLATRELEASEDIR)\osaxst1.dll NK SHK
The files are added to the FILES instead of the MODULE section to ensure that the debugger will not be launched 'till you launch it manually.
[Update 07/25/08] You can also include the loaddbg.exe file to the runtime image to avoid the loading of this files over KITL. But do not include hd.dll, otherwise the debugger will be started automatically at startup.
OSDesign configuration
Select the following options for the OSDesign:
- Unselect Kernel debugger
- Enable KITL
Launch the debugger
To launch the debugger when required, you just have to launch the loaddbg.exe application using the target control window.
s loaddbg.exeNote : When activating the debugger, the system may take few seconds load all the symbols files from your hard drive.
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments
Labels: Debugging, Windows CE 5.0, Windows CE 6.0
Monday, January 14, 2008
Automatically add files to an SDK
The second solution is to automated this mechanism by copying those files to a specific folder that will be used automatically by the wizard during the generation of the SDK.
Identification of the sdk folder :
Add an automated task :
In the sources file add the following lines :
#------------------------------------------------------------------------------
# SDK files
#------------------------------------------------------------------------------
# Enable copy to the SDK directory
WINCETARGETFILES=$(WINCETARGETFILES) CopyFilesToSDK
SDK_FILES=gpio_iocontrol.h driverheadertoshare.h
In association to the sources file you must provide a makefile.inc (located in the same folder), this file is proceeded after your sources files during the build. In this file you must satisfy the dependency list, so it must contain information about the CopyFilesToSDK.
Makefile.inc content will be something like this :
CopyFilesToSDK:
#REM copy the files listed in SDK_FILES to $(_PROJECTSDKROOT)
....
After the build of the driver or the library, you may find all your required files in the $(_PROJECTSDKROOT) folder.
In this article I described only one list of files to be proceeded, but it make sense to have two lists, one for the header files and the sdk\Inc folder and another one for the sdk\Lib folder for the libraries.
-Nicolas
Posted by Nicolas BESSON [MVP] 1 comments
Labels: SDK, VS2005, Windows CE 6.0
Thursday, January 3, 2008
Happy New Year
I wish you an Happy New Year 2008.
For this new year, I'm glad to announce that I have been awarded as Windows Embedded MVP for the second time. So thanks to the Mike Fosmire and the MVP team for this award.
- Nicolas
Posted by Nicolas BESSON [MVP] 0 comments