G400 using dotnetwarrior.Gadgeteer.G400HDR - I am looking for help on my problem

First, I must say this question is in no way a negative comment on dotnetwarrior.Gadgeteer.G400HDR

I like it a lot!

I mention using dotnetwarrior.Gadgeteer.G400HDR because that is what I was using at the time (The latest Version on codeshare)

I was creating a program that was deployed and run several times and the code ran as I expected. The code was working with my latest update which was a minor change to some bitmap usage (Is there such a thing as a minor change?)

Due to a storm here in Chicago the power went out… Well, the code I was working on at the time no longer works. In fact, none of my code that used the original version and the updated version will run now.

I’m not sure if I should have checked this post as a question that needs an answer… But I did it anyway.

I had a backup of the code used before the power outage and tried to run it and it fails.

All of my G400 code now fails during InitializeModules() in public static void Main().

Only usbClientDP = new GTM.GHIElectronics.UsbClientDP(4); will pass without exception.
Each module gives a different exception depending on (Whatever VS decides it does not like)

I have uninstalled ALL GHI code and reinstalled. I even uninstalled my C# Express 2010 and reinstalled it including the Service pack.

Sort of stumped that the code goes belly up on a button!

I promise that the code ran before without any problems! Even the code (That ran before) will no longer pass InitializeModules()… The same thing happens with the code I posted on codeshare will no longer run! (All of it was coded using the first version… NOT the updated version… AND I posted pictures to prove it!)

I uninstalled the updated version and installed the original version to test…

As a hack programmer I’m a bit lost on what to do next!!

Simple thing that fail:



private static Gadgeteer.Modules.GHIElectronics.Button button1;

button1 = new GTM.GHIElectronics.Button(9);

 #### Microsoft.SPOT.Hardware.Port::.ctor [IP: 0000] ####
    #### Microsoft.SPOT.Hardware.InputPort::.ctor [IP: 0009] ####
    #### Microsoft.SPOT.Hardware.InterruptPort::.ctor [IP: 0009] ####
    #### Gadgeteer.Interfaces.InterruptInput::.ctor [IP: 0017] ####
    #### Gadgeteer.Modules.GHIElectronics.Button::.ctor [IP: 002b] ####
    #### GadgeteerG400WiFi.Program::InitializeModules [IP: 000d] ####
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll
An unhandled exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll


Should I give up now or stick with you’s folks? ( ;>)

EDIT: I have no other problems that I know of on my computer… NO I did NOT try EVERY program!

To me, that error is basically saying that your code and the hardware are in a mismatch. Personally, I’d do a redeploy of the bootloader and firmware to see if that fixes things.

in your button example, make sure button is really on socket #9

Yes it is… But the code worked before the crash… !

I changed button sockets and I get the same thing…

Maybe something in VS and I am not aware of…
By the way! Thanks for the responses…

I have NO IDEA what VS Studio has in settings!

I AM INPRESSED on those that responded to this old mans question!

@ andre.m -

NOT THAT FOND OF CATS… BUT THEY ALWAYS WANTED TO bit ME!

My PIT Bull NEVER DID THAT1

@ andre.m -

  • i like your cat that’s the reason :slight_smile:

Probably! He was born to attack me!

Animalasss are like people

@ Brett -

To me, that error is basically saying that your code and the hardware are in a mismatch. Personally, I’d do a redeploy of the bootloader and firmware to see if that fixes things.

Sorry for the delay but I was busy with other things…

Something is wrong with my G400-D. I cannot run any of my old programs that were running OK.

Still the same issue … I cannot get past InitializeModules() { } Any module I select fails in InitializeModules() { }

Except for this.usbClientDP = new GTM.GHIElectronics.UsbClientDP(4);

I can run the G400 Beta Program and I receive a log file but that is about it. I cannot install firmware using FEZ Config. Both the Firmware Updater or Deployment (Advanced) fail. I receive Device not connected or FEZ Config sometimes hangs.

About all I can do with FEZ Config is Ping and receive TinyCLR. Device Version (when it does not hang) returns:

Connected to device…G400_G400
Loader (TinyBooter) Version: [nothing shown for a version number]
Firmware (TinyCLR) Version: 4.2.0.0

I then get a FEZ Config pop-up dialog Can not access the device. Error code: 0x0001

If I try LCD Configuration, Load from device. FEZ Config never completes the request. I have to use Windows task manager to kill the process.

Everything else hangs!

Dead In The Water Here…

I forgot to mention.

I have uninstalled VS 2010 Express, All GHI software, dotnetwarrior.Gadgeteer.G400HDR and then reinstalled everything. Nothing changed.

But did you reapply the firmware? You may have to go to methods other than Fez Config.

@ Brett -

Above is my long winded way of saying I cannot apply the firmware. I keep getting device not connected. I have tried using FEZ Config and MFDeploy.

I have tried using GHI USB Drivers and WinUSB. The Debug interface is always there and does not go away during my attempt to apply the firmware.

I have tried using the Firmware Updater and Deployment Advanced.

Config.hex and Firmware.hex were moved into the G400 Beta Programmer folder.

Step 1.
You will need to copy the latest firmware file into the G400 Beta Programmer folder.

From the wording in Step 1 I assumed that the firmware was loaded along with the bootloader but I also tried loading the firmware using FEZ Config and MFDeploy.

The Fez Config Firmware Updater - G400 directs me to
C:\Program Files (x86)\GHI Electronics\GHI Premium NETMF v4.2 SDK\G400\Firmware
but I have also tried using the firmware in the G400 Beta Programmer folder as directed in Step1.

You may have to go to methods other than Fez Config.

I know of no other ways… Please enlighten me!

OK, I was assuming that there would be a G400 section in the firmware update section https://www.ghielectronics.com/docs/127/firmware-update (note to Jeff/team, can we get something listed there :slight_smile: )

Instead I found this:
https://www.ghielectronics.com/docs/112/g400

that talks about the process, but it’s peppered with “beta” so I think I’d be trying it but be careful ! I think you need to start with getting the tinybooter reloaded…