This is the fourth post of this tutorial that has as its object the development and use of a proprietary component into a Windows Embedded Compact in 2013 operating system image. In the first post, we saw how to sign an assembly compiled for the .Net Compact Framework 3.9 so you can register it into the GAC (Gloabal Assembly Cache) and to do so, we used the M2Mqtt library assembly. In the second post, we have developed a component that is visible in the Platform Builder catalog items and allows to easily include this library with all the settings required for the registration in the GAC. In the third post, we saw how you can deploy your component to any third party and how simple it is to include it in the OS image. At this point, the next step is to prepare the image with some debugging tools for the sample application in the last post.
The Core Connectivity framework
One of the main features of Windows Embedded Compact from the first releases is that you can debug managed applications (and not) developed with the .Net Compact Framework directly on the target device. This potential is provided through the Core Connectivity that is a communication framework which allows to establish a connection with the target device in order to perform debugging (in addition to another set of features).
This framework consists of a set of files that can be found on the development PC after installing Platform Builder in the following folder :
C:\Program Files\Common Files\microsoft shared\Embedded Tools\CoreCon\11.0\Target\wce800 directory (subfolders x86 o armv7 based on the target).
They are :
In order to use this feature, you have to copy these files to the target device and start ConmanClient3.exe (to start the service) and then start CMAccept3.exe (to disable protection), from this moment we have 3 minutes to connect to the target . To avoid this timeout and disable security on your system, you can set the following registry key:
It is important to remember to remove this setting when we're going to generate the image for the production.
The inclusion of this framework in the OS image is equal to the inclusion of a component (as seen in previous posts) so you need to copy the files in the release directory (with a custom build action or batch file), change the BIB file (OS Design, BSP or SubProject) and edit the REG file (if you want to add the key that disables security). Also in this case there is a 3rdParty Platform Builder component ready and available online on CodePlex : AutoLaunch for Windows Embedded Compact (CE).
AutoLaunch : include CoreCon with a click !
AutoLaunch is a component for Platform Builder, developed by Samuel Phung and David Jones, which allows you to include with a simple click the CoreCon framework into the operating system image, possibly also taking care of disable security with the corresponding settings in the registry and even start the connection service on boot of the target device. In this way, the developer does not have to do anything but only connect from Visual Studio environment to start debugging application.
This is its main feature, however, the primary purpose is to provide the ability to set applications to launch at startup even with a possible delay. In fact, this component doesn’t contain only the files to be included in the image but it has a program written in C++ that performs the above operation.
As all components developed by third parties for Platform Builder, after you download it from CodePlex site it is necessary to extract its contents into the \WINCE800\3rdParty folder so that it will be immediately shown in the catalog items.
You can choose to include or not the CoreCon components, using the "Autolaunch CoreCon" item, so that the related BSP_AUTOLAUNCH_CORECON environment variable is set and the BIB file includes the corresponding files. Due to the same environment variable, the REG disables the security and automatically starts the connection service.
The last two operations to have an image ready for debugging are:
At the end of this post, we have everything needed to build an image which is designed to deploy and debug an application developed with .Net Compact Framework 3.9 that uses the included M2Mqtt component; we'll see how to do just the last post in this series!
View this page in another language: