[En-Nut-Discussion] config flashspace usage on SAM7X256

Harald Kipp harald.kipp at egnite.de
Sat Jun 20 13:35:50 CEST 2009


Bernd Walter wrote:

> I don't need Ethernut to save anything, because I do it myself in an
> AT45DB chip.
> But I'm unable to find the code using it so that I can disable.
> Or is it just reserved for future use?

Hi Bernd,

at least saving the configuration had been removed from the system
libraries in 4.9. Still, the system libraries read CONFOS and CONFNET.

In general this is done by calling NutNvMemLoad(), provided in
dev/nvmem.c. Depending on the configuration in include/cfg/eeprom.h,
this routine may access the X12x6 EEPROM, an AT45DB or AT49BV flash
memory, the internal EEPROM on AVR CPUs or the internal flash on AT91
devices.

If no valid configuration for NVMEM is available, NutLoadConfig will
return an error, but still set an default hostname. NutNetLoadConfig
will also return with error, but still set the MAC address to all bits
set and all other items cleared to zero.

The problem is, that the returned error will let higher level routines
fail (e.g. DHCP).

In your special case I'd suggest to configure NUT_CONFIG_AT45D (new SPI
bus interface) or NUT_CONFIG_AT45DB (old with integrated SPI routines.
For the latter you may then even implement your own At45dbParamRead() to
override default linking to dev/at45db.c.

Harald





More information about the En-Nut-Discussion mailing list