[En-Nut-Discussion] Nutos 5.1 on Ethernut 1.3g with multiple threads: network freezes

Harald Kipp harald.kipp at egnite.de
Mon Jun 29 17:48:36 CEST 2015


Hi,

On 18.06.2015 08:42, Jonathan Woithe wrote:

> Is there any chance that this could be merged into mainline?  As far as I
> can tell, this is required if the RTL8019AS is to be reliably initialised on
> hardware which has been set up for EEPROM emulation.  Even when the existing
> mainline code results in a functioning NIC, the NIC has clearly not been set
> up as expected (based on NutOS 4.4.1 for example) since the NIC LED0 has
> changed behaviour.

IMHO it is a bad idea to contaminate Nut/OS drivers with board-specific
code. Therefore board-specific initialization code had been added to
Nut/OS some time ago. For Ethernut 1.3 this code includes NIC EEPROM
emulation and is located in nut/arch/avr/board/ethernut1.c.

This code will be automatically included and executed, if your board
config file (nut/conf/ethernut1h.conf) contains

NUT_INIT_BOARD = ""

Unfortunately this item is missing in the configuration files of earlier
hardware revisions.

You can use the Configurator to enable this item at

Hardware Platform -> Board Initialization

Let us know, if it works. If it does, we should patch the other board
configuration files instead of blowing up the NIC driver with board details.

See the NIC drivers dm9000.c and lan91.c in nut/dev/. They are
intentionally not in the arch directory, because they can be used by any
hardware platform. That's far better than creating a new instance for
every board.

If you need other specific initialization routines for your board, you
are welcome to include them in the mainline. At least provide

nut/arch/avr/board/[myboard].c
nut/conf/[myboard].conf

You can even include new routines or replacements of existing functions
or drivers, if this would make Nut/OS run smoother on your hardware.

Regards,

Harald




More information about the En-Nut-Discussion mailing list