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

Nut/OS on netduino


  • Please log in to reply
3 replies to this topic

#1 Geancarlo

Geancarlo

    Member

  • Members
  • PipPip
  • 24 posts

Posted 27 November 2011 - 01:27 AM

Hello, I have just started trying to use Nut/OS on the Netduino plus with no success at networking.

On the web server example(httpd) I have verified that the code hangs on NutNetIfConfig(DEV_ETHER_NAME, mac, ip_addr, ip_mask).

-Doesn't work on either Nut/OS 4.1(Stable) or 5.0(latest beta).
-I'm using YAGARTO toolchain(GCC 4.6.2) and tools(v. 20100703).
-As IDE, I have CodeLite, although not really relevant.
-I'm deploying* with SAM-BA 2.11(executing the flash boot script)
-This is my simple make batch script, which is used with default makefiles on each app directory:
set makeLocation=C:\ethernut-5.0\nutapp\httpd
set pathExtra=C:\ethernut-5.0\nut\tools\win32;C:\yagarto\toolchain\bin;

cd %makeLocation%
set PATH=%pathExtra%;%PATH%
make clean all install


::%SystemRoot%\explorer.exe "%makeLocation%
PAUSE

Please post some hints if you have managed to make Nut/OS work with N+ :(

#2 AlfaRomeo

AlfaRomeo

    New Member

  • Members
  • Pip
  • 6 posts

Posted 24 December 2011 - 10:07 PM

Hi friend.

For Ethernet to work with Netduino, you should add a define statement to enable the emac driver in the file board.h located
in nut/include folder. So, the modification is like this:

/*
* Ethernet device.
*/
#if defined(CHARON2) || defined(XNUT_100) || defined(XNUT_105) ||\
defined(MMNET01) || defined(MMNET02) || defined(MMNET03) || defined(MMNET04) ||\
defined(ARTHERNET1)
#include <dev/nicrtl.h>
#elif defined(MMNET101) || defined(MMNET102) || defined(MMNET103) || defined(MMNET104)
#include <dev/lanc111.h>
#elif defined(ELEKTOR_IR1)
#include <dev/dm9000e.h>
#elif defined(OLIMEX_LPCE2294)
#include <dev/cs8900a.h>
#elif defined(AT91SAM7X_EK) || defined(AT91SAM9260_EK) || defined(MORPHOQ1) || defined(ENET_SAM7X) || defined(NETDUINO)
#include <dev/at91_emac.h>
#elif defined(EVK1100) || defined(EVK1105)
#include <dev/avr32_macb.h>
#endif

#ifndef DEV_ETHER
#include <dev/null_ether.h>
#endif
#ifndef DEV_ETHER_NAME
#define DEV_ETHER_NAME "eth0"
#endif

you need to define the netduino platform in the NutConfigurator and save it with a different name.
the template you should use is the board AT91SAM7X256-EK and change the processor size to the AT91SAM7X512.

After that, you should build the NUT/OS to take effect those changes.

Best Regards,
Alfonso.

PD: Merry Christmas...


Hello, I have just started trying to use Nut/OS on the Netduino plus with no success at networking.

On the web server example(httpd) I have verified that the code hangs on NutNetIfConfig(DEV_ETHER_NAME, mac, ip_addr, ip_mask).

-Doesn't work on either Nut/OS 4.1(Stable) or 5.0(latest beta).
-I'm using YAGARTO toolchain(GCC 4.6.2) and tools(v. 20100703).
-As IDE, I have CodeLite, although not really relevant.
-I'm compiling with SAM-BA 2.11(executing the flash boot script)
-This is my simple make batch script, which is used with default makefiles on each app directory:

set makeLocation=C:\ethernut-5.0\nutapp\httpd
set pathExtra=C:\ethernut-5.0\nut\tools\win32;C:\yagarto\toolchain\bin;

cd %makeLocation%
set PATH=%pathExtra%;%PATH%
make clean all install


::%SystemRoot%\explorer.exe "%makeLocation%
PAUSE

Please post some hints if you have managed to make Nut/OS work with N+ :(



#3 Geancarlo

Geancarlo

    Member

  • Members
  • PipPip
  • 24 posts

Posted 27 December 2011 - 04:02 AM

Thank you very much, I hadn't noticed your post before. I'll try this when I get back to work on next week :)

Hi friend.

For Ethernet to work with Netduino, you should add a define statement to enable the emac driver in the file board.h located
in nut/include folder. So, the modification is like this:

/*
* Ethernet device.
*/
#if defined(CHARON2) || defined(XNUT_100) || defined(XNUT_105) ||\
defined(MMNET01) || defined(MMNET02) || defined(MMNET03) || defined(MMNET04) ||\
defined(ARTHERNET1)
#include <dev/nicrtl.h>
#elif defined(MMNET101) || defined(MMNET102) || defined(MMNET103) || defined(MMNET104)
#include <dev/lanc111.h>
#elif defined(ELEKTOR_IR1)
#include <dev/dm9000e.h>
#elif defined(OLIMEX_LPCE2294)
#include <dev/cs8900a.h>
#elif defined(AT91SAM7X_EK) || defined(AT91SAM9260_EK) || defined(MORPHOQ1) || defined(ENET_SAM7X) || defined(NETDUINO)
#include <dev/at91_emac.h>
#elif defined(EVK1100) || defined(EVK1105)
#include <dev/avr32_macb.h>
#endif

#ifndef DEV_ETHER
#include <dev/null_ether.h>
#endif
#ifndef DEV_ETHER_NAME
#define DEV_ETHER_NAME "eth0"
#endif

you need to define the netduino platform in the NutConfigurator and save it with a different name.
the template you should use is the board AT91SAM7X256-EK and change the processor size to the AT91SAM7X512.

After that, you should build the NUT/OS to take effect those changes.

Best Regards,
Alfonso.

PD: Merry Christmas...



#4 snowman

snowman

    New Member

  • Members
  • Pip
  • 1 posts

Posted 13 January 2012 - 08:34 PM

From my experience: - I do have Nut/OS running on the Netduino Plus - Problems with NutNetIfConfig is most likely unrelated to the Netduino Plus - I have 3 different AT91SAM7x development boards, and they all have problems with the DM9161 network device, particularly when configured to use DHCP. These problems only occur with Nut/OS 4.10 and Nut/OS 5.0 beta. - NutNetIfConfig works perfectly on all the boards when compiled with Nut/OS 4.8.9, so that's what I'm forced to use if I want DHCP. - I have found that you can compile using the default "at91sam7x-ek.conf" configuration, and it should work on the netduino. However, to work correctly with the enhanced features of the x512 version, you should change the following, at least. Architecture->Target_CPU = Atmel_AT91SAM7X512 RTOS_Kernel->Memory_management->Memory_Size = 0x0001FF00 RTOS_Kernel->Multithreading->Idle_Thread_Stack_Size = [Increase As Desired, perhaps x 1.5] RTOS_Kernel->Multithreading->Main_Thread_Stack_Size = [Increase As Desired, perhaps x 1.5] What Doesn't Work: - I have not been successful in getting the microSD card to work. This is due to differences of the schematic. On the Atmel AT91SAM7x-EK board, the SD Card is connected to the SPI1 bus, and the Netduino Plus connects it to the SPI0 bus. For someone more experienced than myself, I think it's possible to reconfigure this in the configurator, but I have had no success. Good Luck. I'd like to know what experience others have had with Nut/OS on the Netduino Plus. - Snowman




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.