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

Native code lighter on memory?


  • Please log in to reply
1 reply to this topic

#1 CarTech

CarTech

    New Member

  • Members
  • Pip
  • 9 posts

Posted 06 March 2012 - 10:00 PM

I'm using a netduino in a data logging application. I've integrated a GS1011 wifi board, GPS, accelerometer, Gyroscope, Compass, and OBDII/CAN to talk to my car. With all of these devices logging data to an SD buffer, memory is tight. If I try to post via the wifi connection, I run out of memory. I think I've optimized about as much as I can within reason. I understand that native code will run much faster and is useful for time-sensitive applications. This might be a dumb questions, but can I expect to see significantly less memory use if implement some drivers for the these devices in native and then call them from managed code?

#2 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 06 March 2012 - 10:08 PM

Yes, you can expect a smaller memory footprint with native code. However, converting your existing code would require some really massive work. Of course this all depends on how much and what code you move from managed to native mode.

EDIT: Extending the firmware with your own functions is called "interop", it involves re-compiling the firmware and it is discussed in this thread:

http://forums.netdui...indpost&p=23900

Depending on how much code you add to the firmware, flash footprint would be somewhat larger but effecient memory management in your extension code could still reduce RAM usage.




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.