Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Debugger won't attach using ND Plus 2 & VS2012 running .NETMF 4.3.1

.NETMF 4.3.1 Debugger VS2012

Best Answer Chris Walker , 09 April 2014 - 05:52 AM

Hi Darrell,

Thank you for the additional diagnostics. We aren't able to reproduce the issue here, but we will continue trying :) In the meantime...I'm glad that switching to 4.2 got you up and running for now.

On erasing a badly-behaving app: NetduinoUpdate is a more powerful tool than MFDeploy for that, so I would recommend using the "erase app" feature in MFDeploy instead...or if you need to get out of a bind :)

Chris Go to the full post


  • Please log in to reply
8 replies to this topic

#1 Darrell L.

Darrell L.

    Member

  • Members
  • PipPip
  • 14 posts

Posted 03 April 2014 - 06:06 PM

I've recently acquired two Netduino Plus 2 boards, have updated them to 4.3.1 as well as having the latest .NETMF framework installed.

 

My problem is that the VS2012 debugger will not attach to either of my units.  Any combination of restarting VS2012, unplugging the devices, rebooting the PC, etc.. etc.. etc... yields no change in the debugger's ability to attach.

 

See below for my "blinky" code as well as the output from VS2012 when attempting to connect to the devices.

 

Am I missing something??? As a result of this issue, I have two bricks on my desk :)

 

Any help, insight is very much appreciated.

 

Thanks,

 

D.

using System;

using System.Net;

using System.Net.Sockets;

using System.Threading;

using Microsoft.SPOT;

using Microsoft.SPOT.Hardware;

using SecretLabs.NETMF.Hardware;

using SecretLabs.NETMF.Hardware.Netduino;



namespace Blinky

{

    public class Program

    {

        public static void Main()

        {

            OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);

            InputPort button = new InputPort(Pins.ONBOARD_BTN, false, Port.ResistorMode.Disabled);



            while (true)

            {

                if (button.Read() == true)

                {

                    led.Write(true);

                }

                else

                {

                    led.Write(false);

                }

            }

        }

    }

}

[Output]

 

Looking for a device on transport 'USB'
Starting device deployment...
Iteration 0
Opening port \\?\USB#VID_22B1&PID_1000#000000000000#{09343630-a794-10ef-334f-82ea332c49f3}\Operations
Attaching debugger engine...
... debugger engine attached!
Querying device assemblies...
Found Assembly mscorlib 4.3.1.0
Found Assembly Microsoft.SPOT.Native 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware 4.3.1.0
Found Assembly Microsoft.SPOT.Net 4.3.1.0
Found Assembly System 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.SerialPort 4.3.1.0
Found Assembly Microsoft.SPOT.IO 4.3.1.0
Found Assembly System.IO 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.PWM 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.Usb 4.3.1.0
Found Assembly SecretLabs.NETMF.Diagnostics 4.3.1.0
Found Assembly SecretLabs.NETMF.Hardware.Netduino 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.OneWire 4.3.1.0
Found Assembly Microsoft.SPOT.Time 4.3.1.0
Adding pe file H:\Source Code\NetDuinoPlus2\Blinky\Blinky\bin\Debug\le\Blinky.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.3\le\secretlabs.netmf.hardware.pe to deployment bundle
Attempting deployment...
Incrementally deploying assemblies to device
Deploying assemblies for a total size of 680 bytes
Assemblies successfully deployed to device.
Restarting interpreter...
Attaching to device...
Deployment error: failed to (re)connect debugger engine to debugging target.
The debugging target and the debugger engine failed to initialize because of unspecified device errors.
The debugger engine thread has terminated unexpectedly with error 'Debugger engine could not attach to debugging target.'.

 

[/Output]


"Ever since you've fixed that paper jam, my computer has been running slower."


#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 04 April 2014 - 01:51 AM

Hi Darrell,

If you use NetduinoUpdate to erase the current app on your board, are you able to deploy-and-debug again?

Also...did you experience the same issue with the 4.2 firmware?

Welcome to the Netduino community,

Chris

#3 Darrell L.

Darrell L.

    Member

  • Members
  • PipPip
  • 14 posts

Posted 06 April 2014 - 12:45 PM

Hi Darrell,

If you use NetduinoUpdate to erase the current app on your board, are you able to deploy-and-debug again?

Also...did you experience the same issue with the 4.2 firmware?

Welcome to the Netduino community,

Chris

 

Hi Chris,

 

Using the NetduinoUpdate tool to erase the current app allows my debugger to reattach to the unit.

 

As for the issue on the 4.2 firmware, I haven't tried but will later on today and see if it behaves the same way.

 

Will keep you posted.

 

D.


"Ever since you've fixed that paper jam, my computer has been running slower."


#4 Darrell L.

Darrell L.

    Member

  • Members
  • PipPip
  • 14 posts

Posted 07 April 2014 - 06:22 PM

Chris,

 

I've reflashed my 2nd Netduino Plus 2 with the 4.2.2 firmware and have attempted to redeploy via Visual Studio 2012.

 

I'm getting the following error and I'm not quite sure what it means

 

"Error    1    Cannot deploy the base assembly 'mscorlib', or any of his satellite assemblies, to device - USB:Netduino twice. Assembly 'mscorlib' on the device has version 4.2.0.0, while the program is trying to deploy version 4.3.1.0"

 

I was under the impression from all of the reading that I've done through the forums that .NETMF 4.3 was backwards compatible with the 4.2.2 firmware.... or did I get the wrong impression?

 

D.


"Ever since you've fixed that paper jam, my computer has been running slower."


#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 April 2014 - 05:36 AM

Hi Darrell L.,

"Error    1    Cannot deploy the base assembly 'mscorlib', or any of his satellite assemblies, to device - USB:Netduino twice. Assembly 'mscorlib' on the device has version 4.2.0.0, while the program is trying to deploy version 4.3.1.0"
 
I was under the impression from all of the reading that I've done through the forums that .NETMF 4.3 was backwards compatible with the 4.2.2 firmware.... or did I get the wrong impression?


You'll want to go into Project Properties and change your target framework version from NETMF 4.3 to NETMF 4.2. The 4.3 SDK supports 4.2 projects...but we can't deploy 4.3 apps to boards running earlier firmware.

Chris

#6 Darrell L.

Darrell L.

    Member

  • Members
  • PipPip
  • 14 posts

Posted 08 April 2014 - 01:02 PM

Hi Darrell L.,


You'll want to go into Project Properties and change your target framework version from NETMF 4.3 to NETMF 4.2. The 4.3 SDK supports 4.2 projects...but we can't deploy 4.3 apps to boards running earlier firmware.

Chris

 

Gotcha... figured it was something simple :rolleyes:

 

I've tried to reproduce the issue on my 2nd ND Plus 2 running the 4.2.2 firmware and targetting the .NETMF4.2 framework in VS2012 and am unable to reproduce it.  The debugger always attaches to the device.

 

I can pause the code execution at random, step into/over code no problem, stop the debugger at any time and it always reattaches to the device.

 

At this point it's not a show-stopper for me as I can use the "Erase App" functionality of the NetDuinoUpdate tool. :D

 

Any other ideas?

 

D.


"Ever since you've fixed that paper jam, my computer has been running slower."


#7 Darrell L.

Darrell L.

    Member

  • Members
  • PipPip
  • 14 posts

Posted 09 April 2014 - 01:00 AM

Doing a bit more reading on ST's website, they indicate that a C# application in the deployment section of the MCU alters the debug communication and Visual Studio can't override it.

 

They recommend using MFDeploy to erase the deployment section.  This falls exactly in line with what I've been seeing on occasion so it would appear more and more that this behaviour is "normal".

 

I've attached the ST document for your reference (see page 10 of 13 for details).

 

Thanks!

 

D.

Attached Files


"Ever since you've fixed that paper jam, my computer has been running slower."


#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 April 2014 - 05:52 AM   Best Answer

Hi Darrell,

Thank you for the additional diagnostics. We aren't able to reproduce the issue here, but we will continue trying :) In the meantime...I'm glad that switching to 4.2 got you up and running for now.

On erasing a badly-behaving app: NetduinoUpdate is a more powerful tool than MFDeploy for that, so I would recommend using the "erase app" feature in MFDeploy instead...or if you need to get out of a bind :)

Chris

#9 Darrell L.

Darrell L.

    Member

  • Members
  • PipPip
  • 14 posts

Posted 09 April 2014 - 12:28 PM

Chris,

 

Thanks for the help :)

 

I'll keep you posted if any other issues arise.

 

Cheers!

 

D.


"Ever since you've fixed that paper jam, my computer has been running slower."






Also tagged with one or more of these keywords: .NETMF 4.3.1, Debugger, VS2012

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.