This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
x86 and flash
- From: "=?utf-8?Q?davide=5Fciminaghi at libero dot it?=" <davide_ciminaghi at libero dot it>
- To: "=?utf-8?Q?ecos-list?=" <ecos-discuss at sources dot redhat dot com>
- Date: Mon, 8 Apr 2002 11:31:11 +0200
- Subject: [ECOS] x86 and flash
Hi,
as I told the list some months ago, I'm working with a board based on
the AMD elan sc300 microcontroller (it's an old embedded 386).
I'm trying to get ecos to work on that board. I've got no floppy
interface, and unfortunately no bios at all. Nothing.
I just have two flash chips:
- 1 AMD29F010 => this is for redboot (ROM startup, of course).
- 1 AMD29F016D => this is a 2MB additional flash chip, which should
host the redboot flash filesystem.
I also have a 91C96 ethernet controller, but decided to get the serial
port to work first.
Current status is:
- redboot (compiled for ROM startup) seems to work via the serial port
at 38400baud. I can also download the ecos test programs to RAM and
run/debug them. Of course I just tried 2 or 3 programs, so I'm not
sure that everything works properly.
- I'm now trying to add flash support: I added the 29F016D chip to the
AM29XXXXX family (file am29xxxxx_parts.inl) and told the driver that my
board has just one AM29f016d mapped at address 0xe00000. To do this I
just added a .c file under
ecos/packages/devs/flash/i386/sc300/current/src (sc300 being a platform
under the i386 hal) containing
the following definitions:
#define CYGNUM_FLASH_INTERLEAVE (1)
#define CYGNUM_FLASH_SERIES (1)
#define CYGNUM_FLASH_WIDTH (8)
#define CYGNUM_FLASH_BASE (0xe00000)
#define CYGHWR_DEVS_FLASH_AMD_AM29F016D 1
I also did the changes needed in the .cdl, .db, ... files.
Everything compiles, but I have some runtime problems:
1) At boot, the driver tells me that the device is unknown. If I have
well understood, this means that the flash_query() function returns an
unexpected id. Just for debugging purposes, I've temporarily disabled
the startup check and now the monitor boots with no error (of course).
Anyway, the flash chip autoselect procedure doesn't seem to work.
2) If I try erasing the flash chip I have a mix of timeout errors
and "write-protected region/device" errors.
3) Nevertheless, when I dump the memory area corresponding to the flash
chip I can see some meaningful ASCII strings which were probably
written during the board's factory test. Since those strings do NOT
come from redboot (there's a reference to the "Tornado TNT" OS) I'm
almost sure that I'm able to read at least a part of the flash chip.
As a conclusion: I can read the flash, but cannot write it (as a matter
of fact the autoselect procedure includes some write cycles !).
Any ideas / suggestions on what to do ?
Thanks and regards
Davide Ciminaghi