We have recently switch from the G120 to the SCM20260E, but we have trouble flashing the tca file from our production test software using the following DLLs.
GHIElectronics.Bootloader.Interface.dll
GHIElectronics.TinyCLR.Debugger.dll
Is there an example of how to flash the tca file from a .net framework application.?
How do i get this to work.?
My code.
uint[] ApplicationKey = new uint[] { 0x901c3bb8, 0xb3234a68, 0xa9ffef0a, 0x59e5fc3d };
Byte[] tcaData = null;
Byte[] tcaData2 = null;
if (File.Exists(filePath1))
{
tcaData = File.ReadAllBytes(filePath1);
}
tcaData2 = new Byte[tcaData.Length - 0x400];
Array.Copy(tcaData, 0x400, tcaData2, 0, tcaData.Length - 0x400);
GHIElectronics.Bootloader.Interface.Xtea xtea = new Xtea(ApplicationKey);
xtea.Decrypt(tcaData, 0, tcaData.Length);
if (mFDevice.Deploy(tcaData))
{
Console.WriteLine("Update Ok");
mFDevice.Execute(0);
}