public static void Assert(bool cond, string msg) { if (!cond) { Barrier.Enter(); TextMode.Write("Assertion Failed: "); TextMode.Write(msg); //if (Serial.Initialized) //{ Debug.COM1.WriteLine(""); Debug.COM1.WriteLine("----------------- "); Debug.COM1.WriteLine("Assertion Failed: "); Debug.COM1.WriteLine(msg); Debug.COM1.WriteLine("============================================================="); Debug.COM1.WriteLine("Stack Trace:"); ExceptionHandling.DumpCallingStack(); //} Panic(msg); Barrier.Exit(); } }