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: Is there any RedBoot related setting needed for using JFFS2 to access Flash memory by ecos RAM application? Thanks a lot.


On Fri, May 23, 2003 at 12:03:08PM +0100, QiangHuang wrote:
> Hi all:
>    Can somebody kindly tell me is there any relation ship between the
> RedBoot and the JFFS2? I want to the ecos application to access the JFFS2,
> do I need to setup something by RedBoot(e.g. unlock, or init?) before the
> ecos application can use JFFS2? (The situation is: I want to build ecos RAM
> application and loaded by RedBoot, in ecos ram application I use JFFS2 to
> access the flash memory-store/read) Thanks a lot.

The only thing you need to do is make sure they don't both try to use
the same blocks.
 
> RedBoot> fis list
> Name              FLASH addr  Mem addr    Length      Entry point
> RedBoot           0x40000000  0x40000000  0x00020000  0x00000000
> RedBoot config    0x407E0000  0x407E0000  0x00001000  0x00000000
> FIS directory     0x407F0000  0x407F0000  0x00010000  0x00000000

> eCOS configuration setting is:
> FLASH device drivers --> Instantiate in I/O block device API --> Name of
> flash device 1 block device ("dev/flash1") --> Static configuration
> selected --> Start offset from flash base (0x00100000); Length (0x00100000).

so the jffs is at 0x40100000 to 0x40200000. So, you have no problem
here.

> But when I run the fileio1 test program I got the following errors:
> 
> 1. When the program runs to "mount()"
> <4>Write clean marker to block at 0x000e0000 failed: 1
> <4>Write clean marker to block at 0x000d0000 failed: 1
> <4>Write clean marker to block at 0x000c0000 failed: 1
> <4>Write clean marker to block at 0x000b0000 failed: 1

My guess is the blocks of flash are locked. I quickly looked to the
flash block device and it does nothing about unlocking them. You
probably want to write a little program that uses the flash function
flash_unloc() to unlock the blocks. Otherwise your jffs can only read
and not write.

    Andrew

-- 
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]