G400-D SD Card Debugging question

First, this is not intended to be critical of the G400. It is only a general question for advice.

Using VS2010 and 2012 for Windows desktop (Both Express versions)

My application (in development for SD Card tests) requires that I must ‘reset’ the G400HDR almost every time when I try to start a Debugging session.

Example error message when using VS2012:

Attempting deployment…
Incrementally deploying assemblies to device
All assemblies on the device are up to date. No assembly deployment was necessary.
Assemblies successfully deployed to device.
Restarting interpreter…
Attaching to device…
Waiting for device to initialize…
The debugging target and the debugger engine failed to initialize because of unspecified device errors.
The debugger engine thread has terminated unexpectedly with error ‘Could not reconnect to the debugging target after rebooting it.’.

I notice that I lose the USB driver connection when rebooting. The new connection does not succeed.

(When debug succeeds the USB connection quickly comes back after rebooting)

Does anyone know what code usage would cause/aggravate this annoyance?

Yes… A loaded question, just looking for ideas…

@ andre.m -

your application code…

Obviously. But I’m not that sure it really is…

I am not using loops and have removed all events except for two buttons.

One button is used to begin the tasks for the application the other is used to unmount the SD Card.

The removed most of the code and now only do some basic read/write to a SD Card module and display text and bitmaps. I receive no exceptions using the app and the tasks perform as intended.

I would be glad to blame my code but I cannot find any cause …

@ willgeorge - I’ve same problem with sdcard attached. To start debug and deploy I need to disconnect sdcard and than pressing reset on g400 so I can start vs2012, but not always. Have you tried plain .netmf, not gadgeteer?
Your suspect about dropping voltage is not wrong.

@ dobova -

Have you tried plain .netmf, not gadgeteer?

Not yet… I was trying to see if I could find the cause

@ willgeorge -
for what I see, if I disconnect eth enc28 and sd card the board works fine.

Hi,
I have the exact same issue more than 10 years later. Can someone help me find a solution? I’ve tried everything and nothing seems to work, except when using an old Windows 10 computer connected to the G400 through a powered dock. It doesn’t work when connected directly to the computer.
Please help!

One possibility is that there is some operation that is is blocking the system for too long, preventing the debugger from latching. Or you have a very tight loop that is using most of the CPU time.

Do you have any solution for that?

It’s strange that it works with a powered dock. When it’s connected straight to the computer, I lose the debugging interface for about 20 seconds. As soon as I lose it, I get this error in VS. It doesn’t wait for the debugging interface to come back online.

Attempting deployment…
Incrementally deploying assemblies to device
All assemblies on the device are up to date. No assembly deployment was necessary.
Assemblies successfully deployed to device.
Restarting interpreter…
Attaching to device…
Waiting for device to initialize…
The debugging target and the debugger engine failed to initialize because of unspecified device errors.
The debugger engine thread has terminated unexpectedly with error ‘Could not reconnect to the debugging target after rebooting it.’.

With the powered dock, it seems I never lose the connection to the debugging interface for some reason, so it works.

But this dock works only with this computer, and the computer is kind of dying. So we really need a solution for our new Windows 11 machines.

Please share more info about your meet machine so we can investigate.

You could add something in your app, like a check a button is pressed, to not run blocking operations.

I’m new on the project and the person responsible for it left without ever looking into this issue. I might not give you enough information or may ask obvious questions.

I’m using a G400-D, but I’m not sure which bootloader version it has. I’m on a Windows 11 computer with VS2017. All the libraries are installed, and I can upload firmware with FEZ Config.

Do you need other information?

I mean you said the problem only shows on a newer machine. It would help to make what kind of machine is having problems

It’s an HP ZBook Fury G7, but I have the same issue with the old computer without the powered dock. The old one is a dell XPS15 9560.

Strange! What about when using a different USB hub? Or a powered USB hub?

Sorry I was on vacation. I’ve tried it, but nothing seams to work.