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

Netduino size. Where do I find this in Visual Studio?


  • Please log in to reply
9 replies to this topic

#1 Kåre

Kåre

    New Member

  • Members
  • Pip
  • 6 posts

Posted 01 June 2011 - 05:21 AM

Hi I'm new into .NET MF. I have many years of embedded experience and some years of C# development. And this "inbetween", .NET Microframework, looks really interesting! At the moment, I have read a lot, and talked to others who are starting up. But there are some questions I cannot find answers for. I have installed the toolchain, and compiled the netduino. I do not have any hardware yet. Some questions for now: - Where in the Visual Studio can I see the binary size of the build sourcecode? - In addition to the above question: Can someone tell me which binary/object files are created when building the netduino? - Does someone have experience with minimizing the netduino port? I.e. if I don't need USB, can I remove the USB support myself? - When building in debug configuration, will this make the binary large? I really want to debug, but if the debugger fills up my FLASH, there is no room for my application. I have tried this in other environments, but I don't know the limitations with the NETFM. - In general (not netduino specific): Has someone experience with porting the NETMF to other platforms and processors for professional use? I now MS has their NETFM porting kit, but I have no experience with this. I have talked to some who had tried to make a port within the same mcu family, and this was no problem. But what if I want to make a port to another mcu vendor? - Are anyone in here aware of any ports for Cortex micro ? Thanks in advance! If you guys can answer all these questions, I'm a happy man :o) Kåre

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 June 2011 - 05:48 AM

Hi Kåre,

- Where in the Visual Studio can I see the binary size of the build sourcecode?

In the output window, when you deploy your application to your Netduino (after compilation, before the debugger attaches).

- In addition to the above question: Can someone tell me which binary/object files are created when building the netduino?

Not quite sure what you're asking. Are you talking about building a Netduino app--or the Netduino .NET MF runtime firmware itself?

- Does someone have experience with minimizing the netduino port? I.e. if I don't need USB, can I remove the USB support myself?

Removing USB is pretty easy (and in fact, you can just copy most of the changes from the Netduino Mini BSP to the Netduino BSP and recompile).

- When building in debug configuration, will this make the binary large? I really want to debug, but if the debugger fills up my FLASH, there is no room for my application. I have tried this in other environments, but I don't know the limitations with the NETFM.

You shouldn't have too many issues here. .NET MF IL code is very compact. We've written apps with 10,000's of lines of code and had room left to spare. [Then again, we have one app which is going to reach about 80,000 lines of code...and that is a whole other game.]

- In general (not netduino specific): Has someone experience with porting the NETMF to other platforms and processors for professional use? I now MS has their NETFM porting kit, but I have no experience with this. I have talked to some who had tried to make a port within the same mcu family, and this was no problem. But what if I want to make a port to another mcu vendor?
- Are anyone in here aware of any ports for Cortex micro ?

We have done partial or full ports of .NET MF for a number of ARM7, ARM9, and Cortex MCUs (for non-Netduino commercial projects at work). Moving between extremely-similar chips from the same brand and family is easy, moving to a new core can be a 3-6 month project. [Also, .NET MF is a bit big for most Cortex MCUs unless you use external Flash/RAM.]

Chris

#3 Dixon

Dixon

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 01 June 2011 - 06:30 AM

Hi Chris

Removing USB is pretty easy (and in fact, you can just copy most of the changes from the Netduino Mini BSP to the Netduino BSP and recompile).


But how? how do you control what parts of .NET MF are included and what parts not, and how do you know how big is the .NET MF being loaded (i.e. total size - fre size - our app size)

In theory .NET Framework requires 256MB of RAM, what is much more than the actual Netduino RAM size. It seems it's because the loaded .NET MF is stripped down, removing WPF support among other things. How can we know what it is included and what not?

#4 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 01 June 2011 - 06:45 AM

While deploying an app you'll get an Output window. This could display something like this:

Rebooting...

TinyCLR (Build 4.1.2821.0)

Starting...

Found debugger!
Create TS.
Loading start at 14defc, end 163ad4
Attaching file.
Assembly: mscorlib (4.1.2821.0) (3880 RAM - 33236 ROM - 19134 METADATA)
Attaching file.
Assembly: Microsoft.SPOT.Native (4.1.2821.0) (1144 RAM - 6516 ROM - 4479 METADATA)
Attaching file.
Assembly: Microsoft.SPOT.Hardware (4.1.2821.0) (1760 RAM - 11552 ROM - 7395 METADATA)
Attaching file.
Assembly: Microsoft.SPOT.Net (4.1.2821.0) (704 RAM - 5060 ROM - 2452 METADATA)
Attaching file.
Assembly: System (4.1.2821.0) (872 RAM - 5992 ROM - 3206 METADATA)
Attaching file.
Assembly: Microsoft.SPOT.IO (4.1.2821.0) (740 RAM - 4620 ROM - 2522 METADATA)
Attaching file.
Assembly: System.IO (4.1.2821.0) (1548 RAM - 13292 ROM - 5862 METADATA)
Attaching file.
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.1.2821.0) (512 RAM - 3488 ROM - 1543 METADATA)
Attaching file.
Assembly: Microsoft.SPOT.Hardware.Usb (4.1.2821.0) (580 RAM - 3740 ROM - 1844 METADATA)
Attaching file.
Assembly: SecretLabs.NETMF.Hardware (4.1.0.0) (256 RAM - 1108 ROM - 491 METADATA)
Attaching file.
Assembly: SecretLabs.NETMF.Diagnostics (4.1.0.0) (180 RAM - 440 ROM - 166 METADATA)
Loading Deployment Assemblies.
Attaching deployed file.
Assembly: NetduinoPlusApplication1 (1.0.0.0) (212 RAM - 632 ROM - 212 METADATA)
Attaching deployed file.
Assembly: SecretLabs.NETMF.Hardware.NetduinoPlus (4.1.0.0) (268 RAM - 816 ROM - 423 METADATA)
Resolving.

Total: (10976 RAM - 90492 ROM - 49729 METADATA)

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\mscorlib.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Native.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Hardware.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Net.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\System.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\System.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Assemblies\le\Microsoft.SPOT.Hardware.Usb.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.1\le\SecretLabs.NETMF.Hardware.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'SecretLabs.NETMF.Diagnostics'
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Stefan\AppData\Local\Temporary Projects\NetduinoPlusApplication1\bin\Debug\le\NetduinoPlusApplication1.exe', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.1\le\SecretLabs.NETMF.Hardware.NetduinoPlus.dll', Symbols loaded.
The thread '<No Name>' (0x2) has exited with code 0 (0x0).
Done.
Waiting for debug commands...
The program '[2] Micro Framework application: Managed' has exited with code 0 (0x0).


All parts sizes, including a total, are displayed here. If you can't see this, press "Debug" -> "Windows" -> "Output"

You'll also see this if you use MFDeploy.exe (in C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.1\Tools), press F5 on your PC and the reset button on your Netduino.
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#5 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 01 June 2011 - 06:57 AM

how do you control what parts of .NET MF are included and what parts not, and how do you know how big is the .NET MF being loaded (i.e. total size - fre size - our app size)

There is SolutionWizard application in the .NET Micro Framework Porting Kit to select modules/features you want to be included in the firmware. Regarding the firmware size and memory organization, please refer to "Laying Out Memory on .NET Micro Framework Devices" topic in the Porting Kit documentation, which describes it in great detail.

#6 Kåre

Kåre

    New Member

  • Members
  • Pip
  • 6 posts

Posted 01 June 2011 - 08:49 AM

Not quite sure what you're asking. Are you talking about building a Netduino app--or the Netduino .NET MF runtime firmware itself?

Yes... :o) For now I just want to know the footprint of netduino without application.
I have talked to a guy, who had 20 kb free space for his app after downloading the netduino project to the SAM7x512.
This is bad, so I am investigating if this is a problem I should be aware of.

We have done partial or full ports of .NET MF for a number of ARM7, ARM9, and Cortex MCUs (for non-Netduino commercial projects at work). Moving between extremely-similar chips from the same brand and family is easy, moving to a new core can be a 3-6 month project. [Also, .NET MF is a bit big for most Cortex MCUs unless you use external Flash/RAM.]

Chris

Thanks, very useful info!

#7 Kåre

Kåre

    New Member

  • Members
  • Pip
  • 6 posts

Posted 01 June 2011 - 08:53 AM

Also, .NET MF is a bit big for most Cortex MCUs unless you use external Flash/RAM.

Chris

yes, but Atmel is not the only one on the Cortex marked... It is not hard to find a 512 kb device, but it might be hard to find a (free) port to other than Atmel devices (and som Freescale iMX).

br
Kåre

#8 Kåre

Kåre

    New Member

  • Members
  • Pip
  • 6 posts

Posted 01 June 2011 - 02:02 PM

If I disable debugging, does anyone know about size then? Is there a difference in NETMF size if I disable debugging? I do not have a netduino board yet, so I cannot try to do real hardware debugging now... Thanks! Kåre

#9 Dixon

Dixon

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 03 June 2011 - 08:13 AM

There is SolutionWizard application in the .NET Micro Framework Porting Kit to select modules/features you want to be included in the firmware. Regarding the firmware size and memory organization, please refer to "Laying Out Memory on .NET Micro Framework Devices" topic in the Porting Kit documentation, which describes it in great detail.


Hi CW2,

Thanks a lot for your answer, everything is clearer now.

#10 mattcro

mattcro

    New Member

  • Members
  • Pip
  • 8 posts

Posted 23 April 2012 - 12:20 PM

I've been trying to check my output code size, and cannot see the same sort of size info that stefan quoted above. I don't think I've changed any compile/project options related to build/deploy, and I'm sure I used to see this, at least briefly.

Am I doing this right, or is it likely that I've mistakenly disabled output of assembly and total size info? Or have I already missed it at the output stage shown below?

I now have VS 2010 Express SP1, .NETMF 4.2QFE1 and Netduino+ firmware 4.2RC4. Typical debug window output now looks like this:

Found debugger!

Create TS.

Loading start at 155b88, end 16e8e0

Attaching file.

Attaching file.

Attaching file.

Attaching file.

Attaching file.

Attaching file.

Attaching file.

Attaching file.

Attaching file.

Attaching file.

Attaching file.

Attaching file.

Loading Deployment Assemblies.

Attaching deployed file.

Attaching deployed file.

Attaching deployed file.

Resolving.

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\mscorlib.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Native.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Net.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.PWM.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.Usb.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.2\le\SecretLabs.NETMF.Hardware.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'SecretLabs.NETMF.Diagnostics'
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.2\le\SecretLabs.NETMF.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.2\le\SecretLabs.NETMF.Hardware.NetduinoPlus.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Me\Documents\NetduinoPlus_LEDblink\NetduinoPlus_LEDblink\bin\Debug\le\NetduinoPlus_LEDblink.exe', Symbols loaded.
The thread '<No Name>' (0x2) has exited with code 0 (0x0).






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.