Updated HAL Firmware Package

This commit is contained in:
2021-01-06 03:20:13 +01:00
parent 0e90b84d2e
commit d0af2cd974
62 changed files with 2864 additions and 523 deletions

View File

@@ -0,0 +1,288 @@
----------------------------------------------------------------------------
Revision history of FatFs module
----------------------------------------------------------------------------
R0.00 (February 26, 2006)
Prototype.
R0.01 (April 29, 2006)
The first release.
R0.02 (June 01, 2006)
Added FAT12 support.
Removed unbuffered mode.
Fixed a problem on small (<32M) partition.
R0.02a (June 10, 2006)
Added a configuration option (_FS_MINIMUM).
R0.03 (September 22, 2006)
Added f_rename().
Changed option _FS_MINIMUM to _FS_MINIMIZE.
R0.03a (December 11, 2006)
Improved cluster scan algorithm to write files fast.
Fixed f_mkdir() creates incorrect directory on FAT32.
R0.04 (February 04, 2007)
Added f_mkfs().
Supported multiple drive system.
Changed some interfaces for multiple drive system.
Changed f_mountdrv() to f_mount().
R0.04a (April 01, 2007)
Supported multiple partitions on a physical drive.
Added a capability of extending file size to f_lseek().
Added minimization level 3.
Fixed an endian sensitive code in f_mkfs().
R0.04b (May 05, 2007)
Added a configuration option _USE_NTFLAG.
Added FSINFO support.
Fixed DBCS name can result FR_INVALID_NAME.
Fixed short seek (<= csize) collapses the file object.
R0.05 (August 25, 2007)
Changed arguments of f_read(), f_write() and f_mkfs().
Fixed f_mkfs() on FAT32 creates incorrect FSINFO.
Fixed f_mkdir() on FAT32 creates incorrect directory.
R0.05a (February 03, 2008)
Added f_truncate() and f_utime().
Fixed off by one error at FAT sub-type determination.
Fixed btr in f_read() can be mistruncated.
Fixed cached sector is not flushed when create and close without write.
R0.06 (April 01, 2008)
Added fputc(), fputs(), fprintf() and fgets().
Improved performance of f_lseek() on moving to the same or following cluster.
R0.07 (April 01, 2009)
Merged Tiny-FatFs as a configuration option. (_FS_TINY)
Added long file name feature. (_USE_LFN)
Added multiple code page feature. (_CODE_PAGE)
Added re-entrancy for multitask operation. (_FS_REENTRANT)
Added auto cluster size selection to f_mkfs().
Added rewind option to f_readdir().
Changed result code of critical errors.
Renamed string functions to avoid name collision.
R0.07a (April 14, 2009)
Septemberarated out OS dependent code on reentrant cfg.
Added multiple sector size feature.
R0.07c (June 21, 2009)
Fixed f_unlink() can return FR_OK on error.
Fixed wrong cache control in f_lseek().
Added relative path feature.
Added f_chdir() and f_chdrive().
Added proper case conversion to extended character.
R0.07e (November 03, 2009)
Septemberarated out configuration options from ff.h to ffconf.h.
Fixed f_unlink() fails to remove a sub-directory on _FS_RPATH.
Fixed name matching error on the 13 character boundary.
Added a configuration option, _LFN_UNICODE.
Changed f_readdir() to return the SFN with always upper case on non-LFN cfg.
R0.08 (May 15, 2010)
Added a memory configuration option. (_USE_LFN = 3)
Added file lock feature. (_FS_SHARE)
Added fast seek feature. (_USE_FASTSEEK)
Changed some types on the API, XCHAR->TCHAR.
Changed .fname in the FILINFO structure on Unicode cfg.
String functions support UTF-8 encoding files on Unicode cfg.
R0.08a (August 16, 2010)
Added f_getcwd(). (_FS_RPATH = 2)
Added sector erase feature. (_USE_ERASE)
Moved file lock semaphore table from fs object to the bss.
Fixed f_mkfs() creates wrong FAT32 volume.
R0.08b (January 15, 2011)
Fast seek feature is also applied to f_read() and f_write().
f_lseek() reports required table size on creating CLMP.
Extended format syntax of f_printf().
Ignores duplicated directory separators in given path name.
R0.09 (September 06, 2011)
f_mkfs() supports multiple partition to complete the multiple partition feature.
Added f_fdisk().
R0.09a (August 27, 2012)
Changed f_open() and f_opendir() reject null object pointer to avoid crash.
Changed option name _FS_SHARE to _FS_LOCK.
Fixed assertion failure due to OS/2 EA on FAT12/16 volume.
R0.09b (January 24, 2013)
Added f_setlabel() and f_getlabel().
R0.10 (October 02, 2013)
Added selection of character encoding on the file. (_STRF_ENCODE)
Added f_closedir().
Added forced full FAT scan for f_getfree(). (_FS_NOFSINFO)
Added forced mount feature with changes of f_mount().
Improved behavior of volume auto detection.
Improved write throughput of f_puts() and f_printf().
Changed argument of f_chdrive(), f_mkfs(), disk_read() and disk_write().
Fixed f_write() can be truncated when the file size is close to 4GB.
Fixed f_open(), f_mkdir() and f_setlabel() can return incorrect value on error.
R0.10a (January 15, 2014)
Added arbitrary strings as drive number in the path name. (_STR_VOLUME_ID)
Added a configuration option of minimum sector size. (_MIN_SS)
2nd argument of f_rename() can have a drive number and it will be ignored.
Fixed f_mount() with forced mount fails when drive number is >= 1. (appeared at R0.10)
Fixed f_close() invalidates the file object without volume lock.
Fixed f_closedir() returns but the volume lock is left acquired. (appeared at R0.10)
Fixed creation of an entry with LFN fails on too many SFN collisions. (appeared at R0.07)
R0.10b (May 19, 2014)
Fixed a hard error in the disk I/O layer can collapse the directory entry.
Fixed LFN entry is not deleted when delete/rename an object with lossy converted SFN. (appeared at R0.07)
R0.10c (November 09, 2014)
Added a configuration option for the platforms without RTC. (_FS_NORTC)
Changed option name _USE_ERASE to _USE_TRIM.
Fixed volume label created by Mac OS X cannot be retrieved with f_getlabel(). (appeared at R0.09b)
Fixed a potential problem of FAT access that can appear on disk error.
Fixed null pointer dereference on attempting to delete the root direcotry. (appeared at R0.08)
R0.11 (February 09, 2015)
Added f_findfirst(), f_findnext() and f_findclose(). (_USE_FIND)
Fixed f_unlink() does not remove cluster chain of the file. (appeared at R0.10c)
Fixed _FS_NORTC option does not work properly. (appeared at R0.10c)
R0.11a (September 05, 2015)
Fixed wrong media change can lead a deadlock at thread-safe configuration.
Added code page 771, 860, 861, 863, 864, 865 and 869. (_CODE_PAGE)
Removed some code pages actually not exist on the standard systems. (_CODE_PAGE)
Fixed errors in the case conversion teble of code page 437 and 850 (ff.c).
Fixed errors in the case conversion teble of Unicode (cc*.c).
R0.12 (April 12, 2016)
Added support for exFAT file system. (_FS_EXFAT)
Added f_expand(). (_USE_EXPAND)
Changed some members in FINFO structure and behavior of f_readdir().
Added an option _USE_CHMOD.
Removed an option _WORD_ACCESS.
Fixed errors in the case conversion table of Unicode (cc*.c).
R0.12a (July 10, 2016)
Added support for creating exFAT volume with some changes of f_mkfs().
Added a file open method FA_OPEN_APPEND. An f_lseek() following f_open() is no longer needed.
f_forward() is available regardless of _FS_TINY.
Fixed f_mkfs() creates wrong volume. (appeared at R0.12)
Fixed wrong memory read in create_name(). (appeared at R0.12)
Fixed compilation fails at some configurations, _USE_FASTSEEK and _USE_FORWARD.
R0.12b (September 04, 2016)
Made f_rename() be able to rename objects with the same name but case.
Fixed an error in the case conversion teble of code page 866. (ff.c)
Fixed writing data is truncated at the file offset 4GiB on the exFAT volume. (appeared at R0.12)
Fixed creating a file in the root directory of exFAT volume can fail. (appeared at R0.12)
Fixed f_mkfs() creating exFAT volume with too small cluster size can collapse unallocated memory. (appeared at R0.12)
Fixed wrong object name can be returned when read directory at Unicode cfg. (appeared at R0.12)
Fixed large file allocation/removing on the exFAT volume collapses allocation bitmap. (appeared at R0.12)
Fixed some internal errors in f_expand() and f_lseek(). (appeared at R0.12)
R0.12c (March 04, 2017)
Improved write throughput at the fragmented file on the exFAT volume.
Made memory usage for exFAT be able to be reduced as decreasing _MAX_LFN.
Fixed successive f_getfree() can return wrong count on the FAT12/16 volume. (appeared at R0.12)
Fixed configuration option _VOLUMES cannot be set 10. (appeared at R0.10c)

View File

@@ -0,0 +1,21 @@
FatFs Module Source Files R0.12c
FILES
00readme.txt This file.
00history.txt Revision history.
ff.c FatFs module.
ffconf.h Configuration file of FatFs module.
ff.h Common include file for FatFs and application module.
diskio.h Common include file for FatFs and disk I/O module.
diskio.c An example of glue function to attach existing disk I/O module to FatFs.
integer.h Integer type definitions for FatFs.
option Optional external modules.
Low level disk I/O module is not included in this archive because the FatFs
module is only a generic file system layer and it does not depend on any specific
storage device. You have to provide a low level disk I/O module written to
control the storage device that attached to the target system.

View File

@@ -0,0 +1,221 @@
@verbatim
******************************************************************************
* @file st_readme.txt
* @author MCD Application Team
* @brief This file lists the main modification done by STMicroelectronics on
* FatFs for integration with STM32Cube solution.
* For more details on FatFs implementation on STM32Cube, please refer
* to UM1721 "Developing Applications on STM32Cube with FatFs"
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics. All rights reserved.
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
@endverbatim
### V2.1.4/18-10-2019 ###
============================
+ Fix wrong usage of the "memcpy" in the SD_Write() function
- drivers/sd_diskio_dma_template_bspv1.c
- drivers/sd_diskio_dma_template_bspv2.c
- drivers/sd_diskio_dma_rtos_template_bspv1.c
- drivers/sd_diskio_dma_rtos_template_bspv2.c
+ correct the usage of the "_USE_MUTEX" config flag
- syscall.c
### V2.1.3/26-07-2019 ###
============================
+ add new BSPv2 templates:
- drivers/sd_diskio_dma_rtos_template_bspv2.c
- drivers/sd_diskio_dma_template_bspv2.c
- drivers/sd_diskio_template_bspv2.c
- drivers/sdram_diskio_template_bspv2.c
+ rename old template to "xxxx_diskio_template_bspv1.c":
- drivers/sd_diskio_dma_rtos_template_bspv1.c
- drivers/sd_diskio_dma_template_bspv1.c
- drivers/sd_diskio_template_bspv1.c
- drivers/sdram_diskio_template_bspv1.c
+ Add CMSIS-OSv2 support in templates, syscall.c and ff_conf_template.h
- syscall.c
- ff_conf_template.h
- drivers/sd_diskio_dma_rtos_template_bspv2.c
+ support usage of "osMutex" alongside "osSemaphore" as _SYNC_t type in fatfs
- syscall.c
- ff_conf_template.h
### V2.1.2/29-03-2019 ###
============================
+ add st_license.txt in the root directory
+ src/drivers/xxx_diskio_template.[c/h], src/ff_gen_drv.[c/h], src/option/syscall.c: update the license terms to BSD-3-Clause
### V2.1.1/25-01-2019 ###
============================
+ sd_diskio_dma_rtos_template.c
- Fix memory leak in the SD_Initialize()
- Disable the ENABLE_SD_DMA_CACHE_MAINTENANCE flag by default to fix a build error for CM4
- include correct diskio header file
+ sd_diskio_dma_template.c
- Correct the SD_read() function when enabling the ENABLE_SCRATCH_BUFFER flag
+ sd_diskio_dma_rtos_template.c sd_diskio_dma_template.c
- fix potential overflow when using SysTick.
### V2.1.0/21-09-2018 ###
============================
+ ff.c
- back-port a fix from 0.13, to correct an issue when using multi-threading
access in the same device due to a missing semaphore lock when calling
disk_status() API.
+ sd_diskio_dma_rtos_template.c
- Add support to CMSIS-RTOS V2 API
+ sd_diskio_dma_rtos_template.c sd_diskio_dma_template.c
- Add a compile flag "ENABLE_SCRATCH_BUFFER" to avoid misaligned access
caused buffer alignment constraint in some DMA versions.
- Add BSP_SD_ErrorCallback() and BSP_SD_AbortCallback() template functions.
### V2.0.2/17-November-2017 ###
============================
+ sdram_diskio_template.c sram_diskio_template.c
Fix wrong buffer size in the (SRAM/SDRAM)DISK_read(), (SRAM/SDRAM)DISK_write()
+ sd_diskio_template.c
- define a generic 'SD_TIMEOUT' based on the BSP drivers defines. This fixes
a build issue when using this driver with the Adafruit shield.
+ sd_diskio_dma_rtos_template.c
- add a check via osKernelRunning(), to avoid runtime errors due to
osMessageXXX calls that needs the "osKernelStart()" call done first.
+ sd_diskio_dma_template.c, sd_diskio_dma_rtos_template.c
- fix wrong address alignment when calling SCB_InvalidateDCache_by_Addr() and
SCB_CleanDCache_by_Addr(), the address has to be 32-Byte and not
32-bit aligned.
- fix BSP_SD_ReadCpltCallback() and BSP_SD_WriteCpltCallback() prototypes by
adding 'void' as argument to avoid IAR compiler errors
+ sd_diskio_template.c sd_diskio_dma_template.c, sd_diskio_dma_rtos_template.c
- add the flag "DISABLE_SD_INIT" to give the user the choice to initialize the SD
either in the application or in the FatFs diskio driver.
+ all xxx_diskio_template.c
- fix GET_BLOCK_SIZE ioctl call; the return value is in unit of sectors.
### V2.0.1/10-July-2017 ###
============================
+ sd_diskio_dma_template.c, sd_diskio_dma_rtos_template.c
- add the flag "ENABLE_SD_DMA_CACHE_MAINTENANCE", to enable cache maintenance at each read write operation.
This is useful for STM32F7/STM32H7 based platforms when using a cachable memory region.
- add timeout checks in SD_Read() and SD_Write() to give the control back to the application to decide in case of errors.
+ ff_gen_drv.c: fix a wrong check that causes an out of bound array access.
### V2.0.0/07-March-2017 ###
============================
+ Upgrade to use FatFS R0.12c. The R0.12c breaks the API compatibility with R0.11b.
- f_mkfs() API has a new signature.
- The _CODE_PAGE got new values.
- For more details check the files (doc/updates.txt) and the following urls:
http://elm-chan.org/fsw/ff/en/mkfs.html
http://elm-chan.org/fsw/ff/en/config.html
+ Add USB, RAMDISK and uSD template drivers under src/drivers.
- The diskio drivers aren't part of fatfs anymore, they are just templates instead.
- User has to copy the suitable template .c/.h file under the project, rename them by
removing the "_template" suffix then link them into the final application.
- The diskio driver .c/.h files have to be edited according to the used platform.
+ Define the macros "ff_malloc" and "ff_free" in the ff_conf_template.h and use
them in the syscall.c instead of direct calls to stdlib malloc and free functions.
+ Define the "__weak" attribute in diskio.c for the GNU GCC compiler
### V1.4.0/09-September-2016 ###
================================
+ Upgrade to use FatFs R0.12b.
+ ff_conf.h: remove the use of define "_USE_BUFF_WO_ALIGNMENT".
### V1.3.0/08-May-2015 ###
==========================
+ Upgrade to use FatFs R0.11.
+ Add new APIs FATFS_LinkDriverEx() and FATFS_UnLinkDriverEx() to manage USB Key Disk having
multi-lun capability. These APIs are equivalent to FATFS_LinkDriver() and FATFS_UnLinkDriver()
with "lun" parameter set to 0.
+ ff_conf.h: add new define "_USE_BUFF_WO_ALIGNMENT".
This option is available only for usbh diskio interface and allow to disable
the management of the unaligned buffer.
When STM32 USB OTG HS or FS IP is used with internal DMA enabled, this define
must be set to 0 to align data into 32bits through an internal scratch buffer
before being processed by the DMA . Otherwise (DMA not used), this define must
be set to 1 to avoid Data alignment and improve the performance.
Please note that if _USE_BUFF_WO_ALIGNMENT is set to 1 and an unaligned 32bits
buffer is forwarded to the FatFs Write/Read functions, an error will be returned.
(0: default value or 1: unaligned buffer return an error).
+ Important note:
For application code based on previous FatFs version; when moving to R0.11
the changes that need to be done is to update ffconf.h file, taking
ffconf_template.h file as reference.
### V1.2.1/20-November-2014 ###
===============================
+ Disk I/O drivers; change count argument type from BYTE to UINT
+ Important note:
For application code based on previous FatFs version; when moving to R0.10b
the only change that need to be done is to update ffconf.h file, taking
ffconf_template.h file as reference.
### V1.2.0/04-November-2014 ###
===============================
+ Upgrade to use FatFs R0.10b.
+ diskio.c: update disk_read() and disk_write() argument's type.
+ Important note:
For application code based on previous FatFs version; when moving to R0.10b
the only change that need to be done is to update ffconf.h file, taking
ffconf_template.h file as reference.
### V1.1.1/12-September-2014 ###
================================
+ ff_gen_drv.c: Update the Disk_drvTypeDef disk variable initialization to avoid
warnings detected with Atollic TrueSTUDIO Complier.
### V1.1.0/22-April-2014 ###
============================
+ Update sd_diskio to use SD BSP in polling mode instead of DMA mode (the scratch
buffer needed for DMA alignment is removed as well).
+ diskio.c and ff_gen_drv.c/.h: update to prevent multiple initialization.
### V1.0.0/18-February-2014 ###
===============================
+ First R0.10 customized version for STM32Cube solution.
* <h3><center>&copy; COPYRIGHT STMicroelectronics</center></h3>
*/