systemupdate out of memory error

When using the code as posted on GHI Electronics – Where Hardware Meets Software I get an out of memory error when loading the firmware2.hex into memory. I tested to code with an update of my app.hex and it works fine.

The fez spider does have 16mb of memory, do I need to do something special…?

Did you try to do it early before anything else and Debug.GC(true) before using IFU?

IFU, allocates a LOT of RAM to buffer the new firmware before it is flashed at a later stage.

It is running after the network, gadgeteer, and glide has been initialized. The system checks for updates, downloads them from a network server, stores them on sd and run the code provided. So there has been some memory usage, the main part of the application has been started.

Would it be a idea to do a 2 stage update for a full system update (app + netmf):

  1. application download a small installer app, netmf and main app and stores it on SD ( the installer app is without network, gadgeteer and glide)
  2. installer app gets installed, system reboots.
  3. installer app does a full install and installs the updated version of the main app from SD
  4. system reboots and start the main app. Complete system has been updated

Or does that sound way to complex?

Too complex and too risky. You only need to dispose your windows in glide

Ok, i’ll try it with disposing the windows in glide. Post my results here…

Thx Gus

Disposing all unnecessary screens and bitmaps did the trick. Thx Gus for pointing me in the right direction.

Glide is designed with one goal, use a lot of RAM to make things run fast :slight_smile: So Glide is RAM hungry.