* [ECOS] Size of eCos @ 2009-01-16 14:50 Himanshu Patel 2009-01-20 14:08 ` [ECOS] FAT32 over NAND Himanshu Patel 0 siblings, 1 reply; 22+ messages in thread From: Himanshu Patel @ 2009-01-16 14:50 UTC (permalink / raw) To: eCos Discuss Hi, What is the minimum memory requirement (code and data) for eCos kernel? Regards, Himanshu Patel -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* [ECOS] FAT32 over NAND 2009-01-16 14:50 [ECOS] Size of eCos Himanshu Patel @ 2009-01-20 14:08 ` Himanshu Patel 2009-01-20 14:31 ` Andrew Lunn 0 siblings, 1 reply; 22+ messages in thread From: Himanshu Patel @ 2009-01-20 14:08 UTC (permalink / raw) To: 'eCos Discuss' Hi, We want to have FAT32 file system over NAND flash. Is it possible? What approach should we take for developing the same? Regards, Himanshu Patel -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ECOS] FAT32 over NAND 2009-01-20 14:08 ` [ECOS] FAT32 over NAND Himanshu Patel @ 2009-01-20 14:31 ` Andrew Lunn 2009-01-20 14:40 ` Himanshu Patel 2009-01-20 14:42 ` Rutger Hofman 0 siblings, 2 replies; 22+ messages in thread From: Andrew Lunn @ 2009-01-20 14:31 UTC (permalink / raw) To: Himanshu Patel; +Cc: 'eCos Discuss' On Tue, Jan 20, 2009 at 07:38:02PM +0530, Himanshu Patel wrote: > Hi, > > We want to have FAT32 file system over NAND flash. Is it possible? What > approach should we take for developing the same? If you look back in the archive, last year there was some work to get YAFFS on NAND working. I would suggest trying to build on the NAND infrastructure that provided. 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [ECOS] FAT32 over NAND 2009-01-20 14:31 ` Andrew Lunn @ 2009-01-20 14:40 ` Himanshu Patel 2009-01-20 14:42 ` Rutger Hofman 1 sibling, 0 replies; 22+ messages in thread From: Himanshu Patel @ 2009-01-20 14:40 UTC (permalink / raw) To: 'Andrew Lunn', 'eCos Discuss' Okay...Will look into the same... Another question...We will need to provide Flash Translation Layer. Do we need to port the same from Linux or use them from JFFS2 or YAFFS? Regards, Himanshu Patel -----Original Message----- From: Andrew Lunn [mailto:andrew@lunn.ch] Sent: Tuesday, January 20, 2009 8:01 PM To: Himanshu Patel Cc: 'eCos Discuss' Subject: Re: [ECOS] FAT32 over NAND On Tue, Jan 20, 2009 at 07:38:02PM +0530, Himanshu Patel wrote: > Hi, > > We want to have FAT32 file system over NAND flash. Is it possible? What > approach should we take for developing the same? If you look back in the archive, last year there was some work to get YAFFS on NAND working. I would suggest trying to build on the NAND infrastructure that provided. 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ECOS] FAT32 over NAND 2009-01-20 14:31 ` Andrew Lunn 2009-01-20 14:40 ` Himanshu Patel @ 2009-01-20 14:42 ` Rutger Hofman 2009-01-20 15:11 ` Himanshu Patel 2009-01-20 15:14 ` Himanshu Patel 1 sibling, 2 replies; 22+ messages in thread From: Rutger Hofman @ 2009-01-20 14:42 UTC (permalink / raw) To: Himanshu Patel, 'eCos Discuss' Andrew Lunn wrote: > On Tue, Jan 20, 2009 at 07:38:02PM +0530, Himanshu Patel wrote: >> Hi, >> >> We want to have FAT32 file system over NAND flash. Is it possible? What >> approach should we take for developing the same? > > If you look back in the archive, last year there was some work to get > YAFFS on NAND working. I would suggest trying to build on the NAND > infrastructure that provided. I implemented basic NAND flash functionality and a wrapper layer for YAFFS2, a file system designed specifically for NAND flash. For an alpha release (and maybe later on, beta release) of my code, see: http://www.cs.vu.nl/~rutger/software/ecos/nand-flash/ If you want FAT32, you will have to create (port from elsewhere?) a FTL (Flash Translation Layer) that implements lots of stuff to make FAT32 behave in a NAND-compatible way. For a discussion of this in the context of UBIFS (the latest-greatest Linux NAND flash file system), see: http://www.linux-mtd.infradead.org/doc/ubifs.html#L_raw_vs_ftl An FTL should minimally provide: - wear levelling - garbage collection for released blocks - bad block management - write caching because programming has to be consecutive and in at most a few operations. YAFFS2 implements all this already. Is using YAFFS2 an option, maybe? Rutger Hofman VU Amsterdam -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [ECOS] FAT32 over NAND 2009-01-20 14:42 ` Rutger Hofman @ 2009-01-20 15:11 ` Himanshu Patel 2009-01-20 15:15 ` Andrew Lunn 2009-01-20 15:14 ` Himanshu Patel 1 sibling, 1 reply; 22+ messages in thread From: Himanshu Patel @ 2009-01-20 15:11 UTC (permalink / raw) To: 'Rutger Hofman', 'eCos Discuss' Okay...Thanks... YAFFS2 is not a possible option...As device should be able to access from PC running Windows also through mass storage interface... Can we make use of NFTL (NAND flash translation layer) which Linux is providing? Regards, Himanshu Patel -----Original Message----- From: Rutger Hofman [mailto:rutger@cs.vu.nl] Sent: Tuesday, January 20, 2009 8:15 PM To: Himanshu Patel; 'eCos Discuss' Subject: Re: [ECOS] FAT32 over NAND Andrew Lunn wrote: > On Tue, Jan 20, 2009 at 07:38:02PM +0530, Himanshu Patel wrote: >> Hi, >> >> We want to have FAT32 file system over NAND flash. Is it possible? What >> approach should we take for developing the same? > > If you look back in the archive, last year there was some work to get > YAFFS on NAND working. I would suggest trying to build on the NAND > infrastructure that provided. I implemented basic NAND flash functionality and a wrapper layer for YAFFS2, a file system designed specifically for NAND flash. For an alpha release (and maybe later on, beta release) of my code, see: http://www.cs.vu.nl/~rutger/software/ecos/nand-flash/ If you want FAT32, you will have to create (port from elsewhere?) a FTL (Flash Translation Layer) that implements lots of stuff to make FAT32 behave in a NAND-compatible way. For a discussion of this in the context of UBIFS (the latest-greatest Linux NAND flash file system), see: http://www.linux-mtd.infradead.org/doc/ubifs.html#L_raw_vs_ftl An FTL should minimally provide: - wear levelling - garbage collection for released blocks - bad block management - write caching because programming has to be consecutive and in at most a few operations. YAFFS2 implements all this already. Is using YAFFS2 an option, maybe? Rutger Hofman VU Amsterdam -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ECOS] FAT32 over NAND 2009-01-20 15:11 ` Himanshu Patel @ 2009-01-20 15:15 ` Andrew Lunn 2009-01-20 15:17 ` Himanshu Patel 2009-01-20 18:42 ` Jonathan Larmour 0 siblings, 2 replies; 22+ messages in thread From: Andrew Lunn @ 2009-01-20 15:15 UTC (permalink / raw) To: Himanshu Patel; +Cc: 'Rutger Hofman', 'eCos Discuss' On Tue, Jan 20, 2009 at 08:41:35PM +0530, Himanshu Patel wrote: > Okay...Thanks... > > YAFFS2 is not a possible option...As device should be able to access from PC > running Windows also through mass storage interface... > > Can we make use of NFTL (NAND flash translation layer) which Linux is > providing? Depends on what license you want to use. If you are happy that your entire system, is GPL, yes. However most people want to keep there application closed, in which case you cannot use Linux kernel code. 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [ECOS] FAT32 over NAND 2009-01-20 15:15 ` Andrew Lunn @ 2009-01-20 15:17 ` Himanshu Patel 2009-01-20 18:42 ` Jonathan Larmour 1 sibling, 0 replies; 22+ messages in thread From: Himanshu Patel @ 2009-01-20 15:17 UTC (permalink / raw) To: 'Andrew Lunn'; +Cc: 'Rutger Hofman', 'eCos Discuss' Okay...However can you please confirm that it provides all functionality like wear leveling, garbage collection etc...? -----Original Message----- From: Andrew Lunn [mailto:andrew@lunn.ch] Sent: Tuesday, January 20, 2009 8:45 PM To: Himanshu Patel Cc: 'Rutger Hofman'; 'eCos Discuss' Subject: Re: [ECOS] FAT32 over NAND On Tue, Jan 20, 2009 at 08:41:35PM +0530, Himanshu Patel wrote: > Okay...Thanks... > > YAFFS2 is not a possible option...As device should be able to access from PC > running Windows also through mass storage interface... > > Can we make use of NFTL (NAND flash translation layer) which Linux is > providing? Depends on what license you want to use. If you are happy that your entire system, is GPL, yes. However most people want to keep there application closed, in which case you cannot use Linux kernel code. 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ECOS] FAT32 over NAND 2009-01-20 15:15 ` Andrew Lunn 2009-01-20 15:17 ` Himanshu Patel @ 2009-01-20 18:42 ` Jonathan Larmour 2009-01-20 19:09 ` Paul D. DeRocco 1 sibling, 1 reply; 22+ messages in thread From: Jonathan Larmour @ 2009-01-20 18:42 UTC (permalink / raw) To: Himanshu Patel, 'Rutger Hofman', 'eCos Discuss' Andrew Lunn wrote: > On Tue, Jan 20, 2009 at 08:41:35PM +0530, Himanshu Patel wrote: >> Okay...Thanks... >> >> YAFFS2 is not a possible option...As device should be able to access from PC >> running Windows also through mass storage interface... >> >> Can we make use of NFTL (NAND flash translation layer) which Linux is >> providing? > > Depends on what license you want to use. If you are happy that your > entire system, is GPL, yes. However most people want to keep there > application closed, in which case you cannot use Linux kernel code. There are also patent issues. FTLs are covered by patents by M-Systems, Inc. in the US and Europe at least. You cannot develop or sell a product containing an FTL in those markets without getting a licence from M-Systems (unless it's used in a PCMCIA device, for which M-Systems grants a no-royalty licence). See the bottomr of http://sources.redhat.com/jffs2/jffs2-html/node1.html Because of this, I doubt eCos will ever have an FTL. Jifl -- eCosCentric Limited http://www.eCosCentric.com/ The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071. ------["Si fractum non sit, noli id reficere"]------ Opinions==mine -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [ECOS] FAT32 over NAND 2009-01-20 18:42 ` Jonathan Larmour @ 2009-01-20 19:09 ` Paul D. DeRocco 2009-01-21 2:18 ` Jonathan Larmour 0 siblings, 1 reply; 22+ messages in thread From: Paul D. DeRocco @ 2009-01-20 19:09 UTC (permalink / raw) To: eCos Discuss > From: Jonathan Larmour > > There are also patent issues. FTLs are covered by patents by M-Systems, > Inc. in the US and Europe at least. You cannot develop or sell a product > containing an FTL in those markets without getting a licence from > M-Systems > (unless it's used in a PCMCIA device, for which M-Systems grants a > no-royalty licence). The SmartMedia specification, originally from May 1999, establishes a standard for reading and writing SmartMedia cards, which are just single NAND flash chips in a pluggable package, and it describes how a FAT16 file system must map to the flash chip, by aligning the cluster boundaries to the erasable block boundaries. There is no support for wear leveling beyond what can be done while the power is turned on (i.e., maintaining a rover for allocating the next block), and FAT16 is limited to 64K clusters which makes it appropriate only for smaller sizes. Does the M-Systems patent cover any translation layer one might write for a SmartMedia card? -- Ciao, Paul D. DeRocco Paul mailto:pderocco@ix.netcom.com -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ECOS] FAT32 over NAND 2009-01-20 19:09 ` Paul D. DeRocco @ 2009-01-21 2:18 ` Jonathan Larmour 2009-01-21 4:26 ` Paul D. DeRocco 0 siblings, 1 reply; 22+ messages in thread From: Jonathan Larmour @ 2009-01-21 2:18 UTC (permalink / raw) To: Paul D. DeRocco; +Cc: eCos Discuss Paul D. DeRocco wrote: >>From: Jonathan Larmour >> >>There are also patent issues. FTLs are covered by patents by M-Systems, >>Inc. in the US and Europe at least. You cannot develop or sell a product >>containing an FTL in those markets without getting a licence from >>M-Systems >>(unless it's used in a PCMCIA device, for which M-Systems grants a >>no-royalty licence). > > > The SmartMedia specification, originally from May 1999, establishes a > standard for reading and writing SmartMedia cards, which are just single > NAND flash chips in a pluggable package, and it describes how a FAT16 file > system must map to the flash chip, by aligning the cluster boundaries to the > erasable block boundaries. There is no support for wear leveling beyond what > can be done while the power is turned on (i.e., maintaining a rover for > allocating the next block), and FAT16 is limited to 64K clusters which makes > it appropriate only for smaller sizes. Does the M-Systems patent cover any > translation layer one might write for a SmartMedia card? That implementation doesn't sound like an FTL, but then without things like wear-levelling or dealing with the inevitable bad blocks, it doesn't sound terribly useful either! I doubt that that conflicts with the patent. You could write a (non-standard) FTL that worked on top of it of course, but that's presumably not what you're talking about. Jifl -- eCosCentric Limited http://www.eCosCentric.com/ The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071. ------["The best things in life aren't things."]------ Opinions==mine -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [ECOS] FAT32 over NAND 2009-01-21 2:18 ` Jonathan Larmour @ 2009-01-21 4:26 ` Paul D. DeRocco 0 siblings, 0 replies; 22+ messages in thread From: Paul D. DeRocco @ 2009-01-21 4:26 UTC (permalink / raw) To: eCos Discuss > From: Jonathan Larmour > > That implementation doesn't sound like an FTL, but then without things > like wear-levelling or dealing with the inevitable bad blocks, it doesn't > sound terribly useful either! I doubt that that conflicts with > the patent. > You could write a (non-standard) FTL that worked on top of it of course, > but that's presumably not what you're talking about. It is an FTL, if I understand the term correctly. To the higher levels, the device looks like a regular disk capable of supporting a FAT16 file system, the only restriction being that the "disk" has to be formatted so that the cluster size matches the erasable block size, and their boundaries have to line up. Underneath, it uses a RAM-based lookup table to map clusters to blocks, but since FAT16 can't have any more than 64K clusters, the table can never exceed 128KBytes. The mapping info is stored in the extra 16 bytes that accompany every 512 byte page or "sector", along with a Hamming code that can correct any single-bit error and detect most higher errors. It deals with bad blocks by only allocating 1000 out of every 1024 blocks, leaving the remaining 24 as spares, and it has a way of marking blocks free (unused), dirty (needs erasure), bad (never to be used again), or allocated to a particular location. If the software always searches for a free block just past the last block that it found, then wear tends to be leveled statistically, as long as the power stays on, but there is no usage count recorded in the flash that forces precise leveling. But nowadays, flash memories are so damn good that such a system works just fine for any but the busiest applications. For instance, in a camera, it's doubtful that any particular block will get erased and rewritten 100,000 times. The SmartMedia spec was developed and owned by Toshiba, and launched in 1995 according to Wikipedia. It's now completely obsolete, but since it consisted of a single NAND flash chip with no controller, the software needed to talk to a SmartMedia card is still useful if you want to solder a single NAND flash chip to a board, and run a FAT16 file system on it. It's possible that SmartMedia does use M-Systems' patent, and that Toshiba licensed it, because in order to obtain the SmartMedia spec, you had to buy it, and I recall it wasn't particularly cheap. But if that's true, then merely knowing how to write the necessary translation layer (which I know because I wrote one years ago for a company that bought the spec) wouldn't give you the right to put it into a product. That's what I'm curious about. -- Ciao, Paul D. DeRocco Paul mailto:pderocco@ix.netcom.com -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [ECOS] FAT32 over NAND 2009-01-20 14:42 ` Rutger Hofman 2009-01-20 15:11 ` Himanshu Patel @ 2009-01-20 15:14 ` Himanshu Patel 2009-01-20 15:40 ` Rutger Hofman 1 sibling, 1 reply; 22+ messages in thread From: Himanshu Patel @ 2009-01-20 15:14 UTC (permalink / raw) To: 'Rutger Hofman', 'eCos Discuss' Okay...Thanks... YAFFS2 is not a possible option...As device should also be able to access on Windows PC using mass storage interface... Can we use NFTL (NAND flash translation layer) support provided by Linux? Regards, Himanshu Patel -----Original Message----- From: Rutger Hofman [mailto:rutger@cs.vu.nl] Sent: Tuesday, January 20, 2009 8:15 PM To: Himanshu Patel; 'eCos Discuss' Subject: Re: [ECOS] FAT32 over NAND Andrew Lunn wrote: > On Tue, Jan 20, 2009 at 07:38:02PM +0530, Himanshu Patel wrote: >> Hi, >> >> We want to have FAT32 file system over NAND flash. Is it possible? What >> approach should we take for developing the same? > > If you look back in the archive, last year there was some work to get > YAFFS on NAND working. I would suggest trying to build on the NAND > infrastructure that provided. I implemented basic NAND flash functionality and a wrapper layer for YAFFS2, a file system designed specifically for NAND flash. For an alpha release (and maybe later on, beta release) of my code, see: http://www.cs.vu.nl/~rutger/software/ecos/nand-flash/ If you want FAT32, you will have to create (port from elsewhere?) a FTL (Flash Translation Layer) that implements lots of stuff to make FAT32 behave in a NAND-compatible way. For a discussion of this in the context of UBIFS (the latest-greatest Linux NAND flash file system), see: http://www.linux-mtd.infradead.org/doc/ubifs.html#L_raw_vs_ftl An FTL should minimally provide: - wear levelling - garbage collection for released blocks - bad block management - write caching because programming has to be consecutive and in at most a few operations. YAFFS2 implements all this already. Is using YAFFS2 an option, maybe? Rutger Hofman VU Amsterdam -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ECOS] FAT32 over NAND 2009-01-20 15:14 ` Himanshu Patel @ 2009-01-20 15:40 ` Rutger Hofman 2009-01-20 16:30 ` Chris Zimman 2009-01-21 13:59 ` Rutger Hofman 0 siblings, 2 replies; 22+ messages in thread From: Rutger Hofman @ 2009-01-20 15:40 UTC (permalink / raw) To: Himanshu Patel; +Cc: 'eCos Discuss' Himanshu Patel wrote: > Okay...Thanks... > > YAFFS2 is not a possible option...As device should also be able to access on > Windows PC using mass storage interface... Is this a NAND memory smart-card (MMC, SD, USB flash drive or whatever)? These usually come with an FTL on-board, which offers a file system like FAT32. You need no Flash code for that. Is this a raw flash? So, how is it going to be accessed from Windows if the file system is completely in software? > Can we use NFTL (NAND flash translation layer) support provided by Linux? I am no Linux expert, but my feeling is that NFTL is very old, and that flash handling is done through UBI/UBIFS. The UBIFS link in my message below seems rather informative. Rutger > Regards, > > Himanshu Patel > > -----Original Message----- > From: Rutger Hofman [mailto:rutger@cs.vu.nl] > Sent: Tuesday, January 20, 2009 8:15 PM > To: Himanshu Patel; 'eCos Discuss' > Subject: Re: [ECOS] FAT32 over NAND > > Andrew Lunn wrote: >> On Tue, Jan 20, 2009 at 07:38:02PM +0530, Himanshu Patel wrote: >>> Hi, >>> >>> We want to have FAT32 file system over NAND flash. Is it possible? What >>> approach should we take for developing the same? >> If you look back in the archive, last year there was some work to get >> YAFFS on NAND working. I would suggest trying to build on the NAND >> infrastructure that provided. > > I implemented basic NAND flash functionality and a wrapper layer for > YAFFS2, a file system designed specifically for NAND flash. For an alpha > release (and maybe later on, beta release) of my code, see: > http://www.cs.vu.nl/~rutger/software/ecos/nand-flash/ > > If you want FAT32, you will have to create (port from elsewhere?) a FTL > (Flash Translation Layer) that implements lots of stuff to make FAT32 > behave in a NAND-compatible way. For a discussion of this in the context > of UBIFS (the latest-greatest Linux NAND flash file system), see: > > http://www.linux-mtd.infradead.org/doc/ubifs.html#L_raw_vs_ftl > > An FTL should minimally provide: > - wear levelling > - garbage collection for released blocks > - bad block management > - write caching because programming has to be consecutive and in at most > a few operations. > > YAFFS2 implements all this already. Is using YAFFS2 an option, maybe? > > Rutger Hofman > VU Amsterdam > > > > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [ECOS] FAT32 over NAND 2009-01-20 15:40 ` Rutger Hofman @ 2009-01-20 16:30 ` Chris Zimman 2009-01-21 13:59 ` Rutger Hofman 1 sibling, 0 replies; 22+ messages in thread From: Chris Zimman @ 2009-01-20 16:30 UTC (permalink / raw) To: Himanshu Patel; +Cc: eCos Discuss, Rutger Hofman > > YAFFS2 is not a possible option...As device should also be able to > > access on Windows PC using mass storage interface... You could build a FAT emulation layer in memory and map the calls through to YAFFS2, but that's a non-trivial task. > Is this a raw flash? So, how is it going to be accessed from Windows if > the file system is completely in software? Windows basically wants to treat NAND (eg. SD) just like any other disk and wants to deal with it as sectors. There's a minimal amount of glue necessary between the given SD interface and eCos's disk layer. Then you just have to [have/get/write] a USB mass storage endpoint driver. Where you're going to run into trouble is if you have the device accessing the file system at the same time that the PC (eg. Windows) is trying to. The FAT tables are cached on Windows, and if you go change them from the device side underneath Windows (eg. eCos app modifies file system while it's mounted on Windows), you are heading for disaster. The reason I raise this issue is because you mentioned wanting both your device and Windows to be able to see the same file system. --Chris -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ECOS] FAT32 over NAND 2009-01-20 15:40 ` Rutger Hofman 2009-01-20 16:30 ` Chris Zimman @ 2009-01-21 13:59 ` Rutger Hofman 2009-01-21 14:08 ` Himanshu Patel ` (2 more replies) 1 sibling, 3 replies; 22+ messages in thread From: Rutger Hofman @ 2009-01-21 13:59 UTC (permalink / raw) To: Himanshu Patel; +Cc: 'eCos Discuss' Sorry to prod, but to answer you appropriately it would be helpful if you answer the question below: Rutger Hofman wrote: > Is this a NAND memory smart-card (MMC, SD, USB flash drive or whatever)? > These usually come with an FTL on-board, which offers a file system like > FAT32. You need no Flash code for that. > > Is this a raw flash? So, how is it going to be accessed from Windows if > the file system is completely in software? Can you please explain the type of NAND flash you want to use? Is this raw flash chips? Or is this a NAND memory 'card' of some type like listed above? Rutger -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [ECOS] FAT32 over NAND 2009-01-21 13:59 ` Rutger Hofman @ 2009-01-21 14:08 ` Himanshu Patel 2009-01-21 20:18 ` Rutger Hofman 2009-01-21 14:12 ` Himanshu Patel 2009-01-21 14:14 ` Himanshu Patel 2 siblings, 1 reply; 22+ messages in thread From: Himanshu Patel @ 2009-01-21 14:08 UTC (permalink / raw) To: 'Rutger Hofman'; +Cc: 'eCos Discuss' Hi, This will be raw NAND flash. There are two ways we want to access file system written on NAND flash: 1 Through PC PC will make use of the file system using mass storage driver. 2 Through device itself Device (uC) should be able to access read/write files from NAND flash. Hope I have given the answers you are looking at. If not please free to ask. Regards, Himanshu Patel -----Original Message----- From: Rutger Hofman [mailto:rutger@cs.vu.nl] Sent: Wednesday, January 21, 2009 7:33 PM To: Himanshu Patel Cc: 'eCos Discuss' Subject: Re: [ECOS] FAT32 over NAND Sorry to prod, but to answer you appropriately it would be helpful if you answer the question below: Rutger Hofman wrote: > Is this a NAND memory smart-card (MMC, SD, USB flash drive or whatever)? > These usually come with an FTL on-board, which offers a file system like > FAT32. You need no Flash code for that. > > Is this a raw flash? So, how is it going to be accessed from Windows if > the file system is completely in software? Can you please explain the type of NAND flash you want to use? Is this raw flash chips? Or is this a NAND memory 'card' of some type like listed above? Rutger -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ECOS] FAT32 over NAND 2009-01-21 14:08 ` Himanshu Patel @ 2009-01-21 20:18 ` Rutger Hofman 2009-01-21 20:54 ` Paul D. DeRocco 0 siblings, 1 reply; 22+ messages in thread From: Rutger Hofman @ 2009-01-21 20:18 UTC (permalink / raw) To: Himanshu Patel; +Cc: 'eCos Discuss' Hmmm. I am not familiar with 'mass storage driver'. I assume that it is a generic Windows thingy for block devices -- I know nothing about Windows? Or do you mean USB? If you do not mean USB, how is Windows going to access the device? Through some network? a bus? some other means? If it goes through USB, I guess you need the uC to intermediate between USB and the Flash chips. In that case, there are possibilities besides FAT32. Rutger Himanshu Patel wrote: > Hi, > > This will be raw NAND flash. > > There are two ways we want to access file system written on NAND flash: > 1 Through PC > PC will make use of the file system using mass storage driver. > 2 Through device itself > Device (uC) should be able to access read/write files from NAND flash. > > Hope I have given the answers you are looking at. If not please free to ask. > > Regards, > > Himanshu Patel > > -----Original Message----- > From: Rutger Hofman [mailto:rutger@cs.vu.nl] > Sent: Wednesday, January 21, 2009 7:33 PM > To: Himanshu Patel > Cc: 'eCos Discuss' > Subject: Re: [ECOS] FAT32 over NAND > > Sorry to prod, but to answer you appropriately it would be helpful if > you answer the question below: > > Rutger Hofman wrote: >> Is this a NAND memory smart-card (MMC, SD, USB flash drive or whatever)? >> These usually come with an FTL on-board, which offers a file system like >> FAT32. You need no Flash code for that. >> >> Is this a raw flash? So, how is it going to be accessed from Windows if >> the file system is completely in software? > > Can you please explain the type of NAND flash you want to use? Is this > raw flash chips? Or is this a NAND memory 'card' of some type like > listed above? > > Rutger > > > > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [ECOS] FAT32 over NAND 2009-01-21 20:18 ` Rutger Hofman @ 2009-01-21 20:54 ` Paul D. DeRocco 0 siblings, 0 replies; 22+ messages in thread From: Paul D. DeRocco @ 2009-01-21 20:54 UTC (permalink / raw) To: eCos Discuss > From: Rutger Hofman > > Hmmm. I am not familiar with 'mass storage driver'. I assume that it is > a generic Windows thingy for block devices -- I know nothing about > Windows? Or do you mean USB? If you do not mean USB, how is Windows > going to access the device? Through some network? a bus? some other means? > > If it goes through USB, I guess you need the uC to intermediate between > USB and the Flash chips. In that case, there are possibilities besides > FAT32. Although Himanshu hasn't said so explicitly, I infer that they've got a board with a NAND flash soldered onto it, with an external interface like USB, as opposed to Ethernet. If the interface is USB, then FAT is the _only_ choice, because USB presents a block-oriented interface, not a file-oriented interface. And since any external device will be writing in the FAT file format, an FTL designed specifically for FAT is needed. If the design isn't cast in stone yet, one possibility is to put an SD controller on the board. This eliminates the need for an FTL, requiring only a minimal software interface between the external USB interface and the SD controller. For small quantities, one might even consider putting a complete SD socket and card on the board, even if it's not accessible outside the box, since they're pretty cheap. Then, in development, one can pull the card out and write to it on another machine, before the USB interface is even working. -- Ciao, Paul D. DeRocco Paul mailto:pderocco@ix.netcom.com -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [ECOS] FAT32 over NAND 2009-01-21 13:59 ` Rutger Hofman 2009-01-21 14:08 ` Himanshu Patel @ 2009-01-21 14:12 ` Himanshu Patel 2009-01-21 16:12 ` Chris Zimman 2009-01-21 14:14 ` Himanshu Patel 2 siblings, 1 reply; 22+ messages in thread From: Himanshu Patel @ 2009-01-21 14:12 UTC (permalink / raw) To: 'Rutger Hofman'; +Cc: 'eCos Discuss' Hi, This will be raw NAND flash. There are two ways we want to access file system written on NAND flash: 1 Through PC PC will make use of the file system using mass storage driver. 2 Through device itself Device (uC) should be able to access read/write files from NAND flash. Hope I have given the answers you are looking at. If not please free to ask. Regards, Himanshu Patel -----Original Message----- From: Rutger Hofman [mailto:rutger@cs.vu.nl] Sent: Wednesday, January 21, 2009 7:33 PM To: Himanshu Patel Cc: 'eCos Discuss' Subject: Re: [ECOS] FAT32 over NAND Sorry to prod, but to answer you appropriately it would be helpful if you answer the question below: Rutger Hofman wrote: > Is this a NAND memory smart-card (MMC, SD, USB flash drive or whatever)? > These usually come with an FTL on-board, which offers a file system like > FAT32. You need no Flash code for that. > > Is this a raw flash? So, how is it going to be accessed from Windows if > the file system is completely in software? Can you please explain the type of NAND flash you want to use? Is this raw flash chips? Or is this a NAND memory 'card' of some type like listed above? Rutger -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [ECOS] FAT32 over NAND 2009-01-21 14:12 ` Himanshu Patel @ 2009-01-21 16:12 ` Chris Zimman 0 siblings, 0 replies; 22+ messages in thread From: Chris Zimman @ 2009-01-21 16:12 UTC (permalink / raw) To: Himanshu Patel; +Cc: eCos Discuss > This will be raw NAND flash. > > There are two ways we want to access file system written on NAND flash: > 1 Through PC > PC will make use of the file system using mass storage driver. > 2 Through device itself > Device (uC) should be able to access read/write files from NAND > flash. > > Hope I have given the answers you are looking at. If not please free to > ask. As pointed out yesterday, if you try to treat this as a removable mass storage device you will need to make sure that these two things don't happen at the same time (eg. device *must* be unmounted from Windows -- or Linux or OSX or whatever) using FAT or you are going to end up in trouble. Even read-only from the device side won't always work reliably since PC operating systems generally cache access to the file system and do the writes batched. If you can assure that Windows (or whatever) and the uC never access the device at the same time (I don't mean protecting via a mutex or something like that), I mean the uC never accesses the file system while the device is connected to a PC) then you can probably get away with this. If not, the FAT32 solution is not going to work well. --Chris -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: [ECOS] FAT32 over NAND 2009-01-21 13:59 ` Rutger Hofman 2009-01-21 14:08 ` Himanshu Patel 2009-01-21 14:12 ` Himanshu Patel @ 2009-01-21 14:14 ` Himanshu Patel 2 siblings, 0 replies; 22+ messages in thread From: Himanshu Patel @ 2009-01-21 14:14 UTC (permalink / raw) To: Himanshu Patel, 'Rutger Hofman'; +Cc: 'eCos Discuss' Hi, This will be raw NAND flash. There are two ways we want to access file system written on NAND flash: 1 Through PC PC will make use of the file system using mass storage driver. 2 Through device itself Device (uC) should be able to access read/write files from NAND flash. Hope I have given the answers you are looking at. If not please free to ask. Regards, Himanshu Patel -----Original Message----- From: Rutger Hofman [mailto:rutger@cs.vu.nl] Sent: Wednesday, January 21, 2009 7:33 PM To: Himanshu Patel Cc: 'eCos Discuss' Subject: Re: [ECOS] FAT32 over NAND Sorry to prod, but to answer you appropriately it would be helpful if you answer the question below: Rutger Hofman wrote: > Is this a NAND memory smart-card (MMC, SD, USB flash drive or whatever)? > These usually come with an FTL on-board, which offers a file system like > FAT32. You need no Flash code for that. > > Is this a raw flash? So, how is it going to be accessed from Windows if > the file system is completely in software? Can you please explain the type of NAND flash you want to use? Is this raw flash chips? Or is this a NAND memory 'card' of some type like listed above? Rutger -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss ^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2009-01-21 20:54 UTC | newest] Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-01-16 14:50 [ECOS] Size of eCos Himanshu Patel 2009-01-20 14:08 ` [ECOS] FAT32 over NAND Himanshu Patel 2009-01-20 14:31 ` Andrew Lunn 2009-01-20 14:40 ` Himanshu Patel 2009-01-20 14:42 ` Rutger Hofman 2009-01-20 15:11 ` Himanshu Patel 2009-01-20 15:15 ` Andrew Lunn 2009-01-20 15:17 ` Himanshu Patel 2009-01-20 18:42 ` Jonathan Larmour 2009-01-20 19:09 ` Paul D. DeRocco 2009-01-21 2:18 ` Jonathan Larmour 2009-01-21 4:26 ` Paul D. DeRocco 2009-01-20 15:14 ` Himanshu Patel 2009-01-20 15:40 ` Rutger Hofman 2009-01-20 16:30 ` Chris Zimman 2009-01-21 13:59 ` Rutger Hofman 2009-01-21 14:08 ` Himanshu Patel 2009-01-21 20:18 ` Rutger Hofman 2009-01-21 20:54 ` Paul D. DeRocco 2009-01-21 14:12 ` Himanshu Patel 2009-01-21 16:12 ` Chris Zimman 2009-01-21 14:14 ` Himanshu Patel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).