Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

How can I see flash and RAM memory left ?


  • Please log in to reply
10 replies to this topic

#1 Nicolas Dorier

Nicolas Dorier

    Member

  • Members
  • PipPip
  • 24 posts

Posted 01 March 2011 - 04:49 PM

I have seen that in the firmware 4.1.1.a7 :

With this firmware, you will have the following resources available for your code:
64KB Flash
28KB+ RAM


When I deploy my program on the netduino I see

Total: (11924 RAM - 100376 ROM - 54323 METADATA)

And in the website tech spec for the netduino

Code Storage: 128 KB
RAM: 60 KB

And in MFDeploy I see

RAM    0x00000000  0x00020000 (131072 in dec))
FLASH  0x00100000  0x00080000 (524288 in dec)

Does somebody can explain what is all these different value about the netduino ROM/Flash ?
How can we know how much memory is left for our code after the deployment ?

Thanks !

#2 phantomtypist

phantomtypist

    Advanced Member

  • Members
  • PipPipPip
  • 142 posts
  • LocationNew York, NY

Posted 01 March 2011 - 06:04 PM

You have the Netduino and Netduino Plus confused. They have different amounts of RAM and Flash available.

#3 Nicolas Dorier

Nicolas Dorier

    Member

  • Members
  • PipPip
  • 24 posts

Posted 01 March 2011 - 06:37 PM

You have the Netduino and Netduino Plus confused. They have different amounts of RAM and Flash available.


I posted on Netduino because, it's probably the same answer with the Netduino+.

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 March 2011 - 07:57 PM

How can we know how much memory is left for our code after the deployment ?


When you deploy your application from Visual Studio, you'll see a message (very briefly) in the deployment window at the bottom of the IDE...which says how many bytes your program takes.

Simply subtract this from the flash storage space available for your board and you'll know how much room is left for code.

For RAM, the amount free changes depending on what you're using in your program at the time. Simply add the following line of code to your Netduino app to determine free RAM:
Debug.Print("freemem: " + Debug.GC(true));

Chris

#5 Nicolas Dorier

Nicolas Dorier

    Member

  • Members
  • PipPip
  • 24 posts

Posted 01 March 2011 - 10:42 PM

Simply subtract this from the flash storage space available for your board and you'll know how much room is left for code.



Where can I find the space available for my board ?

In the tech spec of the netduino I see

Code Storage: 128 KB
RAM: 60 KB

After deployment :
(11924 RAM - 100376 ROM - 54323 METADATA)

So I have 50 KB of RAM left during the execution.
And 28 KB of code ?

When you give a new firware you say :

64KB Flash
28KB+ RAM

In this case, I would have only 18 KB of RAM left during execution.

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 March 2011 - 11:39 PM

Hi Nicolas, Go ahead and ignore all the extraneous info that .NET MF provides. Just subtract the code size of your current application from the total available code space available. Netduino has 128KB of flash available for code. Netduino Plus has 64KB of flash available for code. Chris

#7 sanders

sanders

    Member

  • Members
  • PipPip
  • 12 posts

Posted 02 March 2011 - 11:28 AM

When you deploy your application from Visual Studio, you'll see a message (very briefly) in the deployment window at the bottom of the IDE...which says how many bytes your program takes.

Simply subtract this from the flash storage space available for your board and you'll know how much room is left for code.

For RAM, the amount free changes depending on what you're using in your program at the time. Simply add the following line of code to your Netduino app to determine free RAM:

Debug.Print("freemem: " + Debug.GC(true));

Chris



Having the same question, I am looking at the bottom rule of my IDE for the size of my project to come by, but apart from the messages "preparing to deploy assemblies to the device" and "deploy succeeded" I cannot see anything regarding size... Am I looking at the wrong location ? Can someone point out where to look (see attachment)

thanks!

Attached Files

  • Attached File  ide.png   122.06KB   64 downloads


#8 Nicolas Dorier

Nicolas Dorier

    Member

  • Members
  • PipPip
  • 24 posts

Posted 03 March 2011 - 01:31 PM

When you compile your project just calculate the size on .pe files

#9 sanders

sanders

    Member

  • Members
  • PipPip
  • 12 posts

Posted 05 March 2011 - 07:08 AM

When you compile your project just calculate the size on .pe files


Okay thanks !.. When using visual studio they would be in my debug/be/ folder (or in the debug/le/ folder).. No idea what the difference is....

Sander.

#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 05 March 2011 - 08:16 AM

Okay thanks !.. When using visual studio they would be in my debug/be/ folder (or in the debug/le/ folder).. No idea what the difference is....

Sander.

Hi Sander,

The "be" files are for "big endian" micros. The "le" files are for "little endian" micros. Netduino uses the "le" files.

Chris

#11 Spork

Spork

    Advanced Member

  • Members
  • PipPipPip
  • 105 posts

Posted 05 September 2011 - 06:30 PM

... ignore all the extraneous info that .NET MF provides. Just subtract the code size of your current application from the total available code space available.

Netduino has 128KB of flash available for code.
Netduino Plus has 64KB of flash available for code.


Chris,

Struck through my previous reply and am using the .pe size, as you recommended. In the same folder, I see a .pdbx file. My .pe is 7K and my .pdbx is 23K. Is one production and the other debugging, so that only one or the other is deployed? Or are they both deployed?

Q1: When you say "code size of your current application" do you mean the ROM value reported for my assembly?
Q2: What is the METADATA value reported by VC# (does METADATA end up in flash)?
Q3: Should I add ROM and METADATA values for my assembly and compare that sum to the N+'s available 64KB flash?

My assembly currently has the following values: 824 RAM, 6620 ROM, 2339 METADATA. I'm thinking that means I'm nowhere near the limit, yet.

Thanks for your time!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.