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 Plus Software Architecture and Tools


  • Please log in to reply
13 replies to this topic

#1 Vishal Kaushik

Vishal Kaushik

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationGhaziabad, India

Posted 30 August 2011 - 09:55 AM

I want to understand what is the software technology stack of Netduino Plus? What is the role of components like ER_FLASH, TinyBooterDecompressor etc.? What is the address range of various things in memory for each such component? Why do we need Porting Kit? What is the use of MFDeploy? Who owns TinyBooterDecompressor and from where we can get its updates and archives? How can I know what version of TinyBooterDecompressor is thereon my Netduino Plus? I would also like to know how does my .NET Application actually run on this device?

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 31 August 2011 - 09:17 AM

Hi Vishal, TinyBooter is the bootloader. It lets MFDeploy flash the .NET MF runtime (ER_FLASH) and/or production Netduino apps. The address ranges for each HEX file are listed in MFDeploy when they are selected via Browse... The Porting Kit is the base source code for .NET Micro Framework. We used it as a base to create the Netduino firmware. You can use it to port .NET Micro Framework to various microcontrollers or operating systems. TinyBooterDecompressor is a self-extracting archive (so to say) which loads the bootloader (TinyBooter) into RAM and then executes the real bootloader. It is customized for Netduino Plus and available here in the forums. You can erase your Netduino Plus completely if you'd like and flash the bootloader yourself...to ensure that you know which version is on your board. Yes, your .NET MF application actually runs on the device. If you unplug it from your PC and plug it into a DC power source, your app will start up and run. When you debug from Visual Studio, it's "remote debugging" your Netduino app. Your app is MSIL code, compressed for .NET MF and then interpreted by the .NET MF runtime on the Netduino itself. All updates are here on the forums and on the Downloads page (see up top). By the way...welcome to the Netduino community! Crhis

#3 Vishal Kaushik

Vishal Kaushik

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationGhaziabad, India

Posted 02 September 2011 - 08:17 AM

Thanks Chris for responding to me and Warm Welcome!! That clarifies some doubts in my mind.

I would still like to understand role of each software component in the stack of Netduino Plus. I believe it will allow me to take advantage of those things and implement real good stuff on this device. I would like to contribute to this platform on software front and I think there should be a reference material for people like me.

#4 Dan T

Dan T

    Advanced Member

  • Members
  • PipPipPip
  • 91 posts
  • LocationBoston (Greater)

Posted 04 September 2011 - 11:47 PM

I would also to see the entire system described in one place. There are a lot of related pieces, like bootloader, USB driver, porting kit, source code, patches, etc. The pros take things for granted, but we newbs have to learn as we go. "You take the red pill – you stay in Wonderland and I show you how deep the rabbit-hole goes." -Morpheus

#5 Vishal Kaushik

Vishal Kaushik

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationGhaziabad, India

Posted 21 October 2011 - 12:13 PM

Can someone please help me with my question? It will help me do things in a better way. Thanks in advance.

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 21 October 2011 - 12:28 PM

Hi Vishai, Can you post one question at a time...and then a few of us can help "dive deep" into it? Perhaps add it to the Wiki? Chris

#7 Dan T

Dan T

    Advanced Member

  • Members
  • PipPipPip
  • 91 posts
  • LocationBoston (Greater)

Posted 24 October 2011 - 01:39 AM

I'll take a stab at this. It's a good way to learn. I'll correct/update as I learn more:

I want to understand what is the software technology stack of Netduino Plus?

At the bottom of the stack, you can program the ARM7 microprocessor with C++. This is called "native" programming because it works on the native hardware without an abstraction layer, aka "bare metal".
The bootloader is an example of native code. It performs the basic communication tasks with the outside world so programming the Flash memory with additional new firmware is easier.
NetduinoPlus firmware is also native code. It is the software that implements .NET MF on the Arm7 and also implements the NetduinoPlus-specific features, like the networking stack, SD card access, LED, etc.
Once this firmware is loaded, you can finally add the top layer: Application code written in .NET (C# or VB.NET).

I would also like to know how does my .NET Application actually run on this device?

I'm a little fuzzy on this one. I know .NET code is NOT compiled down to machine language. (Native code is, btw.) Instead, it compiles down to Common Language Runtime code. On the desktop "full" version of .NET, I think this CLR stuff is JIT-compiled. But with .NETMF, this CLR stuff is interpreted -- part of the .NETMF firmware is interpreting the intermediate byte codes on the fly. I think the intermediate code is placed in a file with a .pe extension.

What is the role of components like ER_FLASH, TinyBooterDecompressor etc.?

See above. The ER_FLASH file *is* the firmware load file. TinyBooter is the resident program that helps load firmware.

What is the address range of various things in memory for each such component?

Don't know.

What is the use of MFDeploy?

MFDeploy is a application that runs on the PC and knows how to talk to the Netduino. It includes lots of diagnostic stuff like "Device Configuration" and memory maps. It is the tool you use to load new firmware. After loading new firmware, you must use MFDeploy's Network Config window to reprogram the MAC address. (See the sticker on the bottom of your Netduino.) Basically, MFDeploy does EVERYTHING except load/debug your user code. (Actually, it can do some debugging. It's a super-tool!)

Why do we need Porting Kit?

You don't need the Porting Kit. Unless you want to be a hotshot and compile your own custom firmware. Then you do. The Porting Kit is the [native] source code for .NETMF and some extra stuff to help the hotshots craft a custom implementation. It's called a porting "kit" because it is NOT ready-to-go on Netduino or even on ARM7. It is the stuff you'd need to do-it-yourself. Netduino firmware is built on the foundation provided by the Porting Kit. 99.9% of us do not need to know about anything about it.

Who owns TinyBooterDecompressor and from where we can get its updates and archives?

Secretlabs writes it and we all "own" it because it's open source. The latest firmware release also includes TinyBooterDecompressor.bin in the .zip file. The source code for all the pieces is including further down in the firmware thread as (See SourceCode_Netduino_AllEditions_4.2.0.0_RC3.zip)

How can I know what version of TinyBooterDecompressor is thereon my Netduino Plus?

Good question. This wiki page tells you how to check AFTER you've loaded it. :( (But before you've loaded the firmware.)

#8 Dan T

Dan T

    Advanced Member

  • Members
  • PipPipPip
  • 91 posts
  • LocationBoston (Greater)

Posted 24 October 2011 - 01:52 AM

After loading new firmware, you must use MFDeploy's Network Config window to reprogram the MAC address.


Note: Chris Walker says he's going to fix that. :) But he's been saying that for a long time. :angry: Maybe he can't figure out how? :blink:

#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 24 October 2011 - 02:22 AM

Note: Chris Walker says he's going to fix that. :) But he's been saying that for a long time. :angry: Maybe he can't figure out how? :blink:

;)

It's because of how the MAC address is stored. We're working on a GUI called "Netduino Update" which helps load firmware onto your Netduino...but it's a ways out. The theory is that we'll read in your current MAC address before flashing your unit--and then write it back out after you reflash.

But if you're erasing your Netduino, the MAC address stored in flash goes away. So for the SAM-BA flashing step...the current hardware may always need you to type back in your MAC address after doing a major update.

Chris

#10 Vishal Kaushik

Vishal Kaushik

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationGhaziabad, India

Posted 21 November 2011 - 05:07 PM

Thanks Dan, I read this and read this more and more as I played with Firmware Upgrade process. It really helps (especially the way you broke my questions and answered). The address range thing I saw when I was using SAM-BA so kind of asked it (I know I should not play with it but then if I did :o ). Chris: I think just a utility that backups and restores your settings will be a good idea, that will work even if you have completely erased Netduino. I am not sure if ER_CONFIG is already doing something like that. With rapidly changing world having a full-blown update tool for Netduino will itself need updates quite frequently, I would rather like to see a tool like Microsoft Web Platform Installer. For now I wish if there was a permanent link to download beta/RC version of all related software under downloads itself otherwise one has to search in forums. But then not having that encourages people to search in forums and may be contribute as well :) .

#11 Vishal Kaushik

Vishal Kaushik

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationGhaziabad, India

Posted 03 December 2011 - 06:13 PM

I was searching stuff on MSDN for this topic and found this link Understanding .NET Micro Framework Architecture

There is a very good Architecture Diagram Attached File  IC148840.jpg   25.03KB   43 downloads (though I am not sure what WPF is doing there :)) but then can somebody use it as a reference and provide similar structure for Netduino Plus? Thanks in advance.

#12 liqdfire

liqdfire

    Advanced Member

  • Members
  • PipPipPip
  • 78 posts

Posted 05 December 2011 - 05:53 PM

I was searching stuff on MSDN for this topic and found this link Understanding .NET Micro Framework Architecture

There is a very good Architecture Diagram Attached File  IC148840.jpg   25.03KB   43 downloads (though I am not sure what WPF is doing there :)) but then can somebody use it as a reference and provide similar structure for Netduino Plus? Thanks in advance.



WPF is there because on other devices that have an interface to an LCD use WPF for presentation.
Take a look at the GHI electronics devices, I think the Embedded Master EX Dev kit comes with an LCD on it, so does Tahoe.
I have one of the original Embedded Master dev kits from GHI, kind of interesting little device, but expensive.

#13 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 05 December 2011 - 07:21 PM

I was searching stuff on MSDN for this topic

There is rather detailed description in the .NET Micro Framework Porting Kit documentation, available for download at CodePlex (RCLPort.chm), which answers a lot of your questions.

but then can somebody use it as a reference and provide similar structure for Netduino Plus?

Sorry, but at the architecture level Netduino Plus is no different than any other device/board, the diagram applies to it as well. However, the picture does not really include all the features, there are many PAL and Library parts missing (e.g. networking).

#14 Vishal Kaushik

Vishal Kaushik

    Member

  • Members
  • PipPip
  • 16 posts
  • LocationGhaziabad, India

Posted 06 December 2011 - 01:41 AM

There is rather detailed description in the .NET Micro Framework Porting Kit documentation, available for download at CodePlex (RCLPort.chm), which answers a lot of your questions.


Sorry, but at the architecture level Netduino Plus is no different than any other device/board, the diagram applies to it as well. However, the picture does not really include all the features, there are many PAL and Library parts missing (e.g. networking).



Thanks for your reply. My idea of referring MSDN link was to give a reference and say that is how I was looking to have information for Netduino I.e. not as detailed as it is in chm file.

There are few things that ARM(Atmel) and Netduino provide, I was expecting to see those in the diagram. In layered representation, it becomes very clear what uses what and what sits parallel to what?




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.