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.
Hi! I'm having some issues and I think they are related with deployment size. How can I see how big is my program and who is using my free bytes?
I'm using lots of references, are there any way to see how big is each one??
After compiling I can see something like this:
Deploying assemblies for a total size of 1080 bytes
Assembly: mscorlib (4.1.2821.0) (3880 RAM - 33236 ROM - 19134 METADATA)
Assembly: Microsoft.SPOT.Native (4.1.2821.0) (1144 RAM - 6516 ROM - 4479 METADATA)
Assembly: Microsoft.SPOT.Hardware (4.1.2821.0) (1752 RAM - 11440 ROM - 7371 METADATA)
Assembly: Microsoft.SPOT.Net (4.1.2821.0) (704 RAM - 5060 ROM - 2452 METADATA)
Assembly: System (4.1.2821.0) (872 RAM - 5992 ROM - 3206 METADATA)
Assembly: Microsoft.SPOT.IO (4.1.2821.0) (740 RAM - 4620 ROM - 2522 METADATA)
Assembly: System.IO (4.1.2821.0) (1548 RAM - 13292 ROM - 5862 METADATA)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.1.2821.0) (512 RAM - 3488 ROM - 1543 METADATA)
Assembly: Microsoft.SPOT.Hardware.Usb (4.1.2821.0) (580 RAM - 3740 ROM - 1844 METADATA)
Assembly: SecretLabs.NETMF.Hardware (4.1.0.0) (256 RAM - 1108 ROM - 491 METADATA)
Assembly: SecretLabs.NETMF.Diagnostics (4.1.0.0) (180 RAM - 440 ROM - 166 METADATA)
Assembly: NetduinoPlusApplication1 (1.0.0.0) (164 RAM - 264 ROM - 90 METADATA)
Assembly: SecretLabs.NETMF.Hardware.NetduinoPlus (4.1.0.0) (268 RAM - 816 ROM - 423 METADATA)
Total: (10920 RAM - 90012 ROM - 49583 METADATA)
What does RAM and METADATA mean?? What is the ROM amount available in my Netduino Plus?? I seen in specifications it is 64 KB and 128KB without networking. What does it mean?
I must confess that I also find it confusing. I'd prefer a simple and clear percentage, maybe even with details.
Anyway, just after the deployment, the size shown is only regarding the program itself. There's no any indication about the dynamic/static object allocations, stack, heap. That's because it's impossible to know it in advance.
I believe that no discovery of fact, however trivial, can be wholly useless to the race, and that no trumpeting of falsehood, however virtuous in intent, can be anything but vicious.
-- H.L. Mencken, "What I Believe"
I believe that no discovery of fact, however trivial, can be wholly useless to the race, and that no trumpeting of falsehood, however virtuous in intent, can be anything but vicious.
-- H.L. Mencken, "What I Believe"
There is 'Solution Configurations' combobox in the Visual Studio toolbar, which displays the selected configuration (i.e. Debug or Release). If you cannot see it (it is often hidden in Visual Studio Express editions), make sure "Show advanced build configurations" is selected in Options dialog box, Project and Solutions category, General page.
Also, you can select the build configuration in Configuration Manager dialog, Build menu.
I've tried with Release, Debug and Debug (Active) and I'm always having the same problem. I've also chosen "Optimize code" inside "Generate".
Well, almost - you'd need to change the active configuration in the combobox in the toolbar from "Debug" to "Release".
The project settings tab you've shown allows you to specify various configuration options, independent of what is selected as active (in the combobox). After you select "Release" in the combobox, you will be actually building it, and you will have "Configuracion: Active (Release)" in the tab (now you have "Active (Debug)").
The missing brick is actually the RAM, especially on Netduino Plus. But the Plus suffers also about the few ROM.
Unfortunately there's no way to increment the available RAM. You may only follow the above suggestions, or/and try to write the code much like the "C++" way.
Some tip:
minimize the GC usage (favor the static readonly objects, instead creating/destroying);
never use large types such as the double, DateTime, TimeSpan (try to use a surrogate);
minimize the usage of strings;
avoid the use of complex components such as the Xml or similar;
try to write the code "as the microprocessor would expect to read it".
Okay, just some tip to get the code more compact and fast.
Cheers
Biggest fault of Netduino? It runs by electricity.
Well, almost - you'd need to change the active configuration in the combobox in the toolbar from "Debug" to "Release".
The project settings tab you've shown allows you to specify various configuration options, independent of what is selected as active (in the combobox). After you select "Release" in the combobox, you will be actually building it, and you will have "Configuracion: Active (Release)" in the tab (now you have "Active (Debug)").
Edit: Attached picture.
I think this is almost configured, but now I'm having some troubles:
Most of them are "namespace doesn't exist or can't be found..." (this doesn't happen if I select Debug).
In the Solution Explorer, right click on your project name (ex. NetduinoApplication1) and select Add Reference...
Add the required references (most of the time they have the same name as the namespaces)