Ejemplo n.º 1
0
        /// <summary>
        /// Function to Transmit the UBL via the device ROM Serial boot
        /// Doesn't need it anymore
        /// </summary>
        private static void TransmitSFT(Byte[] imageData)
        {
            // Send the UBL/SFT data
              //Console.WriteLine("Entering AIS_Parser");
              AIS_Parser parser = new AIS_Parser(AisHostType.UART, AisSecureType.NONE, UTIL_log, UTIL_uartRead, UTIL_uartWrite);

              try
              {
              BOOTMESEQ:
            //Console.WriteLine("\nWaiting for the "+devString+"...");
            // Start the ROM booting
            if (AisStatus.ERROR == parser.boot(imageData))
            {
              Console.WriteLine("Booting SFT failed. Trying again (you may need to reset the target)...");
              // Wait for the device to send the ^BOOTME/0 sequence
              goto BOOTMESEQ;
            }

              }
              catch (ObjectDisposedException e)
              {
            Console.WriteLine(e.StackTrace);
            throw e;
              }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Function to Transmit the UBL via the device ROM Serial boot
        /// Doesn't need it anymore
        /// </summary>
        private static void TransmitAppToTarget()
        {
            // Send the UBL/SFT data
              Console.WriteLine("Entering AIS Parser");

              AIS_Parser parser = new AIS_Parser(AisHostType.UART, AisSecureType.NONE, UTIL_log, UTIL_uartRead, UTIL_uartWrite);
              parser.waitBOOTME = cmdParams.waitForBOOTME;
              parser.opcodeDelay = 50;
              parser.ioTimeout = 2000;

              // Local Variables for holding file data
              Byte[] imageData;

              // Read the image data we will transmit
              imageData = FileIO.GetFileData(cmdParams.APPFileName);

              try
              {
              BOOTMESEQ:
            Console.WriteLine("\nWaiting for the "+devString+"...");
            // Start the ROM booting
            if (AisStatus.ERROR == parser.boot(imageData))
            {
              Console.WriteLine("Booting AIS image failed. Trying again (you may need to reset the target)...");
              // Wait for the device to send the ^BOOTME/0 sequence
              goto BOOTMESEQ;
            }

              }
              catch (ObjectDisposedException e)
              {
            Console.WriteLine(e.StackTrace);
            throw e;
              }
        }