Infield update of firmware

From the documentation, the firmware update uses unmanaged memory. How will that work of I use ExtendHeap();

1 Like

IFU does not care where the memory come from, managed or unamanged. We will clarify the docs

Here it is

Thanks for the info

trying the IFP. I am able to get thru the AuthenticateFirmware, but AuthenticateApplication fails. I read the key from the file that TinyCLRConfig created. I loaded updater.ApplicationKey with the portion of the file after ": " (the key only) Is this correct ? If it is, what else should I be doing ?

In save file they are:

0x00 - 0x22 - 0x33...…

take that string and apply to your application by:

updater.ApplicationKey = new byte[] { 0x00, 0x22, 0x33...… };

In saved txt file the string:

Key: 47-CB-FE-A1-21-7A-5C-C3-52-BB-AB-A8-66-3F-41-4B

is intended to be a sixteen byte array of hex:

{ 0x47, 0xCB. 0xFE, 0xA1, 0x21 …

is that correct ?

I think we should update the tool and the file so the numbers look the same as code, using commas. This will make it easier for everyone, copy/paste

In a production environment, we should be able to read the ‘key’ file from the USB and use it directly, maybe with a little massaging.

1 Like

Can you clarify please?

To update application:

  1. the user will copy the files (from whatever source), firmware, application, key to a USB stick.
  2. He will insert the stick into the Host usb port.
  3. from the application the user will make a selection to update software.
  4. the application will then read the files into buffers, including the key file.
  5. the application will read the key string and convert it to the .ApplicationKey byte array
  6. application will then proceed with the authentications and FlashAndReset

Along the way, the application will verify that there is a USB drive, the files exist and firmware/application authentication. The FlashAndRest will only occur if everything is OK

I assume that there is not a return from the FlashAndReset

Do you mean IFU? If you use IFU, you can get the key from whatever source you want, including flash drive.

Yes. I just was wondering if the key format in the file:

aa-bb-cc-11… where aa needs to be converted to (byte)0xaa, is the best. Just wondering

I did get the InFieldUpdate working great

1 Like

I tried again to do the IFU. Seemed to work but the new software did not boot up. How do I need to deploy the software ??? Compile in release mode, change some settings in Tiny Config ??? …

I am guessing you loaded an application that is not compatible with the loaded firmware. They both need to match, your application and our firmware.

What about updating both, the application and the firmware.

Built the appllication with preview6, and deployed to 20260. I used TinyConfig to create the app with the associated key. Loaded the USB with preview6 firmware, the application tca, and the key txt file. Got thru the procedure in the application to update software. Key was valid. and did updater.FlashAndReset. But it never booted the application.

Then I used TinyConfig to update the software with the key etc. Got the same result. I succeeded previously to do the update, last month, so I know it has worked

We haven’t touched it. Can you attach visual studio and see why it doesn’t run?

Interesting, I put a much simpler application on the usb and it DID update and boot

Strange! I had a bug in external flash but that was not public. I am not sure why would you have problems. If you give up then we need to try your app to see what the problem is.