[ECOS] FW: Adding flash device using the flash v2 drivers

Andrew Lunn andrew@lunn.ch
Fri Dec 19 15:10:00 GMT 2008


On Fri, Dec 19, 2008 at 02:33:49PM +0100, Alex Lindeijer wrote:
> 
> Hi
> We have a controller card with a MPC8541 on it and a spansion S29GL512
> flash. We used the Python eval board from A&M to start the ecos based
> development. The ecos supplied was base don the legacy v1 flash drivers.
> We are experiencing some verification problems on certain higher
> addresses when accessing it from our application but everything is OK
> when writing to flash from Redboot.

I would check your memory controller configuration. Maybe it is not
driving the top address line, so it is left floating. Just an idea.

> Therefore I wanted to tryt he v2 flasher driver to see whether that
> makes a difference.. It seems I have (almost) everything in place but
> get at startup
> 
> ASSERT FAIL: <4>flash.c[231]cyg_flash_init() incorrect number of flash
> devices
> 
> Question is now: how do I add the flash device to the cyg_flashdevtab? I
> suppose I have to do this in the board specific python.c under
> devs/flash/....
> 
> When adding an extra ethernet port it was quit clear how to add it to
> the netdevtab using the NETDEVTAB_ENTRY macro. Is there something
> similar for adding a flash device?

Yes, CYG_FLASH_DRIVER(). The am29xxxxxv2 has good documentation. Take
a look at that as an example.
 
> And: can I run flash v2 in my applicattion and the legacy in my
> redboot(ROMRAM)?

Yes, that will work.

     Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list