G120 Boot issue

Happy New Year to all !!

Any suggestion why during startup the system hangs and reboots after a while… this is what the debug windows in VS2010 show.
It never reaches the first line in Main()

Found debugger!

Create TS.

Loading start at a0e00000, end a0e0fc38

Assembly: mscorlib ( Assembly: Microsoft.SPOT.Native ( Assembly: Microsoft.SPOT.Hardware (
Assembly: Microsoft.SPOT.Hardware.PWM ( Loading Deployment Assemblies.

Attaching deployed file.

Assembly: MFClassLibrary ( Attaching deployed file.

Assembly: GHI.Premium.IO ( Attaching deployed file.

Assembly: Microsoft.SPOT.Graphics ( Attaching deployed file.

Assembly: EMXApplication ( Attaching deployed file.

Assembly: GHI.Premium.System ( Attaching deployed file.

Assembly: System ( Attaching deployed file.

Assembly: Microsoft.SPOT.Net ( Attaching deployed file.

Assembly: GHI.Premium.Net ( Attaching deployed file.

Assembly: System.IO ( Attaching deployed file.

Assembly: GHI.Premium.Native ( Attaching deployed file.

Assembly: Microsoft.SPOT.IO ( Attaching deployed file.

Assembly: GHI.Premium.Hardware ( Attaching deployed file.

Assembly: GHI.Premium.Hardware.EMX ( Attaching deployed file.

Assembly: Microsoft.SPOT.Hardware.OneWire ( Attaching deployed file.

Assembly: GHI.Premium.Hardware.G120 ( Resolving.

GC: 1msec 418884 bytes used, 6920784 bytes available

Type 0F (STRING ): 24 bytes

Type 15 (FREEBLOCK ): 6920784 bytes

Type 17 (ASSEMBLY ): 20604 bytes

Type 1E (BINARY_BLOB_HEAD ): 398184 bytes

Type 34 (APPDOMAIN_HEAD ): 72 bytes

GC: performing heap compaction…


First of all,

Have you tried to update the firmware with the last 4.2 QFE2 ?

this is the main problem reported on the forum, that in any case, you must start by this point before trying to put anything in the device ! And this however you think it is already the case !

Yes, i’m sure using the latest…

I do not understand why you have EMX and G120 Assembly deployed both ?

Remove EMX assembly.

Yes, I think if it is a G120, no way to use the EMX !

There is no EMX assembly… The name you see in the list might be confusing but it is just the name of the application assembly. Before i used EMX instead of G120 :slight_smile:

Take a closer look :wink:

Assembly: GHI.Premium.Hardware.EMX ( Attaching deployed file.

@ RobvanSchelven - Assembly: GHI.Premium.Hardware.EMX ( Attaching deployed file. is still in the list…

*Edit lol - 10sec too late

Arhcitect is Lucky Luke ! :dance:

Thanks so much !!! Yes you are right… Cheers !!

You are welcome!

Several Couple of eyes are often better ! You’re welcome

Yes, that’s right… Unfortunately removing the assembly did not solve this problem (and other issues with G120 / MF4.2)

At the same step ? or does it start at least ?

Yes at the same step, but it is not always… sometimes it starts fine sometimes it won’t, i am still working on it.
I made 2 steps at a time…from EMX & MF 4.1 to a custom board G120 & MF 4.2. To make sure its not related to G120 i will go back to EMX but with MF 4.2

What is you Main function looks like?

     public static void Main()
 #if DEBUG

                var dt = RealTimeClock.GetTime();
                var dt = new DateTime(2013, 1, 1, 0, 0, 0);

            // TODO WatchDog

            LipoModule.Notification += LipoModuleNotification;

            DebugHelper.DebugPrint("Setup persistence storage");
                var ps = new PersistentStorage("SD");


            IResourceServer resourceServer = new ResourceServer(@ "SD", @ "SD\data\");
            var cfgvars = new ConfigVars();
            resourceServer.Store = cfgvars.Set;
            resourceServer.Retrieve = cfgvars.Get;

            DebugHelper.DebugPrint("Setup Websocket handler");
            var requestThread = new Thread(() => WebSocket.WebSocketHandler(new SocketCommandHandler(StatusLed)));

            DebugHelper.DebugPrint("Setup HTTP handler");
            var server = new MyHttpServer(resourceServer);

Can you put


at the end of your main function?

and also if I’m right, and my eyes are OK, there’s no RealTime quartz on my G120 HDR… (Q1). Did you solder one ?

If n,ot, I’m quite sure that RealtimeClock has no interest here…

Can you also underline us where it throw an exception in your code ?