Main Site Documentation

Flash memory size


#1

Hi all, I understand the Domino has 148K flash memory available for user programming. What I
am wondering is how can you tell how much is being used by your application. I’m sure this info
is in the documentation somewhere but I just can’t find it! Perhaps the size of the .exe created
when you build the project in Visual C#?


#2

Look in the GC class.

I think there is a method like GC.print(true); to print memory/garbage collector info.


#3

Thanks for the quick reply, but I am a bit of a newby and find your answer somewhat confusing.
Can you expand on it?


#4

Chris, he is asking fro flash not ram size.

The only way is to add up all the PE files you have in your output folder in your project.

I have NEVER seen anyone running out of flash and we have some very large projects. I do not think this is something that you would need to worry about…at least not for now.


#5

You can also deploy your app to FEZ and then just download the user app from the board, that will be a sort of “GOLD” master with all the assemblies combined in one file, which will tell you exactly how big it is.


#6

After ‘building’ the project a ‘be’ and ‘le’ folder appear in /bin/debug, each containing two .pe files:
FEZDomino_GHIElectronics.NETMF.FEZ.pe and test.pe. So, I am adding the size of all four to
determine the amount of flash used? Also, can you please explain the procedure of reading the flash to a ‘master’ file? Is this a feature of Visual C# or perhaps MFDeploy?
Thanks


#7

Once you’ve deployed your application with VS, you can boot your Domino into the GHI bootloader by holding down the LDR button and reseting the board with the RESET button. Then you can either use TeraTerm or FEZ Panel to download the user app

http://ravenlabs.org/downloads.php?cat_id=1&download_id=18 << FEZ Panel

Either terminal will work, Panel is much more user friendly however.


#8

When you press F5 in Visual Studio, you will see the debug output and assemblies loading in the output window.
You will see the “deployed” assemblies. You need to add the ROM size of all of them.


#9

OK I’m still confused. I looked at the output window after deploying my project and after a long list of ’ Attaching deployed file’s there is this summary:

Total: (7556 RAM - 62812 ROM - 37084 METADATA)

62812 is indeed the total ROM size of all the deployed files. Since the Domino has ~148K of user flash does this mean that I still have ~ 85K left?

or

If I add the size of the .dll’s loaded ie.

Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\mscorlib.dll

I get 158K. Is this out or 512K total flash on the chip?

or

At the end of the output is this:

GC: 3msec 13848 bytes used, 50532 bytes available

Huh?

Also, I tried pressing the LDR button during a reset then tried to connect using the FEZ Panel.
However, the panel gives an ‘Unhandled exception has occured in your application’ and the message ‘Object reference not set to an instance of an object’. What am I doing wrong?

Any help understanding would be greatly appreciated.

Thanks


#10

Do not add the DLLs, add the pe files.

I would not worry about flash size. I have NEVER seen anyone, even commercial projects, needing more flash!

The GC output is for RAM only


#11

So am I adding the pe files from both the be and le directory or just one? Which one? Also, I do not understand why I can’t connect to the Domino with the FEZPanel.

MFDeploy has a function where you can deploy an image file. I assume you can flash the memory on the board with your project using this utility which would be easier than having to load the project into Visual C# and pressing F5 once the project is finished. How do I create an image of my project?

Thanks


#12

Only the le


#13

OK thanks. Now I am wondering why the FEZPanel won’t work. I watched a video on YouTube
about it and the app fails on ‘connect’. I do not get a list of COM ports to choose from, it throwns an error instead. However, Windows device manager does show a new port ‘GHI Boot Loader Interface’. So, what is the problem with the FEZPanel?

Thanks


#14

Thanks to many contributions from the community, we have FEZ Panel but this is not a GHI product. So, it is not officially supported (yet). You may want to start new thread so other members can see your question.