📄 tffsconfig.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/tffsConfig.html - generated by refgen from tffsConfig.c --> <title> tffsConfig </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference : OS Libraries</i></a></p></blockquote><h1>tffsConfig</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tffsConfig</strong> - TrueFFS configuration file for VxWorks </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./tffsConfig.html#tffsShowAll">tffsShowAll</a>( )</b> - show device information on all socket interfaces <br><b><a href="./tffsConfig.html#tffsShow">tffsShow</a>( )</b> - show device information on a specific socket interface <br><b><a href="./tffsConfig.html#tffsBootImagePut">tffsBootImagePut</a>( )</b> - write to the boot-image region of the flash device<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This source file, with the help of <b>sysTffs.c</b>, configures TrueFFS for VxWorks. The functions defined here are generic to all BSPs. To include these functionsin the BSP-specific module, the BSP's <b>sysTffs.c</b> file includes this file. Within the <b>sysTffs.c</b> file, define statements determine which functions from the <b>tffsConfig.c</b> file are ultimately included in TrueFFS.<p>The only externally callable routines defined in this file are <b><a href="./tffsConfig.html#tffsShow">tffsShow</a>( )</b>, <b><a href="./tffsConfig.html#tffsShowAll">tffsShowAll</a>( )</b>, and <b><a href="./tffsConfig.html#tffsBootImagePut">tffsBootImagePut</a>( )</b>. You canexclude the show utilities if you edit <b>config.h</b> and undefine <b>INCLUDE_SHOW_ROUTINES</b>. You can exclude <b><a href="./tffsConfig.html#tffsBootImagePut">tffsBootImagePut</a>( )</b> if youedit <b>sysTffs.c</b> and undefine <b>INCLUDE_TFFS_BOOT_IMAGE</b>. (If you find theseutilities are missing and you want them included, edit <b>config.h</b> and define <b>INCLUDE_SHOW_ROUTINES</b> and <b>INCLUDE_TFFS_BOOT_IMAGE</b>.)<p>If you wish to include only the TrueFFS specific show routines you coulddefine <b>INCLUDE_TFFS_SHOW</b> instead of <b>INCLUDE_SHOW_ROUTINES</b> in <b>config.h</b>.<p>However, for the most part, these externally callable routines are only a small part of the TrueFFS configuration needs handled by this file. The routines internal to this file make calls into the MTDs and translation layer modules of TrueFFS. At link time, resolving the symbols associated with these calls pulls MTD and translation layer modules into VxWorks. <p>However, each of these calls to the MTDs and the translation layer modulesis only conditionally included. The constants that control the includesare defined in <b>sysTffs.c</b>. To exclude an MTD or translation layer module,you edit <b>sysTffs.c</b>, undefine the appropriate constant, and rebuild <b>sysTffs.o</b>.These constants are described in the reference entry for <b><a href="../bsp/ads860/sysTffs.html#top" >sysTffs</a></b>. <p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>stdcomp.h</b><hr><a name="tffsShowAll"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tffsShowAll( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tffsShowAll( )</strong> - show device information on all socket interfaces </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void tffsShowAll (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine prints device information on all socket interfaces. <p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tffsConfig.html#top">tffsConfig</a></b><hr><a name="tffsShow"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tffsShow( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tffsShow( )</strong> - show device information on a specific socket interface </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void tffsShow ( int driveNo /* TFFS drive number */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine prints device information on the specified socket interface. This information is particularly useful when trying to determine the number of Erase Units required to contain a boot image. The field calledunitSize reports the size of an Erase Unit.<p>If the process of getting physical information fails, an error code is printed. The error codes can be found in <b>flbase.h</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tffsConfig.html#top">tffsConfig</a></b><hr><a name="tffsBootImagePut"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>tffsBootImagePut( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>tffsBootImagePut( )</strong> - write to the boot-image region of the flash device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tffsBootImagePut ( int driveNo, /* TFFS drive number */ int offset, /* offset in the flash chip/card */ char * filename /* binary format of the bootimage */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine writes an input stream to the boot-image region (if any) of a flash memory device. Typically, the input stream contains a boot image, such as the VxWorks boot image, but you are free to use this function to write any data needed. The size of the boot-image region is set by the <b><a href="./tffsDrv.html#tffsDevFormat">tffsDevFormat</a>( )</b> call (or the <b><a href="../bsp/hmse7751/sysTffs.html#sysTffsFormat" >sysTffsFormat</a>( )</b> call, a BSP-specific helper function that calls <b><a href="./tffsDrv.html#tffsDevFormat">tffsDevFormat</a>( )</b> internally) that formats the flash device for use with TrueFFS. <p>If <b><a href="./tffsConfig.html#tffsBootImagePut">tffsBootImagePut</a>( )</b> is used to put a VxWorks boot image in flash, you should not use the s-record version of the boot image typically produced by make. Instead, you should take the pre s-record version (usually called <b>bootrom</b> instead of <b>bootrom.hex</b>), and filter out its loader header information using an <i>xxx</i><b>ToBin</b> utility. For example: <pre>elfToBin < bootrom > bootrom.bin</pre>Use the resulting <b>bootrom.bin</b> as input to <b><a href="./tffsConfig.html#tffsBootImagePut">tffsBootImagePut</a>( )</b>. <p>The discussion above assumes that you want only to use the flash device tostore a VxWorks image that is retrieved from the flash device and then run out of RAM. However, because it is possible to map many flash devices directly into the target's memory, it is also possible run the VxWorks image from flash memory, although there are some restrictions:<ul><li>The flash device must be non-NAND. </li><li>Only the text segment of the VxWorks image (<b>vxWorks.res_rom</b>) may run out </li>of flash memory. The data segment of the image must reside in standard RAM. <li>No part of the flash device may be erased while the VxWorks image is running </li>from flash memory. </ul><p>Because TrueFFS garbage collection triggers an erase, this last restriction means that you cannot run a VxWorks boot image out of a flash device that must also support a writable file system (although a read-only file system is OK). <p>This last restriction arises from the way in which flash devices areconstructed. The current physical construction of flash memory devices does not allow access to the device while an erase is in progress anywhere on the flash device. As a result, if TrueFFS tries to erase a portion of the flash device, the entire device becomes inaccessible to all other users. If that other user happens to be the VxWorks image looking for its next instruction, the VxWorks image crashes.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tffsConfig.html#top">tffsConfig</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -