tffs514-vxworks-bin
所属分类:VxWorks
开发工具:Others
文件大小:3547KB
下载次数:40
上传日期:2008-09-24 09:30:32
上 传 者:
pongo
说明: 嵌入式VxWorks操作系统 电子盘(DOC)驱动源码
(VxWorks embedded operating system, the electronic disk (DOC) driver source code)
文件列表:
examples (0, 2003-08-03)
examples\drivers (0, 2003-08-03)
examples\drivers\include (0, 2003-08-03)
examples\drivers\include\bddefs.h (1481, 2002-05-14)
examples\drivers\include\diskonc.h (1485, 2002-05-14)
examples\drivers\include\fatfilt.h (1485, 2002-05-14)
examples\drivers\include\flsysfun.h (1489, 2002-05-14)
examples\drivers\include\inftl.h (1477, 2002-05-14)
examples\drivers\include\mdocplus.h (1489, 2002-05-14)
examples\drivers\include\mtdsa.h (1477, 2002-05-14)
examples\drivers\include\nanddefs.h (1489, 2002-05-14)
examples\drivers\include\nfdc2148.h (1489, 2002-05-14)
examples\drivers\include\nftllite.h (1489, 2002-05-14)
examples\drivers\include\protectp.h (1489, 2002-05-14)
examples\drivers\include\reedsol.h (1485, 2002-05-14)
examples\drivers\include\stdcomp.h (1485, 2002-05-14)
examples\drivers\include\_blkdev.h (1485, 2002-05-14)
examples\drivers\include\_doc2exb.h (1489, 2002-05-14)
examples\drivers\include\_docbdk.h (1485, 2002-05-14)
examples\drivers\include\_docsys.h (1485, 2002-05-14)
examples\drivers\include\_dosfrmt.h (1489, 2002-05-14)
examples\drivers\include\_flflash.h (1489, 2002-05-14)
examples\drivers\include\_flioctl.h (1489, 2002-05-14)
examples\drivers\include\_flreq.h (1481, 2002-05-14)
examples\drivers\include\_flsoc.h (1481, 2002-05-14)
examples\drivers\include\_fltl.h (1477, 2002-05-14)
examples\drivers\vxWorks (0, 2003-08-03)
examples\drivers\vxWorks\bin (0, 2003-08-03)
examples\drivers\vxWorks\bin\t20 (0, 2003-08-03)
examples\drivers\vxWorks\bin\t20\ppc (0, 2003-08-03)
examples\drivers\vxWorks\bin\t20\ppc\MSYSVXW-PPC403.o (237929, 2003-06-25)
examples\drivers\vxWorks\bin\t20\ppc\MSYSVXW-PPC601.o (228361, 2003-06-25)
examples\drivers\vxWorks\bin\t20\ppc\MSYSVXW-PPC603.o (238781, 2003-06-25)
examples\drivers\vxWorks\bin\t20\ppc\MSYSVXW-PPC604.o (238781, 2003-06-25)
examples\drivers\vxWorks\bin\t20\ppc\MSYSVXW-PPC860.o (237613, 2003-06-25)
examples\drivers\vxWorks\bin\t20\ppc\MSYSVXW-PPCEC603.o (238309, 2003-06-25)
examples\drivers\vxWorks\bin\t20\simNT (0, 2003-08-03)
examples\drivers\vxWorks\bin\t20\simNT\MSYSVXW-simNT.o (170736, 2003-06-25)
... ...
********************************************************************************
* *
* DiskOnChip(R) driver for VxWorks (R). *
* *
* Installation Guide. *
* *
* Version 5.1.4 from Aug 3,2003 *
* Based on M-Systems' TrueFFS version 5.1.4. *
* *
* Copyright M-Systems (c) 2003 *
* *
********************************************************************************
* *
* Tornado, VxWorks, VxSim, Wind River Systems, are registered trademarks or *
* service marks of Wind River Systems, Inc. This is the partial list. For a *
* complete list of Wind River trademarks and service marks, see the following *
* URL: *
* *
* http://www.windriver.com/corporate/html/trademark.html *
* *
* All the other trademarks mentioned herein are the property of their *
* respective owners. *
* *
********************************************************************************
* *
* This software should be used for DiskOnChip(R) devices only. *
* *
********************************************************************************
VERSION MARK
------------
Version 5.1.4 August 03, 2003
Version 5.1.2 August 01, 2002
Version 5.1.1 June 11, 2002
Version 5.1.0 May 14, 2002
Version 5.0.4 December 03, 2001
Version 5.0.3 September 27, 2001
Version 5.0.0 August 01, 2001
Version 4.2.2 February 20, 2001
Version 4.2.1 December 04, 2000
Version 4.2 September 15, 2000
Version 4.1 May 25, 2000
Version 1.21 July 26, 1999
GENERAL
--------
This package contains VxWorks device driver for M-Systems' DiskOnChip product
line. In the remainder of this Readme, term "DiskOnChip" is used to refer
to the functionality which is common to all members of DiskOnChip product
family.
Some referrals are made from this document to the DiskOnChip DOS utilities.
For detailed information on how to use these utilities, refer to
'DiskOnChip Utilities User Manual'. Updated manuals and documentation, can be
found on M-Systems web site (http://www.m-sys.com). For more information,
contact M-Systems via e-mail to info@m-sys.com, or by calling your
local M-Systems office (see Chapter 12 below).
NEW FEATURES IN VERSION 5.1.4
-----------------------------
Version 5.1.4 is the latest version of DiskOnChip driver for VxWorks. It
supports all members of M-Systems' DiskOnChip product family, namely:
- DiskOnChip Millennium Plus
- Mobile DiskOnChip Plus
- DiskOnChip Millennium
- DiskOnChip 2000 DIP/DIMM
DiskOnChip driver version 5.1.4 is fully compatible with dosFs-2 file system,
including support for multiple file system partitions, and all types of FAT
supported by dosFs-2.
Full list of new features in TrueFFS 5.1.4 can be found in the file
versions.txt included with TrueFFS SDK (located in the root directory).
DiskOnChip driver version 5.1.4 also includes support for VxWorks simulator
(also known as "VxSim"). In this case large buffer is allocated from VxSim's
free memory pool, and used to simulate DiskOnChip. The simulated "DiskOnChip"
(referred to in the rest of this manual as "simDoc") in most aspects behaves
exactly as the physical DiskOnChip would. This fact can be useful in situations
when board and/or BSP are not available yet, and software development can only
done by using VxWorks simulator.
CONTENTS
--------
1. Introduction
2. Installing DiskOnChip driver
3. Booting VxWorks from DiskOnChip
4. Formatting DiskOnChip from VxWorks application
5. Configuring driver for various types of hardware interfaces to
DiskOnChip.
6. Considerations related to unexpected power shutdowns
7. Considerations related to I/O determinism
8. Driver's runtime configuration options
9. Access to advanced features of DiskOnChip
10. Known problems
11. known limitations
12. Contact information
Appendix A. Re-formatting DiskOnChip under MS-DOS
Appendix B. Partitioning the disk with MS-DOS FDISK
Appendix C. Using WindRiver's VXSYS and VXCOPY utilities
1. INTRODUCTION
---------------
1.1. When used under VxWorks, DiskOnChip is managed by a dedicated device driver.
DiskOnChip driver is normally attached to the standard VxWorks's file
system (dosFs or dosFs-2). VxWorks disk oriented calls (including all
ANSI C file I/O facilities) work correctly with DiskOnChip.
1.2. DiskOnChip driver uses term "socket" to refer to either of the following:
- Single DiskOnChip Millennium Plus or up to 4 cascaded parts
- Single Mobile DiskOnChip part or up to 4 cascaded parts
- Single DiskOnChip 2000 TSOP or up to 4 cascaded parts
- Single DiskOnChip Millennium or up to 4 cascaded parts
- Single DiskOnChip 2000 part (DIP/DIMM)
The term 'cascaded' refers to the parts which all share the same address
in the host's address space, and form a single continuous flash media of
capacity equal to the sum of capacities of individual cascaded parts.
The DiskOnChip driver supports up to 4 "sockets", all possibly of different
types / cascade configurations / capacities.
1.3. When working with the following devices:
- DiskOnChip Millennium Plus (up to 4 cascaded devices)
- Mobile DiskOnChip (up to 4 cascaded devices)
- DiskOnChip 2000 TSOP (up to 4 cascaded devices)
the entire flash media constituting the "socket" may be divided into up to
4 independent regions or "disks". All such regions ("disks") can be
read/write accessed independently from other "disks" of that "socket".
"Sockets" consisting of either DiskOnChip 2000 DIP/DIMM or DiskOnChip
Millennium (8MB) parts do not support this feature. For these types of
"sockets", the term "disk" is identical to term "socket".
1.4. Each "disk" could be partitioned (by using dosFs-2's 'dpartLib' library
under VxWorks, or DOS utility FDISK) into up to 11 file system partitions
(primary and extended). Each such file system partition could be
individually formatted with any type of FAT that dosFs/dosFs-2 file system
supports.
1.5. The DiskOnChip driver is fully re-entrant, and takes care of all issues
related to the multitasking VxWorks environment, thereby freeing application
from any concerns of this kind.
1.6. When working with DiskOnChip Millennium Plus, up to two "disks" can have
their own hardware-level access permissions (read/write).
2. INSTALLING DISKONCHIP DRIVER
-------------------------------
2.1. Copy the following headers from DiskOnChip driver distribution to
/target/h directory.
/src/blockdev.h
/src/doc2exb.h
/src/docbdk.h
/src/docsys.h
/src/dosformt.h
/src/flbase.h
/src/flbuffer.h
/src/flchkdef.h
/src/flflash.h
/src/flformat.h
/src/flfuncno.h
/src/flioctl.h
/src/flreq.h
/src/flsocket.h
/src/flstatus.h
/src/fltl.h
/src/osak.h
/examples/drivers/include/_blkdev.h
/examples/drivers/include/_doc2exb.h
/examples/drivers/include/_docbdk.h
/examples/drivers/include/_docsys.h
/examples/drivers/include/_dosfrmt.h
/examples/drivers/include/_flflash.h
/examples/drivers/include/_flioctl.h
/examples/drivers/include/_flreq.h
/examples/drivers/include/_flsoc.h
/examples/drivers/include/_fltl.h
/examples/drivers/include/bddefs.h
/examples/drivers/include/diskonc.h
/examples/drivers/include/fatfilt.h
/examples/drivers/include/flsysfun.h
/examples/drivers/include/inftl.h
/examples/drivers/include/mdocplus.h
/examples/drivers/include/mtdsa.h
/examples/drivers/include/nanddefs.h
/examples/drivers/include/nfdc2148.h
/examples/drivers/include/nftllite.h
/examples/drivers/include/protectp.h
/examples/drivers/include/reedsol.h
/examples/drivers/include/stdcomp.h
/examples/drivers/VxWorks/fldrvvxw.h
/examples/drivers/VxWorks/flsim.h
/examples/drivers/VxWorks/custom/flcustom.h
/examples/drivers/VxWorks/system/flsystem.h
===> NOTE. If names of some source code files listed above, appear on
your UNIX host in upper case ("FLSYSTEM.H", "FLCUSTOM.H" etc.)
or mixed case ("Flsystem.h" etc.), change all these file names
to lowercase ("flsystem.h", "flcustom.h" etc.).
===> NOTE. All the source code files listed above follow the MS-DOS
conventions for end-of-line character(s) in text files. In case
if you are using UNIX host, we suggest to convert all these
files to UNIX convention by running them through 'dos2unix' or
similar UNIX utility.
2.2. Make sure your BSP configuration header file
(/target/config//config.h) excludes the following VxWorks
components:
#undef INCLUDE_TFFS
#undef INCLUDE_PCMCIA /* include PCMCIA driver */
2.3. Remove all object modules associated with previous versions of
DiskOnChip driver, and add current version of DiskOnChip driver to the
Tornado (R) object library. The way you do it depends on version of Tornado,
and processor you are using:
- for Tornado-2.0x and PowerPC processor, follow instructions in
/examples/drivers/VxWorks/bin/t20/ppc/README-supplement.txt.
- for Tornado-2.2 and PowerPC processor, follow instructions in
/examples/drivers/VxWorks/bin/t22/ppc/README-supplement.txt.
- for Tornado-2.1 and MIPS processor, follow instructions in
/examples/drivers/VxWorks/bin/t21/mips/README-supplement.txt.
- for Tornado-2.2 and MIPS processor, follow instructions in
/examples/drivers/VxWorks/bin/t22/mips/README-supplement.txt.
- for Tornado-2.0x and x86 processor, follow instructions in
/examples/drivers/VxWorks/bin/t20/x86/README-supplement.txt.
- for Tornado-2.2 and Pentium processor, follow instructions in
/examples/drivers/VxWorks/bin/t22/pentium/README-supplement.txt.
- for Tornado-2.0x and Windows-based VxWorks simulator, follow instructions
in /examples/drivers/VxWorks/bin/t20/simNT/README-supplement.txt.
- for Tornado-2.1 and Windows-based VxWorks simulator, follow instructions
in /examples/drivers/VxWorks/bin/t21/simNT/README-supplement.txt.
- for Tornado-2.2 and Windows-based VxWorks simulator, follow instructions
in /examples/drivers/VxWorks/bin/t22/simpc/SIMNT/README-supplement.txt.
2.5. If you are using VxWorks simulator (VxSim) to simulate DiskOnChip on RAM,
skip to Section 2.5.2; otherwise proceed with Section 2.5.1.
2.5.1. If you are using VxWorks simulator (VxSim) to simulate DiskOnChip on RAM,
skip this Section, and proceed with Section 2.5.2 instead.
To tell the driver where to look for DiskOnChip, the application must call
routine tffsSetup().
===> NOTE. The tffsSetup() routine must be called exactly once, BEFORE
driver has been initialized by routine tffsDrv().
Here is declaration of routine tffsSetup() taken from fldrvvxw.h:
extern void tffsSetup (int diskonchips, long *addressRange);
where 'diskonchips' is the number of DiskOnChip "sockets" installed in the
system; 'addressRange' is an array of address pairs bounding the regions to
search for DiskOnChips. For instance, if your particular board allows
installation of up to three DiskOnChips, and the regions to search for
DiskOnChips are as follows:
[0xc00d0000 ... 0xc00d1fff] 1st DiskOnChip
[0xc00d2000 ... 0xc00d3fff] 2nd
[0xc00d4000 ... 0xc00d5fff] 3rd
then you should include the following code fragment into your application:
#include "fldrvvxw.h"
/* address ranges to search for 3 DiskOnChips */
long tffsAddresses[] = { 0xc00d0000, 0xc00d1fff, /* 1st DiskOnChip */
0xc00d2000, 0xc00d3fff, /* 2nd */
0xc00d4000, 0xc00d5fff; /* 3rd */
};
/* tell driver to detect up to 3 DiskOnChips */
tffsSetup (3, tffsAddresses);
When there is a single DiskOnChip installed in the system at well known
address, it is desirable to prevent the driver from scanning the host
address space for DiskOnChip. In such cases, both upper and lower bounds of
the search range could be set to exact DiskOnChip address. For instance,
if DiskOnChip is always installed at address 0xc00d0000, then application
can tell driver to look for DiskOnChip at this particular address only.
Here is an example:
#include "fldrvvxw.h"
/* exact address to look for single DiskOnChip */
long tffsAddresses[] = { 0xc00d0000, 0xc00d0000 };
/* tell driver to detect single DiskOnChip */
tffsSetup (1, tffsAddresses);
Skip to Section 2.6.
2.5.2. If you are not using VxWorks simulator (VxSim) to simulate DiskOnChip on RAM,
skip this Section, and proceed with Section 2.6 instead.
To tell DiskOnChip driver what type of DiskOnChip you want to simulate, user
has to call routine tffsSetup(). Here is declaration of this routine taken
from fldrvvxw.h:
extern void tffsSetup (int diskonchips, long *addressRange);
Parameter 'diskonchips' should always be specified as '1'.
Parameter 'addressRange[0]' is used to specify the type of simulated
DiskOnChip. Here is an example of how to tell DiskOnChip driver to simulate
DiskOnChip Millennium Plus 32 MByte part:
#include "flsim.h"
long tffsAddresses[2];
/* simulate DiskOnChip Millennium Plus 32 MByte */
FLSimConf_t simDoc = FL_SIM_CONF_MPLUS;
tffsAddresses[0] = (long) &simDoc;
To simulate DiskOnChip Millennium 8 MByte part, replace FL_SIM_CONF_MPLUS
with FL_SIM_CONF_MDOC in the code fragment above.
To simulate other types of DiskOnChip, user needs to manually intialize
fields in FLSimConf_t structure. For example, to simulate DiskOnChip Millennium
Plus 16 MByte part, user has to initialize FLSimConf_t structure as shown
below:
simDoc.mem_addr = NULL;
simDoc.mem_size = 0;
simDoc.flags = (unsigned)INFTL_ENABLED;
simDoc.ppp_limit = 5;
simDoc.page_size = 512;
simDoc.page_extra_size = 16;
simDoc.block_size = 0x4000L;
simDoc.chip_size = 0x1000000L;
simDoc.chips = 1;
simDoc.floors = 1;
simDoc.interlv = 2;
simDoc.ecc_size = 6;
Parameter 'addressRange[1]' is used to specify the location of buffer
which will be used to simulate DiskOnChip. To cause DiskOnChip driver to
allocate this buffer dynamically from system's memory pool, simply set
'addressRange[1]' to zero:
/* dynamically allocate buffer for simulating DiskOnChip */
long tffsAddresses[2];
tffsAddresses[1] = 0;
===> NOTE. Size of the buffer must be approximately 4% larger then the
capacity of simulated DiskOnChip. For example, 16,896 KByte buffer
is required for simulating 16 MByte (16,384 KByte) DiskOnChip.
The buffer must also be aligned at long word boundary.
Here is the complete example of how to tell DiskOnChip driver to simulate
DiskOnChip Millennium 8MByte part, and dynamically allocate RAM buffer for
that purpose:
#include "flsim.h"
long tffsAddresses[2];
/* simulate DiskOnChip Millennium 8 MByte */
FLSimConf_t simDoc = FL_SIM_CONF_MDOC;
tffsAddresses[0] = (long) &simDoc;
/* dynamically allocate RAM buffer for simulating DiskOnChip */
tffsAddresses[1] = 0;
tffsSetup (1, tffsAddresses);
2.6. By default, DiskOnChip driver assumes that the following four conditions
are all true:
(a) DiskOnChip's pin A0 is connected to line A0 of the system's
address bus.
(b) It is possible to read individual 32-bit long word from any
long-word-aligned address within the address range that DiskOnChip
is mapped to.
(c) It is possible to read individual 16-bit short word from any
short-word-aligned address within the address range that DiskOnChip
is mapped to.
(d) It is possible to read individual byte from any address within the
address range that DiskOnChip is mapped to.
In most of the systems all four conditions are true. If ... ...
近期下载者:
相关文件:
收藏者: