This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Making support for different flash sizes.
- From: Bart Veer <bartv at ecoscentric dot com>
- To: "Rene Nielsen" <rbn at vitesse dot com>
- Cc: ecos-discuss at sourceware dot org
- Date: Wed, 04 Mar 2009 11:33:57 +0000
- Subject: Re: [ECOS] Making support for different flash sizes.
- References: <376637F07F8A9242AD11921B15FA17DC8AF693@mx-dk.vsc.vitesse.com>
>>>>> "Rene" == Rene Nielsen <rbn@vitesse.com> writes:
Rene> Suppose you have created a HAL Variant named "abc". And
Rene> suppose that it supports a range of different 16 MByte flash
Rene> devices, and that these devices are specified in
Rene> .../devs/flash/<arch>/abc/current/cdl/flash_abc.cdl.
Rene> Now suppose that your sales organization says: Hey, please
Rene> squeeze your code into an 8 MByte flash device, so that we
Rene> can save some bucks.
Rene> For reasons other than the flash-size issue, I'd like to
Rene> create a new redboot_ROMRAM.cdl file for the board equipped
Rene> with the 8MByte flash. Let's call this
Rene> redboot_ROMRAM_8MB_flash.ecm and place it next to the
Rene> original redboot_ROMRAM.ecm file.
Rene> The original redboot_ROMRAM.ecm file contains a line like the following:
Rene> package -hardware CYGPKG_DEVS_FLASH_<ARCH>_ABC current ;
Rene> I would perfer *not* to list both the 8 and 16 MByte flash
Rene> devices in the same flash_abc.cdl file. So my question is:
Rene> Is it possible to create a new file next to flash_abc.cdl
Rene> called e.g. flash_abc_8mb_flash.cdl and point that out from
Rene> redboot_ROMRAM_8MB_flash.ecm, or will I have to create a
Rene> completely new /devs/flash/<arch>/abc_XXX branch? Or is
Rene> there a better way to handle this?
The preferred way these days is to use the V2 flash drivers, either
CYGPKG_DEVS_FLASH_AMD_AM29XXXXX_V2 or CYGPKG_DEVS_FLASH_STRATA_V2.
Both drivers support CFI initialization, so the driver will query the
flash chip at run-time to determine size and block layout. That is
much simpler than the old V1 flash way of supporting multiple devices.
Bart
--
Bart Veer eCos Configuration Architect
eCosCentric Limited The eCos experts http://www.ecoscentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
Besuchen Sie uns vom 3.-5.03.09 auf der Embedded World 2009, Stand 11-300
Visit us at Embedded World 2009, Nürnberg, Germany, 3-5 Mar, Stand 11-300
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss