Emulator and device problems with CF 2.0 and Visual Studio 2005 beta


J

John Roberts

Hi,

We are currently developing a Windows CE.NET device that uses the compact
framework extensively for its UI including the shell and all applications.

Our existing environment (VS 2003) allows us to deploy and debug using both
the emulator (by building an SDK using Platform Builder) and target hardware
(using SDAuthUtil.exe).

I thought with the recentl release of VS 2005 beta 2 with 'Go Live' license
we would swap over to CF 2.0 as it has much talked about improvements in
features and speed.

However, I've been unsuccessful in getting anything to deploy and debug.
Here is what I have tried:

o) Install our SDK for Win CE 5.0 emulator generated by Platform Builder -
result is that VS 2005 Beta 2 simply crashes (and restarts) when launching
the Tools > Devices. If I uninstall the SDK the Tools > Devices no longer
crashes

o) Use the Windows CE 5.0 device and SDAuthUtil.exe - result is that VS 2005
B2 reports 'ActiveSync not installed' during deployment

o) I realise the new emulator in VS 2005 is an Arm emulator. Since I have
Platform Builder I can generate Arm images as well as x86 ones. Therefore I
tried configuring a new emulator image with an ARM binary image but the
emulator doesn't 'spin up' - it stops with 100% processor time shortly after
opening the image with no display

Any clues such as:

o) How to use Win CE 5.0 emulator with VS 2005?
o) How to deploy to a CE 5.0 device without ActiveSync?
o) How to make new ARM images for the new emulator?

TIA,
- John
 
Ad

Advertisements

J

John Roberts

Thanks Daniel,

Not really as the files in the beta 2 directory do not match the ones listed
in this blog. There is some stuff that looks as though it is supposed to be
for target debugging but I copied it across and it didn't do anything.

I also tried to install what I assume is the CF 2.0 redistributable (cab
file) on the target and got 'this application is not designed for this
device', even though the target processor matches:

<VS install
directory>\SmartDevices\SDK\CompactFramework\2.0\WindowsCE\wce500\armv4i\NETCFv2.wce5.armv4i.cab

I've also read this:
http://blogs.msdn.com/vsdteam/archive/2005/04/20/410095.aspx

which implies it is not even possible to deploy CF 2.0 to any device at all,
custom or PPC/Smartphone, at the moment, until a new version of ActiveSync
is released.

So no early success at all with CF 2.0 and VS 2005 Beta 2 :(

I will wait to see if any more information comes out of Microsoft.

Is there anyone out there actually using CF 2.0 and in what scenario(s)?

Cheers,
- John
 
D

Daniel Moth

Well I know that the process described at the blog entry I sent can be
tweaked to accommodate B2 but I have not done it yet so unfortunately I
cannot offer specific help.

As for using CF 2.0... my use is limited to upgrading existing CF 1.0 code
(enhancing with the new features) so most of the time I am in the IDE rather
than the target... currently I use the emulators and running on the device
*without* VS connectivity... just open the cab file on the device and then
copy your app across. It even works with the CE 5.0 x86 emulator available
as separate download...

Cheers
Daniel
 
I

Ilya Tumanov [MS]

Which device are you using? Is it CE 5 device?

Care to run (CF V1) code below to identify the CPU type? Thank.



Best regards,



Ilya



This posting is provided "AS IS" with no warranties, and confers no rights.



using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace CpuID
{
/// <summary>
/// Summary description for CpuIDForm
/// </summary>
public class CpuIDForm : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox CPUType;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.TextBox InstructionSet;

public CpuIDForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();


Query();

}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.CPUType = new System.Windows.Forms.TextBox();
this.InstructionSet = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
//
// CPUType
//
this.CPUType.Location = new System.Drawing.Point(8, 24);
this.CPUType.ReadOnly = true;
this.CPUType.Size = new System.Drawing.Size(152, 25);
this.CPUType.Text = "";
//
// InstructionSet
//
this.InstructionSet.Location = new System.Drawing.Point(8, 96);
this.InstructionSet.ReadOnly = true;
this.InstructionSet.Size = new System.Drawing.Size(152, 25);
this.InstructionSet.Text = "";
//
// label1
//
this.label1.Location = new System.Drawing.Point(48, 0);
this.label1.Size = new System.Drawing.Size(80, 16);
this.label1.Text = "CPU type";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 64);
this.label2.Size = new System.Drawing.Size(152, 24);
this.label2.Text = "CPU instruction set";
this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// mainMenu1
//
this.mainMenu1.MenuItems.Add(this.menuItem1);
//
// menuItem1
//
this.menuItem1.Text = "Quit";
this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
//
// CpuIDForm
//
this.ClientSize = new System.Drawing.Size(170, 172);
this.Controls.Add(this.InstructionSet);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.CPUType);
this.Menu = this.mainMenu1;
this.Text = "CpuID";

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>

static void Main()
{
Application.Run(new CpuIDForm());
}

private void Query()
{
int iset;

SYSTEM_INFO si = new SYSTEM_INFO();

try
{
QueryCpu.GetSystemInfo(si);

this.CPUType.Text = String.Format("{0} 0x{1:X}", si.dwProcessorType,
si.dwProcessorType);
}
catch
{
this.CPUType.Text = "N/A";
}


try
{
QueryCpu.QueryInstructionSet(QueryCpu.PROCESSOR_QUERY_INSTRUCTION, out
iset);
this.InstructionSet.Text = String.Format("{0} 0x{1:X}", iset, iset);

}
catch
{
this.InstructionSet.Text = "N/A";
}
}

private void menuItem1_Click(object sender, System.EventArgs e)
{
this.Close();
}
}

public class QueryCpu
{
public const int PROCESSOR_QUERY_INSTRUCTION = 0;


[DllImport("coredll.dll")]
public static extern int QueryInstructionSet(int dwInstructionSet, out int
lpdwCurrentInstructionSet);

[DllImport("coredll.dll")]
public static extern void GetSystemInfo(SYSTEM_INFO lpSystemInfo);
}

public class SYSTEM_INFO
{
public UInt16 wProcessorArchitecture;
public UInt16 wReserved;
public UInt32 dwPageSize;
public IntPtr lpMinimumApplicationAddress;
public IntPtr lpMaximumApplicationAddress;
public UInt32 dwActiveProcessorMask;
public UInt32 dwNumberOfProcessors;
public UInt32 dwProcessorType;
public UInt32 dwAllocationGranularity;
public UInt16 wProcessorLevel;
public UInt16 wProcessorRevision;
}

}
 
J

John Roberts

Hi Ilya,

CPU type is: 1824 0x720
Instruction set is: 84017152 0x5020000

Kind regards,
- John
 
Ad

Advertisements

I

Ilya Tumanov [MS]

CF CAB expects CPU type to be 2336 (ARM920) for CE5 ARMV4I, thus it won't
install on this device.

What kind of device is it? Is it CE 5.0 device?

Did you created CE image for it with platform builder or it came this way
from some vendor? Thanks.



Best regards,



Ilya



This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

John Roberts

Hi Ilya,

I reported this back to the company who is porting Windows CE 5.0 for us and
it does appear to be a bug in the CE image. They are providing another one
with the problem fixed and I'll let you know if there are any problems.

Thanks for looking into this.

- John
 
J

John Roberts

Hi,

I've just discovered the Conmanclient2.exe files that are mentioned in the
January blog entry. I copied these files across to the target and ran them
as instructed in the blog. They were located in:

C:\Program Files\Common Files\Microsoft Shared\CoreCon\1.0

which is different from the blog.

VS Studio B2 would still not connect and reports ActiveSync not installed
(which it wasn't). So I installed ActiveSync 3.8.

Stilll no joy, now VS reports that it doesn't support this version of
ActiveSync. This is now consistent with this blog entry:
http://blogs.msdn.com/vsdteam/archive/2005/04/20/410095.aspx

although frustratingly I'm not using ActiveSync to connect with the device.

So, I guess we wait until MS release more information but from what I can
see, Beta 2 is broken for all device deployment at the moment because of
this ActiveSync problem...

Cheers,
- John
 
D

Daniel Moth

One last shot for you... go through the whole process again...
(ping your device to make sure you have the right ipaddress, enter that
ipaddress in the configuration of the CE device in VS and make sure you've
chosen tcp transport and then Tools->Connect Device)

....but *also* run cmaccept.exe on the device.

Cheers
Daniel
 
J

John Roberts

Hi Daniel,

No joy I'm afraid - the same results. It looks to me like VS is stopping at
the ActiveSync error before even trying to connect to an IP address. In my
connection settings, 'ActiveSync' is the only option available for
'Bootstrap' and the configuration dialog for that is greyed. However, I
recall that this was the same in VS 2003.

- John
 
Ad

Advertisements

G

Guest

Hello,

I'm experiencing the same problem. The cab file (NETCFv2.wce5.armv4i.cab)
won't install on our device, a CE 5.0 device (PXA255 - CPU type: 2577 0xA11).

Is there something we can do to make it install (we are building the ce
image ourselves)?
Will there be other CFv2 cab files available?

Best regards
Olov
 
I

Ilya Tumanov [MS]

Yes, you can change the CPU ID in your image to 2336 (PROCESSOR_ARM920).

You should know how to do it because you've changed it to 2577
(PROCESSOR_STRONGARM).

If not - look up CEProcessorType in PB help.



No, we're not shipping any other CABs, but we're considering removing CPU ID
from ARM CAB.

That comes at a price, so there's a chance we won't do it. I would advise
using default ID of 2336 on all CE5 ARMV4I images.



Best regards,



Ilya



This posting is provided "AS IS" with no warranties, and confers no rights.
 
T

Tommy

We have change the CPU ID to PROCESSOR_ARM920 in our image, but Visual
Studio 2005 Beta 2 will no longer connect to the device. The error
message in Studio's output window says: "The bootstrap could not be
loaded".

I manually copied the CF 2.0 CAB file (NETCFv2.wce5.armv4i.cab) to the
device and it could now able to install. But without the the connection
to the device from VS2k5b2 it's not useful.


The complete error message from VS2005B2 is:

------ Build started: Project: DeviceApplication2, Configuration: Debug
Any CPU ------
DeviceApplication2 -> C:\Documents and Settings\tpovlick\my
documents\visual studio
2005\Projects\DeviceApplication2\DeviceApplication2\bin\Debug\DeviceApplication2.exe
------ Deploy started: Project: DeviceApplication2, Configuration:
Debug Any CPU ------
The bootstrap could not be loaded.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped
==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
 
I

Ilya Tumanov [MS]

I doubt CPU ID change has anything to do with connection problem.

I would suggest using this procedure to resolve connectivity issues:

http://blogs.msdn.com/vsdteam/archive/2005/04/28/413304.aspx


Best regards,



Ilya



This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
Ad

Advertisements

T

Tommy

Hi Ilya,

Thanks for the tip, I'll check it out.

In the mean time I've reloaded our previous kernel; our resident CAB
file expert wrote a "CAB Cracker" which allows the processor type to be
changed. This worked! We can now run our code on a Windows CE 5.0
device using VS2k5b2 and CF 2.0.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top