I have an EMX module to work with where the Visual Studio 2010 debugger seemingly deploys the program, but then doesn’t attach. This happens to me periodically where the fix is to redeploy the GHI Libraries (CLR, CLR2, Config). What causes the module to get into this state in the first place?
The properties of the project are set for .NET MF 4.1 (same as libraries I’m using), Startup object is correct, I click the green triangle (F5 - Start Debugging), and Studio reports status on the bottom line:
Preparing to deploy assemblies to device
Deploy succeeded
The debugging target is not in an initialized state; rebooting
The debugging target initialized successfully
Ready
but the debugger is immediately detached from the process and the program on the EMX module doesn’t appear to be running.
Why does this happen?
I’ve tried cleaning and rebuilding my EMX project, double checking I’m using the same runtime version of the GHI EMX libraries, exiting and restarting Studio, cycling power to my target, but I keep getting the same behavior.
I can ping the module via MFDeply while it is in this state where it reports OK, USB: EMX_EMX
Pinging... TinyCLR
I can read the device info using MFDeploy while it is in this state:
DeviceInfo:
HAL build info: 4.1.2821.0, Microsoft Copyright (C) Microsoft Corporation. All rig
OEM Product codes (vendor, model, SKU): 255, 0, 65535
Serial Numbers (module, system):
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Solution Build Info: 4.1.3.0, GHI Electronics, LLC
AppDomains:
default, id=1
Assemblies:
mscorlib,4.1.2821.0
Microsoft.SPOT.Native,4.1.2821.0
Microsoft.SPOT.IO,4.1.2821.0
Microsoft.SPOT.Net,4.1.2821.0
Microsoft.SPOT.Graphics,4.1.2821.0
Microsoft.SPOT.Hardware,4.1.2821.0
GHIElectronics.NETMF.SystemUpdate,4.1.6.0
Microsoft.SPOT.Hardware.Usb,4.1.2821.0
Microsoft.SPOT.TinyCore,4.1.2821.0
System.Xml,4.1.2821.0
This has been happening routinely and the fix is to redeploy the (same) GHI libraries over again when this state hits.
What is likely causing this and how can I prevent the EMX module from getting into this state?