This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Flash device interface


Roland CaÃebohm wrote:

>Hi again,
>
>I'm just trying to use the flash device interface (/dev/flash1) 
>for accessing flash, but if I write to flash with write() I get
>an "I/O error".
>
>The problem seems to be, that flashiodev_bwrite() does not erase
>the region before programming it. I also think about a possibility
>to write regions, which are not block aligned.
>
>Maybe the function calls flash_erase() and flash_program() block
>by block and for the first and the last block which are not block
>aligned, it first makes a copy of the current flash content,
>replaces the to be written data in this copy and programs the copy
>back.
>
>I also want to use flash_read() instead of directly read the flash.
>Then it should work with flashes with indirect access too.
>
> Any suggestions?

Hi,

you can take a look at the work I've done on FAT fs. It includes
a block cache and access library and a simple disk drivers framework.
It was written to support CF cards, but the block access is pretty generic.

savin


____________________
http://www.email.si/

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]