Main Site Documentation

Fez Panda, what is IFU mode and How can i access IFU mode?


#1

[Fez Panda II]

Hi all,
I use the SystemUpdate.ApplicationUpdate.Write method and i need to get obtained hex file by using the “G” command in TeraTerm to pull my binary application.


#2

double post, why don’t you just ask once and leave it at that?


#3
  1. Press an hold LOADER (LDR) button then connect the USB cable
  2. Using (TeraTerm) GHI Loader ‘G Command Getting SREC File (LEDBlinking App)
  3. Received File Converting To Hex using this app (USBizi_ExtractApplication.exe)
  4. Writing it into SD And as app.hex
  5. And Deploying Updater application in Panda II (Code Below)
public static void Main()
{
   if (SystemUpdate.GetMode() == SystemUpdate.SystemUpdateMode.NonFormatted)
     {
                SystemUpdate.EnableBootloader();
     }
   else if (SystemUpdate.GetMode() == SystemUpdate.SystemUpdateMode.Application)
     {

                InterruptPort rightButton = new InterruptPort((Cpu.Pin)FEZ_Pin.Digital.LDR, true, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLow);
                rightButton.OnInterrupt += new NativeEventHandler(rightButton_OnInterrupt);

                Thread.Sleep(Timeout.Infinite);
     }
    else if (SystemUpdate.GetMode() == SystemUpdate.SystemUpdateMode.Bootloader)
     {
                if (PersistentStorage.DetectSDCard())
                {
                    PersistentStorage sd = new PersistentStorage("SD");
                    sd.MountFileSystem();

                    string fileName = "\\SD\\app.hex";

                    if (File.Exists(fileName))
                    {
                        FileStream file = new FileStream(fileName, FileMode.Open, FileAccess.Read);

                        // start update
                        SystemUpdate.ApplicationUpdate.Start();

                        // read the file in chucks
                        byte[] buffer = new byte[10 * 1024];
                        int length;

                        do
                        {
                            length = file.Read(buffer, 0, buffer.Length);
                            SystemUpdate.ApplicationUpdate.Write(buffer, 0, length);

                        } while (length == buffer.Length);

                        file.Close();

                        // End update
                        SystemUpdate.ApplicationUpdate.End();
                    }
                }
                // Access the application
                SystemUpdate.AccessApplication();

       }
  }

        private static void rightButton_OnInterrupt(uint data1, uint data2, DateTime time)
        {
            // Update the system using bootloader
            SystemUpdate.AccessBootloader();
        }

this code not works, can anyone help me?