Hi Charles,
Point mentioned in Suggestion 1 is the root cause.
Thanks a ton for help.
Regards,
Saquib
On Mon, Jun 21, 2010 at 9:16 AM, Charles Manning <
manningc2@actrix.gen.nz>wrote:
> On Monday 21 June 2010 13:30:34 Saquib wrote:
> > Hi All,
> >
> > Thanks a lot.
> >
> > With the below code I am able to read only 112KB of data. "while" loop
> > executes only for 28 times. I tried to debug the yaffs_read function, for
> > successful iteration obj->variantType is YAFFS_OBJECT_TYPE_FILE, but it
> is
> > coming out from while loop when obj->variantType resets to 0x3C038832.
>
> This makes no sense to me. An object's file type should not change during a
> read (well it should not change at all unless you delete the object).
>
> Two suggestions:
> 1) Check that the read is not corrupting the stack or heap. If you read
> into
> the same area that the stack or heap is located you will get problems like
> this.
>
> 2) Try recompiling everything. Stale object files could be using the wrong
> object layouts.
>
>
> >
> > I am not able to find the root cause. Please help to fix this issue.
> >
> > Thanks in advance.
> >
> > Regards,
> > Saquib
> >
> > On Thu, Jun 17, 2010 at 7:59 AM, Charles Manning
> <manningc2@actrix.gen.nz>wrote:
> > > On Thursday 17 June 2010 14:17:14 Saquib wrote:
> > > > Hi All,
> > > >
> > > > Thanks for your support and coperation.
> > > >
> > > > I am able to read files using YAFFS Direct interface.
> > > >
> > > > Now I want to copy a binary file e.g. XYZ into RAM's specified
> address.
> > > >
> > > > How can I get the start address of file XYZ on NAND flash with
> > > > file-size (EOF)?
> > >
> > > YAFFS is a file system so you need to do this using file system calls.
> > > You cannot do a binary copy fromflash.
> > >
> > > You need to do something like this:
> > >
> > > unsigned char *buffer;
> > >
> > > int load_handle = yaffs_open("filename",O_RDONLY,0);
> > > buffer = (unsigned char *) load_address;
> > >
> > > while ((nread = yaffs_read(load_handle,buffer,4096)) > 0)
> > > buffer += nread;
> > >
> > > yaffs_close(load_handle);
> > >
> > > > Thanks in advance.
> > > >
> > > > Regards,
> > > > Saquib
> > > >
> > > > On Mon, Jun 14, 2010 at 2:59 AM, Charles Manning
> > >
> > > <manningc2@actrix.gen.nz>wrote:
> > > > > On Friday 11 June 2010 00:27:31 Saquib wrote:
> > > > > > Hi All,
> > > > > >
> > > > > > Thanks for your continued support and cooperation.
> > > > > >
> > > > > > I am using 1GB NAND Flash. From Linux, I created four partitions
> of
> > > > > > 256MB each and mounted YAFFS2 on four directories /mnt1, /mnt2,
> > > > > > /mnt3 and /mnt4 respectively.
> > > > > > *
> > > > > > /mnt4 folder may contain some executable images.* *From
> boot-loader
> > > > > > I
> > > > >
> > > > > have
> > > > >
> > > > > > to run this executable image.*
> > > > > >
> > > > > > My queries are :
> > > > > >
> > > > > > (1) Using YAFFS2 Direct Interface can it be achieved?
> > > > >
> > > > > Yes you can write files in YDI and read it in Linux, or vice versa.
> > > > >
> > > > > > (2) Can I create partition from YDI?
> > > > >
> > > > > Yes.
> > > > >
> > > > > > (3) Partition sizes should be same as Linux?
> > > > >
> > > > > Yes.
> > > > >
> > > > > > (4) If yes, how can I access same file which was saved from
> Linux?
> > > > >
> > > > > Have you read the information on YAFfS Direct?
> > > > >
> > > > > http://yaffs.net/yaffs-direct-user-guide
> > > > >
> > > > > -- Charles
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > yaffs mailing list
> > > > > yaffs@lists.aleph1.co.uk
> > > > > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
> > >
> > > _______________________________________________
> > > yaffs mailing list
> > > yaffs@lists.aleph1.co.uk
> > > http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>
>
>