I am a newbie

:-[

I can’t make USB CDC debugging work :wall:

I take the litlle code Rajesh showed on his video and ran it. Visual Studio didn’t debug and I don’t know in which state the Panda is :frowning:

If I remove all the USB client stuff, then the board is working well.

In fact, Windows never asks for a CDC driver. I have changed the original drivers with the one that should include CDC but it doesn’t change anything.

What am I doing wrong ? Or not doing ? I will give 500 points of mine to the first telling why I’m that stupid ::slight_smile:

Try this, load the program on FEZ then reset the board…forget bout debugging for a sec, do you see new COM port showing up on windows? OR windows ask for new drivers?

This doesn’t work at all.

If I take a simple led blinking program and load it, then it works. Fortunately :slight_smile:

But as soon as I add a reference to GHIElectronics.NETMF.USBClient then the debugging won’t even start and the board seems to stay in an “unknown” state :o

USBClient is version 4.1.3.0, runtime 4.0.30319

Btw, by looking at the output windows, I’ve just seen this :

Invalid native checksum: GHIElectronics.NETMF.Hardware 0xA1518A4B!=0x454412FE

Resolving.

Link failure: some assembly references cannot be resolved!!


Assembly: FEZ Panda Application (1.0.0.0) needs assembly 'Microsoft.SPOT.Hardware' (4.1.2821.0)

Assembly: GHIElectronics.NETMF.IO (4.1.3.0) needs assembly 'GHIElectronics.NETMF.System' (4.1.3.0)

Error: a3000000

The program '[11] Micro Framework application: Managed' has exited with code 0 (0x0).

Something seems wrong with the assemblies… I will try to remove the sdk and install it again.

This message only appears as soon as I add the USBClient reference.

I have removed and reinstalled the last SDK from GHI, then create a Panda project from the templates.

The program works fine, the led is blinking.

Now, I add a reference to GHIElectronics.NETMF.USBClient and I get again the same error message :frowning:

I even don’t use anything from this assembly. The simple fact of adding it makes program fail.

Invalid native checksum: GHIElectronics.NETMF.System 0x74883E49!=0x1832794B

Resolving.

Link failure: some assembly references cannot be resolved!!


Assembly: FEZ Panda Application (1.0.0.0) needs assembly 'Microsoft.SPOT.Hardware' (4.1.2821.0)

Error: a3000000

The program '[5] Micro Framework application: Managed' has exited with code 0 (0x0).
Waiting for debug commands...

If I remove the reference to the USBClient, then the program is working fine :o

I will try it on another PC, though. One never knows…

Tried with another PC, with another Panda (I have not received other boards, yet) and… same punishment !

Just checked with a 3rd PC, same results :wall:

All 3 PC are running XP pro 32bits SP3. I could try on a 4th PC (kids) which is Windows 7 32bits, but it would require a complete installation of VS, .Net and so on… ???

FYI, if I revert to the 1.0.8 SDK, I don’t have this behaviour.

Install new sdk and update the firmware the create new project and try again

Well for me, Visual Studio will just hang on debugging via Serial Port and Com Port.

I will say, that it did exactly what the SDK said, it did hang up while sending via USB and Windows tried installing the drivers.

I finally had to go into the Device Manager and manually update the Drivers for the new Virtual COM port.

At that point, switched to the Serial COM port for debugging(new Virtual COM Port) and VS still wouldn’t allow me to debug with it, but TeraTerm would allow me to log onto the port.

I am not sure if this CDC thing is meant to strictly debug through VS but rather deploy via something else like TeraTerm???

I suppose it will just spit data back via TeraTerm like in the example video. (As an output window only???)

Mike in MN

I was able to do just what the video did, by cdc.Write. (to view in TeraTerm)

I guess for me, I will just figure it’s a new COM port. Once loaded.

This on a Panda also.

I will say, in order to resend something new via USB from VS, you have to hit the reset button on the board in order for VS to find it as a debugging device.

Mike in MN

Well…

Let Gus remove 500 points from my account :-[

With a firmware update, all is now (almost) working ! I have now a COMx device and I can see that it is working with Teraterm.

The only thing is debugging… Whenever I try to “break all” and not matter when I do it, I get this message box :

Unable to break execution. The debugger is still attaching to the process or the process is not currently executing the type of code selected for debugging.

In the output window, I then get this :

The debugging target and the debugger engine failed to initialize because of unspecified device errors.
The debugger engine thread has terminated unexpectedly with error 'Controller not started, cannot create message'.

I can live with it, but since it was not the goal, does someone know what I am doing wrong (again) ? ::slight_smile:

Whenever I get these crazy and unexplained problems, I simply walk away from the PC and get a beer then try again next day or after few hours. It is probably something you are overlooking because you are tired or the PC needs to be restarted.

I’ve followed parts of your advice : I’ve restarted the PC but have had a Ricard and not a beer :-[

Nothing has changed after that treatment :frowning: Even after a second glass :-[

[title]But…[/title] I don’t know why I did this, but I removed all the references to USBClient code/assemblies in my code, made my program debuggable again and then add the USBClient code. This time debugging was good :o

There are some things that I think I will forget the existence…

So, [title]thank you very much for your help[/title]. This is the kind of support we should expect from every company :clap: 1000 points to Gus ! :wink:

Whenever you update the SDK and firmware, make “new” project to make sure all is good then you can go back to your old project

Yes, I already knew that (for having learned the hard way…) but here it was a brand new project, which was working, and in which I have added the USBClient stuff afterwards. CdC was working but not debugging.

After a reboot, I “only” had to remove/add the reference to USBClient to make things work… Kind of weird, to me. But it’s now working, so I won’t look further :hand:

I needed working thing and I finally have it, that’s enough for me :wink: