Home

µC/FS - Doc

image

Contents

1. NbrOfPgmPerPage has been renamed to NbrPgmPerPg in the FS_NAND_PART_STATIC_CFG sstatic part layer configuration structure If you use the fs_app c h application template nothing needs to be changed but if setting the field at runtime the assignment will need to be corrected Every function in the NAND driver generic controller BSP API except Close ChipSelEn and ChipSelDis requires the addition of a FS_ERR error code pointer argument Use that error code pointer to return any error that need to be reported by the BSP The Open and WaitWhileBusy functions need to have their return types changed to void the errors being now reported through the new FS_ERR argument UC FS v4 04 05 to v4 05 00 The following is a comprehensive list of the modifications you must apply to your uC FS projects to update them to v4 05 00 from v4 04 05 The changes are easy to make and updating your project should take a short time 1 01 New source code and features The major feature of uC FS v4 05 00 is the release of a new NAND driver Changes to the rest of the file system is mostly bug fixes and minor features It is important to update every files of uC FS and make sure that the required depencies are updated too 1 02 API changes No changes to the calling conventions of the API has been done in this release However a few error codes were revised A summary of these changes is presented in the following list FS_DevDrvAdd Q now retur
2. changes are easy to make and updating your project should take a short time 1 01 New source code uC FS v4 04 01 include many improvements and changes in the source code from the last version Many of them improve either the reliability the readability or the speed of uC FS To migrate to v4 04 01 the first step is to replace every file of your project by the new ones 1 02 Error codes redesigned uC FS v4 04 01 uses enums for the error codes This is useful when debugging because most debuggers will show the full name instead of a value Also fs_err c is now deprecated and should be removed from your project 1 03 File inclusion changes To improve readability and compatibility with third party tools the header files are not all included by a master include file anymore Instead of including fs h solely you will have to include appropriate headers depending on the API you wish to use fs_file h fs_dir h fs_vol h fs_dev h etc 1 04 Changes in fs_cfg h You must now define FS CFG BUILD FS TRACE LEVEL and FS_TRACE in the file fs_cfg h Refer to the template in the uC FS archive for an example 11 UC FS v4 03 to v4 04 The following is a comprehensive list of the modifications you must apply to your uC FS projects to update them to v4 04 from v4 03 The changes are easy to make and updating your project should take a short time 1 01 New source code uC FS v4 04 include many impr
3. function initializes core structures However in V3 it also calls FS_X AddDevices in which the user is expected to place code to add and configure file system devices Rather in V4 the user is expected to add and configure devices after FS_Init returns The first step actually is to register device drivers with the file system software with FS_DevDrvAdd After that one or more devices which use those drivers can be added to file system with FSDev_Open The first argument of this function is like the first argument of V36 various volume access functions a name composed of the device driver name a colon the device unit number and another colon Unlike V3 in which the unit number is assigned by the device driver v4 uses unit numbers that are also known to the device driver or device driver BSP If there is a device driver BSP then the same number is used as the first argument of BSP functions to address the proper device In uC FS V3 the FS_AddDevice function returns a pointer toa FS_VOLUME However in V4 the concept of device and volume are fully separate so after a device is added a volume must be opened on it using FSVol_Open The first argument of this function is the string that is the volume identifier the second argument is the device identifier the string used in FSDev_Open The two strings may be identical but that is not necessary though it may be convenient A template file s_app c for initializing
4. source files fs_pool c and fs_pool h are deprecated and should not be included any longer 1 03 Optional master include file A new master include file called fs_inc h can optionally be used instead of including individual header files User wishing to port projects from uC FS 4 04 may use it as a drop in replacement for fs h However the fs_api h containing the defenition of the POSIX compliant API is not included in fs_inc h 1 04 Changes in fs_cfg h Two new configuration must be defined in fs_cfg h FS_CFG_64_BITS_LBA_EN and FS_CFG_BUF_ALIGN_OCTETS The first one is used to enable support for 64 bit LBA existing applications should generally set this to DEF_DISABLED to ensure compatibility The second is used to specify a minimum alignment in octets for the internal file system buffers See the uC FS user manual appendix E titled uC FS configuration guide for more details about these new configurations 1 05 Change to the OS port API The function FS_OS_WorkingDirSet was modified to include an error return argument Projects using a custom OS port not provided Micrium should update their port accordingly 1 06 Change to the SD BSP API Error return arguments were changed from FS_DEV_SD_CARD_ERR to FS_ERR to be more consistent throughout uC FS 10 EC FS v4 04 to v4 04 01 The following is a comprehensive list of the modifications you must apply to your uC FS projects to update them to v4 04 01 from v4 04 The
5. 00 The following is a comprehensive list of the modifications you must apply to your uC FS projects to update them to v4 06 00 from v4 05 03 The changes are easy to make and updating your project should take a short time 1 01 New source code and features The major feature of uC FS v4 06 00 is the redesignof the journaling module Other features include support for dumping raw NAND images in the NAND driver along with bug fixes The first step is to replace every file of your project by the new ones 1 02 API changes Due to a redesignof the journaling module you must first make sure that any journaled volume used through uC FS V4 05 03 or earlier has been cleanly unmounted before upgrading to uC FS V4 06 00 The new journal format is incompatible with the old one and thus any existing old format entry in the journal file would be lost In the previous V4 05 03 release the default value for the UB_CntMax field of the NAND configuration structure FS_NAND_DfltCfg was changed from 10 to 3 causing FSDev_Open to return with error code FS_ERR_DEV_INCOMPATIBLE_LOW_PARAMS on already low formatted NAND devices The default value has been reduced to relax the RAM requirements of the default configuration Changing that value back to 10 on V4 05 03 will allow previously low formatted NAND devices to be mounted Another option would be low format the NAND device If your project uses the fs_app c h template it was impossible to chan
6. FSVol_ Query FS GetTotalSpace use FSVol_ Query FS GetVolumeFreeSpace use FSVol_ Query FS GetVolumetInfo O O O use FSVol_ Query FS GetVolumeLabel FSVol_ LabelGet FS _GetVolumeSize use FSVol_ Query FS GetVolumeName FSVol_ GetVolName FS GetVolumeStatus use FSVol_ Query FS _IsVolumeMounted FSVol_ TIsMounted FS Move use fs_ rename FS Read use fs_ fread FS SetEndOfFile use fs_ truncate FS SetFileAttributes FSEntry AttribSet FS SetFileTime FSEntry_ TimeSet FS SetFileTimeEx FSEntry TimeSet FS SetVolumeLabel FSVol_ LabelSet FS Verify FS Write use fs_fwrite FS IsHLFormatted use FSVol_Query FS IsLLFormatted use FSDev_Query FS FormatLLIfRequired use FSDev_Query FSDev_NOR_LowFmt FS FormatLow FSDev_NOR_LowFmt FS Format FSVol Fmt Table 1 2 API Translation The Windows style directory listing functions FS_FindFirstFile FS FindNextFile and FS_FindClose are not directly represented in uC FS V4 however implementations of the dirent h functions fs_opendir fs_readdir_r and fs_close provide the same capabilities 18 1 03 Initialization differences Both uC FS V3 and V4 have a FS Init function In each version this
7. Micrium Empowering Embedded Systems uC FS V4 06 01 Migration Guide www Micrium com Disclaimer Specifications written in this manual are believed to be accurate but are not guaranteed to be entirely free of error Specifications in this manual may be changed for functional or performance improvements without notice Please make sure your manual is the latest edition While the information herein is assumed to be accurate Micrium assumes no responsibility for any errors or omissions and makes no warranties Micrium specifically disclaims any implied warranty of fitness for a particular purpose Copyright notice You may not extract portions of this manual or modify the PDF file in any way without the prior written permission of Micrium The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such a license 2008 2013 Micrium Weston Florida 33327 1848 U S A Trademarks Names mentioned in this manual may be trademarks of their respective companies Brand and product names are trademarks or registered trademarks of their respective holders Registration Please register the software via email This way we can make sure you will receive updates or notifications of updates as soon as they become available For registration please provide the following information e Your full name and the name of your supervisor e Your company name e Your job tit
8. NT 2 APP CFG FS VOL CNT define APP CFG FS DEV DRV_ CNT lu define APP CFG FS MAX SEC SIZE 512u 16 The above defines are generally declared in the app_cfg h file and are used in the fs_app c file See uC FS V4 manual for more details regarding FS_CFG structure 1 01 07 Long file name LFN support uC FS V4 now relies on constant define FS_FAT CFG _LFN_EN declaredin fs_cfg h file to include exclude the long file name support 1 02 API differences uC FS V4 still supports stdio h style file access however the function names have been re aligned with the standard names Table 1 1 translates the names from uC FS V3 to V4 and includes in addition functions that have been newly added to the software uC FS V3 Function uC FS V4 Function FS ClearErr fs_clearerr FS FClose fs_fclose FS FEof fs_ feof FS FError fs_ferror FS FOpen fs_fopen FS FRead fs_fread FS_FSeek fs_fseek FS_FTell fs_ ftell FS FWrite fs_ fwrite FS GetFilePos fs_fgetpos FS MkDir fs_mkdir FS Remove fs_ remove FS Rename fs_rename FS_ RmDir fs_rmdir FS SetFilePos fs_fsetpos FS Truncate fs_ftruncate fs _ fflush fs flockfile fs_ ftrylockfile fs_funlockfile fs_rewind fs_setbuf fs_setvbuf fs _chdir fs_getcwd
9. Table 1 1 POSIX Compatible API Translation Table 1 2 lists approximate uC FS V4 equivalents to the remaining V3 interface functions For more information on V4 functions see uC FS V4 Manual Appendix A Outside of the POSIX function API differences are more significant The volume paradigm used for Initialization differences uC FS V4 separates volume functionality access of a file system on some medium from device functionality access and control of the medium This greater formality results in major discrepancies between the interface functions and internal operation of the two versions Consequently applications which used the previous software version cannot be upgraded by mere function for function replacement uC FS V4 Manual includes complete descriptions of all volume interface functions along with example code listings uC FS V3 Function uC FS V4 Function FS CopyFile FSEntry Copy FS _FindFirstFile use fs_opendir FS FindNextFile use fs readdir r FS_FindClose use fs_closedir FS GetFileAttributes FSEntry Query FS_ GetFileTime FSEntry Query FS GetFileTimeEx FSEntry Query FS_TimeStampToFileTime use FSTime TS to Time FS FileTimeToTimeStamp use FSTime Time _to_TS FS GetFileSize use FSFile Query FS GetNumVolumes FSVol GetVolCnt FS GetFreeSpace use
10. fg h You must define FS CFG CONCURRENT ENTRIESin file s_cfg h You must also delete the definition of FS CFG GET TS FROM OS Refer to the template in the uC FS archive for an example 1 05 API changes Parameter dir of function FSEntry Create has been replaced The following is the new declaration void FSEntry Create CPU CHAR name full FS FLAGS entry type CPU_BOOLEAN excl FS ERR p err Parameter entry type can now take the following values FS ENTRY TYPE FILE FS ENTRY TYPE DIR 13 Parameter file of function FS Entry Del has been replaced The following is the new declaration void FSEntry Del CPU_CHAR name_ full FS FLAGS entry type FS_ERR p err The parameter entry _ type can now take the following values FS ENTRY TYPE FILE FS ENTRY TYPE DIR FS ENTRY TYPE ANY In FSEntry_TimeSet the type of the parameter p_time has been changed from FS_DAT E TIME to CLK_ DATE TIME as in the following delclaration void FSEntry TimeSet CPU CHAR name_ full CLK DATE TIME p time CPU_INTO8U flag FS ERR io Sri y 14 uC FS v3 xx to v4 04 Though uC FS V3 xx and V4 04 provide compatibled and often interchangeable6 constructs for accessing files and directories many differences exist Some of these such as the new stratified software directory litt
11. ge the UB_CntMax field without directly modifying fs_app c In V4 06 00 a new hidden configuration define has been added APP_CFG_FS_NAND_UB_CNT_MAX This define if set allows you to change the value for UB_CntMax which would allow you by setting it to the value 10 to mount pre V4 05 03 devices without low level reformating them Some unneeded fields have been removed from core uC FS structures like the FS_FILE FS_VOL FS_DEV FS_BUF FS_NAND_DATA etc Those structures are not meant to be directly read or modified from the applications but you may have to adapt your application if you were accessing them directly The FS_CFG_BUILD configuration option in fs_cfg h has been removed uC FS will always be built as it was with FS_CFG_BUILD equal to FS_BUILD_FULL UC FS v4 05 00 to v4 05 01 The following is a comprehensive list of the modifications you must apply to your uC FS projects to update them to v4 05 01 from v4 05 00 The changes are easy to make and updating your project should take a short time 1 01 New source code and features uC FS v4 05 01 is comprised of mostly bugfixes in various modules The first step is to replace every file of your project by the new ones 1 02 API changes Some changes were made to the NAND Driver generic controller BSP API and to the NAND static part layer implementation configuration structure The list below details the changes you need to make to migrate your projects The field
12. le e Your email address and telephone number e Company name and address e Your company s main phone number e Your company s web site address e Name and version of the product Please send this information to licensing micrium com Contact address Micrium 949 Crestview Circle Weston FL 33327 1848 U S A Phone 1 954 217 2036 FAX 1 954 217 2037 WEB www micrium com Email support micrium com Document versions If you find any errors in this document please inform us and we will make the appropriate corrections for future releases Manual Version Date Description V4 06 01 2013 07 10 Updated V4 06 00 2013 06 27 Updated V4 05 01 2012 09 10 Updated V4 05 00 2012 08 16 Updated V4 04 05 2012 06 12 Updated V4 04 04 2012 06 06 Updated V4 04 03 2012 05 10 Updated V4 04 01 2010 11 29 Updated V4 04 2010 11 11 Updated V4 03 2010 05 27 First version of document UC FS v4 06 00 to v4 06 01 The following is a comprehensive list of the modifications you must apply to your uC FS projects to update them to v4 06 01 from v4 06 00 The changes are easy to make and updating your project should take a short time 1 01 New source code uC FS v4 06 01 is comprised of mostly bugfixes in various modules The first step is to replace every file of your project by the new ones 1 02 API changes No API changes have been made in uC FS v4 06 01 UC FS v4 05 03 to v4 06
13. le affect the typical user amp experience Others particularly in the realm of initialization and device volume management will require code modifications for any uC FS V3 application to work with V4 1 01 Basic differences 1 01 01 Directories The directory structure and file names have changed significantly Figure 1 1 shows uC FS V4 directories See uC FS V4 manual for more details regarding each folder B uc Fs OD ari D app O BSP O cmd O Dev B Doc O Examples O FAT a O os fm Source Figure 1 1 uC FS V4 directories E H E e Ee 1 01 02 Data types uC FS V4 now uses uC CPU for CPU and compiler independent data types e g CPU_INT32U Since the software no longer defines the Uxx and Ixx integer types defined in global h file for wC FS V3 any application that uses them will need to create t ypedefs to uC CPU equivalents or replace them by uC CPU equivalent data types 15 1 01 03 Used memory management uC FS V4 now relies on uC LIB for standard library services The memory for objects used in the software are now allocated from the uC LIB heap instead of a block assigned to the file system suite uC FS V4 required memory is allocated by setting the following define to the approriate size in bytes In general it is a good practice to have such defines grouped in the same file such as app_cfg h file define LIB MEM CFG HEAP SIZE 8192u 1 01 04 Configuration file The configurati
14. naged by the OS You must then add the port files clk _os cand clk _os h to your project Theses files already exist for wC OS II and uC OS III If you are using your own OS youdl have to write that port yourself Please refer to uC Clk user manual for further information 5 Remove the define FS CFG GET TS FROM OS fromthe file fs cfg h 5 ite aad If you call s_time functions in your application you must replace them with calls to the equivalent uC Clk functions Below a list of equivalent calls in s_ time and wC Clk FS DATE TIME replaced by CLK DATE TIME FSTime_ TimeGet replaced by Clk GetDateTime FSTime_ TimeSet replaced by Clk SetDateTime FSTime Time to Str replaced by Clk DateTimeToStr 12 FSTime Time to TSU replaced by Clk DateTimeToTS Unix FSTime TS to Time replaced by Clk TS UnixToDateTime 31 instead of Js S 0 lt jie Day of month is now 0 12 instead of 0 11 0 0 Month of year is now Day of week is now Day of year is now 7 instead of pi O Wes 366 instead of i S65 PRP 1 03 Elimination of fs_bsp The fs_bsp module has been eliminated from uC FS In order to compile your project with uC FS 4 04 you must remove the files fs_bsp h and fs_bsp c from your project If you are not using an OS you must define the function FS_BSP Dly_ ms 1 04 Changes in fs_c
15. ns FS_ERR_DEV_DRV_NONE_AVAIL instead of FS_ERR_DEV_DRV_NO_TBL_POS_AVAIL when unable to add a driver when reaching the configured limit All functions that were found to return FS_ERR_NULL_PTR when given a NULL pointer as a file name now return the more appropriate FS_ERR_NAME_NULL error code This is only in effect when argument checking is enabled The error code returned by FSCache_Create when given an invalid cache configuration is now FS_ERR_INVALID_CFG instead of the unrelated FS_ERR_CACHE_INVALID_SEC_TYPE 1 03 Multi Cluster Writes and Reads uC FS is now able to perform reads and writes across clusters as one device access if possible This has the side effect of increasing the maximum transfer size of device access Users who perform large file access in their application should make sure that the BSPs are able to cope with the increased transfer size UC FS v4 04 04 to v4 04 05 The following is a comprehensive list of the modifications you must apply to your uC FS projects to update them to v4 04 05 from v4 04 04 The changes are easy to make and updating your project should take a short time 1 01 New source code uC FS v4 04 04 is comprised of mostly bugfixes in various modules The first step is to replace every file of your project by the new ones 1 01 API changes No API changes have been made in uC FS v4 04 05 UC FS v4 04 03 to v4 04 04 The following is a comprehensive list of the modifications yo
16. on file has been renamed s_cfg h from fs_conf h and the configuration define names and values changed See uC FS V4 manual for more details regarding the configuration constant defines 1 01 05 Device driver uC FS V4 provides a template file uc FS APP Template fs_app c which can be used to initialize the file system and select the approriate device driver uC FS V4 select a driver based on a constant that should be declared by the application In general these defines are declared in the app_cfg h file as follow i Cree Cheihyere tme leysilicin define APP CFG FS IDE EN DEF_ DISABLED define APP CFG FS MSC EN DEF _ DISABLED define APP CFG FS NOR EN DEF DISABLED define APP CFG FS RAM EN DEF_ DISABLED define APP CFG FS SD EN DEF DISABLED define APP CFG FS SD CARD EN DEF_ ENABLED In the above example the SD card driver in card mode is selected wC FS V4 Manual provides more details about each device driver 1 01 06 General configuration As described in the previous section uC FS V4 provides a template file fs_app c used to initialize the file system and select the approriate device driver Initializing uC FS requires a general configuration structure to be passed as a pointer of type FS_CFG to FS_init function The following presents an example for the configuration define APP CFG FS DEV CNT lu define APP CFG FS VOL CNT 3u define APP CFG FS FILE CNT 5u define APP CFG FS DIR CNT lu define APP CFG FS BUF C
17. ovements and changes in the source code from the last version Many of them improve either the reliability the readability or the speed of uC FS To migrate to v4 04 the first step is to replace every file of your project by the new ones 1 02 About ypC Cik uC FS v4 04 now includes wC Clk wC Clk C CIk is a module that implements a Y2K compliant clock calendar Your application can obtain timestamps in three formats C Clk UNIX NTP C Clk purpose is to unify the time date management across every Micrium products For example you could set the timestamp of a file from the time information obtained via a SNTP server using uC TCPIP with the optional SNTP module Note that you can still use a hardware clock i e RTC or the time from any RTOS For v4 04 the use of uC Clk is mandatory The s_time module is no longer supported Below are the steps you must follow to use uC Clk Pleaser refer to the uC Clk user manual for further informations Remove files fs_time c and fs_time h from your project Add clk c and clk h to your project Add the path for clk h to your list of include directories Add the file clk _cfg h to your project use the template in the uC CIk distribution e Set CLK_CFG_EXT_EN appropriately in the file clk_cfg h If CLK_CFG EXT _EN is DEF ENABLED you must define your own time management functions Clk_ExtTS Init Clk_ExtTS_Get andClk ExtTS Set e If CLK_CFG EXT EN is DEF DISABLED time will be ma
18. u must apply to your uC FS projects to update them to v4 04 04 from v4 04 03 The changes are easy to make and updating your project should take a short time 1 01 New source code uC FS v4 04 04 is comprised of mostly bugfixes in various modules The first step is to replace every file of your project by the new ones 1 02 API changes No API changes have been made in uC FS v4 04 04 1 03 Device query FSDev_Query will now returns valid data for the ixed6 and Gtated fields even if a devices is not accessible An approriate error is returned exactly as before if the device cannot be accessed Existing applications should not be impacted 1 04 RAMDisk removable status RAMDisk type of devices will now correctly identify themselves as fixed devices instead of removable Applications that relies on that information should be updated accordingly UC FS v4 04 02 to v4 04 03 The following is a comprehensive list of the modifications you must apply to your uC FS projects to update them to v4 04 03 from v4 04 02 The changes are easy to make and updating your project should take a short time 1 01 New source code uC FS v4 04 03 include many improvements and changes in the source code from the last version Many of them improve either the reliability the readability or the speed of uC FS To migrate to v4 04 01 the first step is to replace every file of your project by the new ones 1 02 Deprecated source files The
19. wC FS V4 is provided within wC FS V4 distribution This file is located under uCc FS APP Template folder For more information about initializing a uC FS V4 project see the example application described in uC FS V4 Getting Started document 1 04 Cache differences uC FS V3 integrated into its single cache module two separate concepts of Frache6 1 Volume cache which stores complete sectors of the volume in RAM to accelerate future accesses 2 File buffering which involves the buffering of file data as part of reads or writes so that the user can read write small chunks of data from to the file without a volume medium access being necessary for each chunk In uC FS V4 these concepts are treated separately Volume cache functionality is separated into a cache module File buffering is implemented in file module functions and this functionality is accessible in the POSIX API layerG fs_fflush and fs_setvbuf function equivalent to the standard fflush and setvbuf The corresponding file module functions are FSFile BufFlush and FSFile BufAssign uC FS V3 Function uC FS V4 Function FS AssignCache use FSVol CacheAssign FS CACHE Clean use FSVol CacheFlush FS CACHE SetMode Pore FS CACHE SetQuota eget wae FSVol_ CacheInvalidate Table 1 3 Cache API Translation 19

Download Pdf Manuals

image

Related Search

Related Contents

Satellite P750-11U  HP 2000 2000-350US  Philips SVC1117C  use and maintenance manual manuel d utilisation et d entretien  Data Sheet and User Manual  DeLonghi PAC160 Air Conditioner User Manual  

Copyright © All rights reserved.
Failed to retrieve file