Main Site Documentation

4.2.9.0 systemupdate out of memory error


#1

When using the code as posted on http://wiki.tinyclr.com/index.php?title=In-Field_Update 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…?


#2

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.


#3

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?


#4

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


#5

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

Thx Gus


#6

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


#7

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