Do you know if there is a recommended limit, say 10% free space as a working area for the microframework? Microsoft typically doesn’t like to see storage issues and likes a small amount of free space.
Does your application contains a lot of resource: Bitmap, HTML Pages, …
Then you could put them on a SPI Flash chip or an SD card and load them from there.
1MByte of code would be a lot of stuff.
Edit:
And I would say that you can use the Flash Memory up to the last byte.
After deployment, there should nothing be added to it.
For RAM, that’s hard to say.
I had out of memory exceptions on my G120 when using only about 70% of the available RAM. This can happen due to memory fragmentation when allocating a larger block of memory.
But if you allocate all larger resources/objects right after startup and tore them in static fields, then you should be ok, with less available RAM.
@ ChrisO - That sounds like a lot of code unless you are using a lot of resources or hardcoding some massive lookup tables. You can use this thread to benchmark your application length against what others are doing https://www.ghielectronics.com/community/forum/topic?id=15270
I’d recommend going with the G120/Cobra2 or G400/Raptor if you really need all that flash/RAM. They have plenty and you can stop worrying about it and get on with creating something awesome.
Ahhh. The penny drops. Using the G120 isn’t going to work. You could use a compiler directive to trim out certain bits. That’s the #IF statement if you’ve not used it before. That way you can just use a simple statement at the start to enable or disable sections of code.