none
Problems with .NET compact framework and attaching to target RRS feed

  • Question

  • Let's go right back to the beginning. 

    We are building a system based on a BeagleBone Black development board. 

    http://beagleboard.org/BLACK For which we have purchased a 'as is' BSP for Windows Embedded Compact 13. 

    Using Platform Builder, I managed to build and deploy an image on our BeagleBone board by copying the NK.bin, MLO and EBOOTSD.nbo files to the boot disk. 

    The board boots into Win CE 13 great. The touch screen works great. I can connect to a USB keyboard, run command prompt, plug in a USB flash drive. I then attempt to run a C# application that was built for Windows CE and I get the error. .NET CF Initialization Error, The application failed to load required components. If the .NET Compact Framework is installed on a storage card... Support info: -2147438590 (8000B002).

    In Platform Builder the build has the .NET Compact Framework checked along with Windows Forms Support so I am not sure why this is the case. 

    However I saw another link:

    (that I am not allowed to post)

    Which pointed out that the registry setting defaults to: 

    HKLM\SOFTWARE\Microsoft\.NetCompactFramework\Managed Debugger\AttachEnabled=1 

    If you change it to AttachEnabled = 0,

    It apparently solves the .NET Compact Framework error message (according to the url link I posted earlier)

    Now to alter the registry I see a Registry Editor under Remote Tools. 

    In order to use Remote tools I have to attach the target. 

    So I connect the target to our network. Do ipconfig to get the targets IP address. I ping the target from my PC and ping the PC from the target. Everything is good. 

    Previously expected tools for Connectivity Options under the Target menu to be slightly more intuitive. I was looking up tutorial on Windows Embedded Compact 13 rather then Getting Started. Once I found the latter I added a device by employing a Virtual Machine. 

    So.... I set up a virtual machine on Windows 7 using the vhd supplied with Embedded Compact 13. In VS2013 I went Target->Connectivity Options, then added device, clicked on Kernel download settings. 

    I then started the VM and after 60 BootME messages I get. 

    "ERROR: BootDownloadBin!ImageType: BootTransportRead Failed!

    I tries disabling UDP checksums. (Although my machine only allows me the feature UDP Checksum Offload (IPv4))

    The nature of this feature is "Enables the adapter to verify the IP checksum on received packets and compute checksum on transmitted packets. Enabling this feature may improve IP performance and reduce CPU utilization."

    I also allowed edge traversal in my firewall options for UDP/TCP and PB WinCE Service Host. 

    Monday, August 3, 2015 7:48 PM

Answers

  • It works now Bruce. 

    Same problem was fixed in my post above. I was looking at the wrong .reg file effectively. 

    Thanks for your help. 

    • Marked as answer by rob18767 Tuesday, November 10, 2015 2:34 PM
    Friday, August 7, 2015 7:47 PM

All replies

  • I am going to ignore all of that, and go for solving the original problem which appears to be that you need to change a registry setting.  You can do one of the following:

    1. Since you are building the OS, change your platform.reg or OSDesign.reg, voila, the registry setting will be in the OS.
    2. Download a registry editor, like http://geekswithblogs.net/BruceEitman/archive/2009/07/27/window-ce-simple-little-registry-editor.aspx

    Bruce Eitman (eMVP) Senior Engineer Bruce.Eitman AT Eurotech DOT com My BLOG http://geekswithblogs.net/bruceeitman Eurotech Inc. www.Eurotech.com

    Monday, August 3, 2015 8:33 PM
    Moderator
  • Thank you. 

    Downloaded that. Put it onto a flash drive. Ran it from the command prompt. 

    Got the error ".NET CF Initialization Error, The application failed to load required components. If the .NET Compact Framework is installed on a storage card... Support info: -2147438590 (8000B002)."

    I am running Windows Embedded Compact 13 on Visual Studio 2013. 

    • Edited by rob18767 Tuesday, August 4, 2015 12:48 PM
    Tuesday, August 4, 2015 12:48 PM
  • You could also try and troubleshoot what's missing. If the .net CF framework is missing... but you'll need to add a few registry keys.

    Copy this into a .reg file and put on the device or use the remote registry editor if you can get it to connect...

     

    REGEDIT4

     

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETCompactFramework\Diagnostics]

     

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETCompactFramework\Diagnostics\Logging]

    "UseApp"=dword:00000001

    "Enabled"=dword:00000001

     

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETCompactFramework\Diagnostics\Logging\Loader]

    "Enabled"=dword:00000001

    If you run the .net application, then check the folder where you executed it from, you should see that a log file has been created that might shed some light on what dependencies are missing.

    Hope it helps

    Wednesday, August 5, 2015 2:27 PM
  • I did that thank you. I added it to the OSDesign.reg source file ib Platform Builder Solution Explorer. 

    Problem still there. 

    I do see I have two different problems and that I got myself mixed up. Not that hard as I am new to this although I do feel a bit of a plonker!

    I have a BeagleBone Black target board and a OS design with BSP for that board (project open in VS2013 with Platform Builder plug in). 

    This is the board I built the image for and booted using an SD card. I tried adding the registry changes as you specified However, as I pointed out that did not work. 

    I cannot connect to this target over Ethernet. I think this is down to the face that the capability to boot from ethernet is not in the boot sequence without modifying SYSBOOT pins. 

    The OTHER problem that I have been having, which I am now convinced is a separate problem is that I created a Virtual Machine using the .vhd that comes with Windows Embedded Compact 13. 

    I was going into Connectivity Options adding a device and opening up kernel download settings. Then I was starting the virtual machine and seeing the boot messages timing out. 

    I was under the impression that this would boot the Beaglebone too when I powered it on!!! 

    As far as I can see it will boot the image to the virtual machine. (Is this correct?). 

    Wednesday, August 5, 2015 7:19 PM
  • When the device boots the boot loader will load the OS. If the bootloader has been configured to boot from Ethernet, then it will broadcast a 'bootme' UDP packet onto the network. If you don't have firewalls to content with, then Platform builder should be able to detect the boot me, and attach to target should detect and allow you to deploy the OS image. The .vhd seems to have been configured for this.

    I'm assuming that the beagle boots into windows CE (in order for you to try and launch the compact framework app) if the BSP has networking capability, then it should have an IP address (from the command window type ipconfig and you should see an ip address (if that has also been added into the OS design -- it's a catalogue item)

    First things to check:

    Does the device have an IP address?

    If it does not have an IP address, check that you have the appropriate network adapter selected in the OS design (catalogue view)

    Have you tried dropping your firewall (just in case) temporarily to rule it out.

    If it does have an IP address. They I would try and get the remote tools connecting. When you launch them (either from VS, or if that fails, from the start menu, you can select the device. It will prompt for an IP address), for sake of argument I'm, assuming that you are using the remote registry editor.

    You might have to select [Show all devices] to list available connections. I can see 'Windows Embedded Compact Debugger' listed. Not sure how it got there as it's been installed awhile, I'm assuming that if you've installed a device SDK it might add it - maybe someone else could confirm.

    Anyway, If you select the device. Click connect then enter the IP address that you have obtained from the device with ipconfig. One of three things could happen:

    If you see connection to the device failed, then the CoreCon files are not running on the target.

    You need to run ComManClient3.exe on the target, and also CMAccept3 [I'm not sure if you can open multiple command prompts on your target. If you can't run CMAccept3, then you'll need to put the disable security registry setting in HLKM\System\CoreConOverrideSecurity = 1 -- modify OSDesign.reg and rebuild the OS and put on your SD card, reboot.]

    If you see connection refused. Then the device is working, but security on the device is preventing the socket connection. You need to run CMAccept3, or check the registry setting to make sure that it's there.

    Phew. Hopefully that might give you a couple of more things to check.

    Hope you get it working!

    Cheers

    John

    Thursday, August 6, 2015 8:11 AM
  • There's also an OS image on Codeplex for the beaglebone https://beaglebonebsp.codeplex.com/ - not used it myself, so I don't know about the state of the drivers...

    Thursday, August 6, 2015 8:24 AM
  • Thank you for that and hey I fixed to main part of my problem!!!!

    I needed to change

     HKLM\SOFTWARE\Microsoft\.NetCompactFramework\Managed Debugger\AttachEnabled=1 

    To AttachEnabled=0

    In platform.reg under the BSP. System now works. 

    I did this by going into Solution Explorer. Dropping dow c:/Wince800->Platform->My Bsp->Parameter Files. Then double clicking platfom.reg and then clicking on source at bottom left of window. 

    Then I changed and save the setting. 

    I still have problems attaching to the ethernet and I will keep you posted. 



    • Edited by rob18767 Thursday, August 6, 2015 7:41 PM
    Thursday, August 6, 2015 7:38 PM
  • I just downloaded RegEdit and ran it on a Windows Compact 2013 system, it runs well.  I am not sure why you meantioned the Visual Studio version, that shouldn't matter - put the app on your device using a storage card or USB Disk and run it on your device, which sounds like what you did, but is it?

    Bruce Eitman (eMVP) Senior Engineer Bruce.Eitman AT Eurotech DOT com My BLOG http://geekswithblogs.net/bruceeitman Eurotech Inc. www.Eurotech.com

    Friday, August 7, 2015 7:39 PM
    Moderator
  • It works now Bruce. 

    Same problem was fixed in my post above. I was looking at the wrong .reg file effectively. 

    Thanks for your help. 

    • Marked as answer by rob18767 Tuesday, November 10, 2015 2:34 PM
    Friday, August 7, 2015 7:47 PM
  • Hi,

    I was following your thread and I notice you were able to acquire a BSP for Beagle Board Black for WEC 2013. Can you tell me where to find it, and is it a fully functioning BSP of the BBB? Does it come with the source code?

    GMLA

    Sunday, August 9, 2015 5:54 AM
  • Over at codeplex. 

    https://beaglebonebsp.codeplex.com/

    Relatively small fee to obtain the source code if you contact the author. 

    Monday, August 10, 2015 12:52 PM