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

Direct C++ with C#'s drivers


  • Please log in to reply
5 replies to this topic

#1 Charles

Charles

    Advanced Member

  • Members
  • PipPipPip
  • 192 posts

Posted 26 November 2010 - 03:18 AM

Is it possible to write unmanaged code for the Netduino but still take advantage of all the drivers, etc. available to C#??

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 26 November 2010 - 03:36 AM

Hi Charles, Yes, you can write native C++ and compile it directly into the open source Netduino firmware. We're also working on a way to integrate C++ code at compile-time...but it'll take a while to get that completely implemented. C# is great for "command and control", and your native C++ code can do the time-sensitive tasks... Chris

#3 Klop

Klop

    Advanced Member

  • Members
  • PipPipPip
  • 49 posts

Posted 11 May 2011 - 06:11 AM

Hi Chris, So how would I go about doing this? I get your Netduino firmware project and then write some C++ classes which I have to include in the firmware somehow? Thanks.

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 11 May 2011 - 06:39 AM

Hi Chris,

So how would I go about doing this? I get your Netduino firmware project and then write some C++ classes which I have to include in the firmware somehow?

Thanks.

You can write C++ code--and then create C# wrappers to call it. You can also write C++ code that runs behind the scenes (via IRQs, FIQs, completions, etc.)

Here's a good example/tutorial:
http://adeneo-embedd...-framework.html

Chris

#5 Klop

Klop

    Advanced Member

  • Members
  • PipPipPip
  • 49 posts

Posted 11 May 2011 - 07:33 AM

You can write C++ code--and then create C# wrappers to call it. You can also write C++ code that runs behind the scenes (via IRQs, FIQs, completions, etc.)

Here's a good example/tutorial:
http://adeneo-embedd...-framework.html

Chris


Cool - I'll have a look at the example/tutorial. Thank you very much.

#6 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 11 May 2011 - 08:33 AM

Cool - I'll have a look at the example/tutorial.

You might also want to check out Steve Maillet's Using Interop in the .NET Micro Framework V3.0, and Adding Features to the .NET Micro Framework by Interoperating with Unmanaged Code chapter in the Porting Kit documentation.

Additionally, several interop projects with complete source code have been already published in the forum (BitBanger by sweetlilmre, OneWire, Corey Kosak's famous Fluent Interop 1.6/1.4/1.2/1.0, and others).




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.