Why most of flash memory seems not to be available?

We’re using the SITCore SCM20260E, which I expect to have 16Mb of flash.
But most of that seems not to be available, and I don’t understand why.

Total deployment size is around 2.6Mb.
Once the assemblies are deployed from Visual Studio, around 4.3Mb are left in the deployment area.
I guess I have to add around 1.1Mb of SITCore firmware already there.
And that’s a total of around 8Mb.
So, I would expect around 12.3Mb left, instead of 4.3, in the deployment area, which in our case would be precious for resources.

Where are the missing 8Mb? Is there a way to access that memory for deployment, or at least some other usage?

Have you compared debug versus release usage?

Very similar. Deployment size in relase is around 2.5Mb vs 2.6Mb of debug.
Still, there are 8Mb that seem inaccessible for deployment…

any setting in Tinyclr config which might impact available space?

External flash and external ram are not enabled by default. Not all systems have them.

@Mike Extended heap and extended deployment already set in TinyCLR config.

@Gus_Issa Ok, but I’m a bit confused here. Specs says 16Mb of flash and I see no evident info around about them not being fully available. Maybe I missed something. That’s a major point, for us.
So, how can I enable full flash for deployment on our system (SCM20260E)?

Yes 16mb external chip plus 2mb inside the chip. I can’t recall how are the memories allocated. But deployment and extended deployment doesn’t get the full available memory.

@Gus_Issa Mmm… From what I see, a lot is not available for deployment. 8Mb at least. That’s a lot. :frowning:

From our docs: External Memory

The top 6MB of the optional external flash can be used to extend the deployment region, which holds the application and its resources. This is done by using TinyCLR Config or through code:
The entire 16MB of flash, or 10MB when deployment is extended, can be used directly by reading/writing raw sectors or using Tiny File System.

6MB external plus 600Kb internal: Around 6.6MB total.

Other 10MB for user but not for deployment.

1 Like

Mean after deployed 2.6MB, there is ~4MB left, likely correct.

1 Like

Ok @Dat_Tran . It’s a pity so much is not for deployment, but now I understand. Thanks for the explanation.