Infield update of firmware

Then I used TinyConfig to update the software with the key etc

you can hold mode pin and temporary connect serial debug to see why.

If TinyCLR Config updated successfully but the application doesn’t run, 99% application doesn’t match application.

Can you ping the board after update?
How large is your application?

I tried using TinyConfig to do an update. It acted the same way as IFU. I did re-boot from TinyConfig and got the following:

This is higher up in the debug screen:

image

The application is a little over 1.1 Mb. And selected Extend Heap and Enable external Flash

1 Like

Anyway we can use your project?

There other option is to show the list of assemblies loaded and what address they are loaded to. You can see this on the deploy window. Just can’t remember if this feature was on last preview or it is only in the release candidate coming next week

that feauture is available in preview6

Did you flash firmware after update application? Is external flash disable?

I was able to do IFU as I created new application versions. But now, it no longer works. Must be something to do with the content of the application code. It deploys correctly from VS. It also does not work through TinyCLR.

Are both allocations built against the same firmwat version? Did you try a simple application?

The application and firmware match, RC-1. Did not try the simple application. Previous application versions did work correctly (RC-1) Only obvious difference is size, 1148664 vs 1143026 bytes.

There is a minor thing with TinyCLR Config that, if you didn’t enable external flash (I see larger than 1MB) then TinyCLR Config says “update failed” but doesn’t say more detail.

Did you enable external flash? Usually reflash firmware then this flag is cleared.

What does TinyCLR Config look like when failed?

And how did you get them that not multiple of 1024?

Any please, this issue is most important to us, we’d like to how to reproduce it.

Thanks.

would the tca and associated key help ?

Yes, that will help to reproduce for first issue.

Second issue is, I am wondering, how did you get tca size not multiple of 1024? The output size always multiple of 1024?

Was your PC overloaded at the time making output file? :wink:

How can I send it to you ?

Email to support@ ghi

Hi, we found one assembly located on external flash corrupted.

When you deploy by VS, does it work or not?

Could you do two cases below:

Case 1:

  • Deploy your application by VS.
  • Reflash firmware to clear external flash flag. This will prevent next deployment erase external flash.
  • Deploy small application by VS that run the code below to get raw binay from external flash.
  • Zip it send to us this binary.

Case 2:

  • Deploy your application by TinyCLR.
  • Reflash firmware to clear external flash flag. This will prevent next deployment erase external flash.
  • Deploy small application by VS that run the code below to get raw binay from external flash.
  • Zip it send to us this binary.

These two zip files are supposed to be same raw binary. Anyway, we need both.

For read raw external flash, just read raw binay and save to SD card. We wrote as below for reference.

static void ReadRawDeploymentExternalFlash()
        {
            var qspiController = StorageController.FromName(SC20260.StorageController.QuadSpi);
            var sdController = StorageController.FromName(SC20260.StorageController.SdCard);

            var qspiDrive = qspiController.Provider;
            var sdDrive = FileSystem.Mount(sdController.Hdc);

            qspiDrive.Open();

            const int TotalSize = 16 * 1024 * 1024;
            const int SectorSize = 4 * 1024;

            var block = TotalSize / SectorSize;
            var index = 0;
            var data = new byte[SectorSize];

            using (var fsWrite = new FileStream(sdDrive.Name + "\\rawExternalFlash.bin", FileMode.Create))
            {
                for (var i = 0; i < block; i++)
                {
                    if (i < 2048)
                    {
                        Debug.WriteLine("Ignored sector: " + i);
                        goto do_continue;
                    }

                    Debug.WriteLine("Reading sector: " + i);

                    qspiDrive.Read(index, SectorSize, data, 0, TimeSpan.FromSeconds(1));
                    fsWrite.Write(data, 0, SectorSize);

                    fsWrite.Flush();

                do_continue:
                    index += SectorSize;
                }

                fsWrite.Close();

                Debug.WriteLine("All done");
            }
        }

@trichins we need your help on this before RC2 is out. This is our last chance to fix any standing issues before production. Otherwise you will wait for months to have the next production release.

Looking into this, it seem impossible generate a file that is not multiple of 1024. We need more info from you on how this happened. Maybe it is just a corrupted file.

Regardless, we need this resolved this week, and your input is necessary please.

I’m running that test program now. I’ll send the results this morning. Is there any other information that would help ?

We are not seeing the issue. We need steps so we can reproduce. Once we see it, we can fix it.

Thank you

would it help to send a tca file. Or even the source to the entire solution ?