Main Site Documentation

In field Update


#1

Is in field Update supported now.

Is there an example for this


#2

It has been supported for months :slight_smile:

The docs should have plenty of details.


#3

Thanks Gus

Would you tell me why this happens

DispPrint("NF Mode"); 
SystemUpdate.AccessBootloader();    //Device will reboot automatically

12:52:St:NF Mode
#### Exception System.InvalidOperationException - CLR_E_INVALID_OPERATION (1) ####
#### Message:
#### GHIElectronics.NETMF.System.SystemUpdate::AccessBootloader [IP: 0000] ####
#### MicLogger.Storage::InFieldUpdate_Fun [IP: 0056] ####
#### MicLogger.Storage::Init [IP: 0062] ####
#### MicLogger.Program::Main [IP: 004a] ####


#4

First make sure your firmware and tinybooter are the latest version.

Read the current SystemUpdate.Mode and make sure you are in application mode so you can switch. See our documentation examples.
Did you EnableBootloader() first?


#5

Did you call enable boot loader first? The device needs to be prepped. Check out the start code from Pyxis.

            // Handle Boot Modes
            switch (SystemUpdate.GetMode())
            {
                case SystemUpdate.SystemUpdateMode.NonFormatted:

                    // Display IFU Prep Screen
                    bAniBoot = true;
                    Thread thBoot = new Thread(PrepBootScreen);
                    thBoot.Priority = ThreadPriority.Highest;
                    thBoot.Start();

                    SystemUpdate.EnableBootloader();
                    break;
                case SystemUpdate.SystemUpdateMode.Bootloader:
                    throw new Exception("Invalid Boot Mode!");
                case SystemUpdate.SystemUpdateMode.Application:
                    BootProcess();
                    break;
            }

After that you will need to deploy again.


#6

Would you point me to that code.

I searched for Pyxis and could not find it

Thanks


#7

http://skewworks.com/products/Pyxis%202


#8

Did you EnableBootloader() first?

Mike, after I did EnableBootloader()

The board became non-responsive to the debugger and I had to flash every thing again Tinybooer, CLR.

So tried EnableBootloader() and again it ended up in the same state.

I think I am missing something. I am not sure


#9

@ microt

Like I said in my post after you call EnableBootloader() you need to re-upload your code.

The reason for this is when you call EnableBootloader() it splits the device into 2 sectors so all app data is lost and needs to be uploaded again. You’ll also need to upload your BootLoader project the first time you enter bootloader mode.


#10

ok…some many restarts and deploys…I think I am finally getting the idea. But still not there yet.

Can I assume that the CLR is only 1 copy.
Only the application is 2 and I have to deploy 2 applications. One in the App partition and 1 in the bootloader partition.

So I got the app in the app partition. And if I want to go to the boot mode. I trigger the AccessBootloader. And after the restart it comes up in the "Deployment Bootloader Mode"
After 5 sec. The system boots and ready for the hex file deploy. I select the app I have extracted in app mode(and sig as you tell in the example) And deploy it.

But it tells sig err after deploying it!

Is there a size limit to the app I can deply in the boot mode. I am using the same app which in total is 200K.


#11

Yes the in-field update is a very advanced feature…you are formating the deploy region in 2 sections, loader and firmware…that is a C# loader… pretty sweet when you have it working.


#12

Most of the steps worked…But still I am stuck in the Boot loader mode.
As I explained in my earlier email.


#13

Inside bootloader mode you need something to kick it back to application mode when you’re ready.


#14

Agree…But my code is not able to deploy in Boot loader mode.
It is telling sig error


#15

I think you are mixing the MFDeploy-loading with the IFU. I am not sure if you can use both.


#16

You can only deploy an application to the bootloader or application section if you extracted it from that mode.
So the if you try to deploy something in bootloader mode that you extracted from application mode (or vice versa) you will get a signature error in MFDeploy.