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

Using netduino plus without .NET


  • Please log in to reply
6 replies to this topic

#1 Kenny Kerr

Kenny Kerr

    Member

  • Members
  • PipPip
  • 17 posts

Posted 14 January 2011 - 03:10 PM

I’m doing a lot of UDP networking and am not too pleased with the performance of the interpreter (encoding, decoding packets etc). On the desktop I’m using C++ and am wondering whether I can use the netduino boards I have to prototype some completely native firmware. In particular I was thinking of using uIP or lwIP. I’m not sure which one so I’ll probably just try them both and see what the pros and cons are. Is netduino suited for this type of development? Also if there are any suggestions for tooling I’d appreciate it. I’m new to microcontroller development but have used C++ on the desktop for years. Should I write to the metal or use some kind of mini OS? What about drivers for the network adapter and SD card? I’ll probably just try and figure out what the Micro Framework is doing under the covers but any suggestions would be appreciated. At the very least I want to prototype a native UDP implementation to compare the performance against the Micro Framework’s Socket implementation written in C#.

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 14 January 2011 - 04:54 PM

Hi Kenny, You can absolutely program in straight C++. Just connect a jumper wire between the 3.3V header and the gold ERASE pad (top-right corner underneath the digital 0 pin). You can reflash back to the open source .NET MF firmware later if desired. Please note that C++ programming is much, much more complicated than C# on these types of micros. For customer .NET MF projects, we've found that mixing a tiny bit of C++ interop into custom firmware gives us the fast-to-market speed and simplicity of C# with the power of raw C++ speed for parsing/creating big packets of data. If you're doing heavy development, I'd recommend picking up the Atmel AT91SAM7X-EK devboard, solder a 512KB MCU onto it, and buying a nice compiler and JTAG unit. These can range in price from low-cost (GCC and one of the low-cost JTAGs) to really nice (the ARM RVDS compiler and RVICE JTAG...about $10k). We use the latter, but you can certainly do this sort of thing using GCC and Netduino on a budget if you don't mind using printfs for debugging... Chris

#3 Kenny Kerr

Kenny Kerr

    Member

  • Members
  • PipPip
  • 17 posts

Posted 14 January 2011 - 05:11 PM

Thanks for the advice Chris. I’ll see how far I can get performance-wise by mixing in some C++ interop. Would you recommend using the .NET Socket class and passing each packet buffer to native code for encoding/decoding/handling? I assume the .NET Socket class is internally pretty efficient in its communication with the transport layer. Cheers, Kenny

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 14 January 2011 - 05:15 PM

Would you recommend using the .NET Socket class and passing each packet buffer to native code for encoding/decoding/handling? I assume the .NET Socket class is internally pretty efficient in its communication with the transport layer.


Yes, and yes. We can download about 1mpbs of data using C# sockets and a fixed buffer size...so the performance of the C# sockets implementation can be pretty good.

Chris

#5 Kenny Kerr

Kenny Kerr

    Member

  • Members
  • PipPip
  • 17 posts

Posted 14 January 2011 - 05:44 PM

Thanks Chris - that sounds promising.

#6 Kenny Kerr

Kenny Kerr

    Member

  • Members
  • PipPip
  • 17 posts

Posted 15 January 2011 - 02:39 PM

If you're doing heavy development, I'd recommend picking up the Atmel AT91SAM7X-EK devboard, solder a 512KB MCU onto it, and buying a nice compiler and JTAG unit. These can range in price from low-cost (GCC and one of the low-cost JTAGs) to really nice (the ARM RVDS compiler and RVICE JTAG...about $10k). We use the latter, but you can certainly do this sort of thing using GCC and Netduino on a budget if you don't mind using printfs for debugging...


Could you recommend a basic JTAG unit for single-step debugging that I could use with GCC? I want to get a feel for what this is like with a microcontroller, but have no idea where to start or where to purchase such a thing.

Cheers,
Kenny

#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 15 January 2011 - 07:36 PM

Hi Kenny,

We use RVICE here, so unfortunately I'm probably not the best person to ask.

What experience have others in the community had? Here is one of the most popular JTAGs. I know that it works with IAR Workbench (which has a free kickstart edition for small projects). What have others used for JTAG debugging with GCC?

Chris




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.