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

AT91SAM7X-EK Netduino 2 compatibility?

Netduino 2 at91sam7x-ek compatibility atmel c++ c/c++ native code

  • Please log in to reply
12 replies to this topic

#1 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 23 April 2013 - 11:13 AM

Hi forum

I found the wiki page with all the Native Code Resources (http://wiki.netduino...-resources.ashx)

It's here mentioned a package of Atmel tutorial codes (AT91SAM7X-EK code samples). Will these work for the second generation of Netduino Boards? The reason I have doubt is because the wiki page haven't been updates since 2011 and there is no mention of the second gen. Netduino boards. 

 

 



#2 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 23 April 2013 - 11:36 AM

No, Netduino gen 2 have different microcontroller, STMicroelectronics STM32F4.



#3 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 23 April 2013 - 11:42 AM

Then are there any code snippets I can use as a basis if I want to write native code for a second gen. Netduino board? Is there any place where I can find board.h, pio.h and such that works with the STM32F4? Im kinda new to this. 



#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 23 April 2013 - 12:03 PM

Hi knutolai,

This should help you get started:
http://www.st.com/we.../tools/PF257904

Chris

#5 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 23 April 2013 - 12:37 PM

Thanks a lot! 

I found v. 1.0 of the standard peripherals library for the STM32F2 here:

https://my.st.com/pu...rrentviews=3498



#6 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 23 April 2013 - 01:20 PM

Something else I noticed when comparing the Netduino schematic and the STM32F4 datasheet (both found here http://netduino.com/...uino2/specs.htm) is that the stated functionality of each pin is expanded when the .NET firmware is removed (?). For example some of the digital pins has ADC functions and more digital pins has PWM functions than stated (see page 39 and onward in the datasheet and compare the pins to the schematic pinout). 



#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 23 April 2013 - 07:47 PM

Hi knutolai, Yes, there are some additional features you can use via native code (ADC pins for instance). The ST micros share a lot of features between different sets of pins...which can be a bit confusing at first, but lets you use the chip in a ton of different configurations. Chris

#8 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 24 April 2013 - 10:09 AM

No, Netduino gen 2 have different microcontroller, STMicroelectronics STM32F4.

According to the Netduino website (http://netduino.com/...uino2/specs.htm) the Netduino 2 uses a STM32F2 series MCU. 

 

The Netduino 2 Plus and the Netduino Go uses a STM32F4 series MCU.

 

Just in case.. ;)

 

Are you aware of any major differences between F2 and F4? There seems to be a lot more tutorials and example code covering the F4 then the F2.



#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 24 April 2013 - 10:26 PM

Hi knutolai,

Are you aware of any major differences between F2 and F4? There seems to be a lot more tutorials and example code covering the F4 then the F2.

Generally speaking, the F2 and F4 are identical. Except that the F4 has a math coprocessor, more speed, more flash, and more RAM. Managed code should work the same on both (and you can usually run F2 native code on an F4 with no changes). Chris

#10 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 26 April 2013 - 05:24 PM

[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]This should help you get started:[/color]
http://www.st.com/we.../tools/PF257904

[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;font-size:14px;]I found v. 1.0 of the standard peripherals library for the STM32F2 here:[/color]
https://my.st.com/pu...rrentviews=3498    

Does these also work as a general purpose C++ firmwares? I would imagine when STDFU erases the .NET netduino firmware I would need a new firmware in order for the MCU to understand my code. Am I correct on this? I'm fairly new to hardware programming and it seems a little overwhelming to write a full firmware for the MCU as well as the actual program I want the chip to run. 



#11 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 26 April 2013 - 08:20 PM

knutolai, If you use the standard templates...you're basically just create your application on top of it. There's no threading or garbage collection or awesome .NET class libraries. And you may have to deal with pointers. But native code can be fun if you're going that direction. BTW, the standard templates should in theory set up the microcontroller for you: clocks, power, etc. Chris

#12 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 06 May 2013 - 01:22 PM

 

[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]If you use the standard templates...you're basically just create your application on top of it.[/color]

[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]BTW, the standard templates should in theory set up the microcontroller for you: clocks, power, etc.[/color]

That's great to hear Chris!

I'm currently coding my project in Microsoft Visual C++ 2010 Express and the built in compiler seems to have trouble understanding the core_cm3.h system file. Scrolling to line 737 it seems the code wants to be compiled with either a ARM, GNU, IAR or TASKING compiler. 

So I'll be searching for a new compiler to run and troubleshoot my program. Is anyone aware of a favorable compiler/toolchain among these? I'm working in a Windows 7 OS. 



#13 knutolai

knutolai

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 07 May 2013 - 10:20 AM

I found a possible solution in Eclipse:

https://sites.google...ery-development

I'll post a update if I find that it works

 

Edit: I got a MINGW gcc compiler through the Sourcery CodeBench Lite Edition. Editing the code in Visual Studios and running it through the terminal (typ. 'gcc main.c') stuff seem to work though it has trouble finding some of the include files. Seems the 'standard peripherals library'-packages folder architecture is designed for very specific compilers... 







Also tagged with one or more of these keywords: Netduino 2, at91sam7x-ek, compatibility, atmel, c++, c/c++, native code

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.