From f90428e298649c31af9523ab5abf3b9c17e4bcd9 Mon Sep 17 00:00:00 2001 From: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com> Date: Thu, 27 Feb 2020 17:06:03 -0800 Subject: [PATCH] Sync with the distribution in FreeRTOS-Labs at commit 1ad51506443ab5550fbdde9c27a84b5879dd2a73. --- History2.txt | 66 +++ ff_crc.c | 29 +- ff_dev_support.c | 29 +- ff_dir.c | 43 +- ff_error.c | 29 +- ff_fat.c | 29 +- ff_file.c | 41 +- ff_format.c | 29 +- ff_ioman.c | 29 +- ff_locking.c | 96 +++-- ff_locking.org.c | 262 ++++++++++++ ff_memory.c | 29 +- ff_stdio.c | 57 ++- ff_string.c | 29 +- ff_sys.c | 29 +- ff_time.c | 29 +- include/FreeRTOSFATConfigDefaults.h | 29 +- include/FreeRTOS_errno_FAT.h | 29 +- include/ff_crc.h | 29 +- include/ff_devices.h | 31 +- include/ff_dir.h | 31 +- include/ff_error.h | 29 +- include/ff_fat.h | 31 +- include/ff_fatdef.h | 29 +- include/ff_file.h | 31 +- include/ff_format.h | 31 +- include/ff_headers.h | 29 +- include/ff_ioman.h | 37 +- include/ff_locking.h | 29 +- include/ff_memory.h | 29 +- include/ff_old_config_defines.h | 29 +- include/ff_stdio.h | 34 +- include/ff_string.h | 29 +- include/ff_sys.h | 29 +- include/ff_time.h | 29 +- portable/ATSAM4E/ff_sddisk.c | 29 +- portable/ATSAM4E/ff_sddisk_r.c | 552 ++++++++++++++++++++++++++ portable/STM32F4xx/ff_sddisk.c | 41 +- portable/STM32F4xx/stm32f4xx_hal_sd.c | 10 +- portable/STM32F7xx/ff_sddisk.c | 70 +--- portable/Zynq/ff_sddisk.c | 32 +- portable/Zynq/xsdps.c | 8 + portable/avr32_uc3/ff_flush.h | 29 +- portable/avr32_uc3/ff_locking.c | 29 +- portable/common/ff_ramdisk.c | 29 +- portable/common/ff_ramdisk.h | 29 +- portable/common/ff_sddisk.h | 29 +- portable/lpc18xx/ff_sddisk.c | 29 +- 48 files changed, 1161 insertions(+), 1184 deletions(-) create mode 100644 History2.txt create mode 100644 ff_locking.org.c create mode 100644 portable/ATSAM4E/ff_sddisk_r.c diff --git a/History2.txt b/History2.txt new file mode 100644 index 0000000..8525b0f --- /dev/null +++ b/History2.txt @@ -0,0 +1,66 @@ +> is there a repository I should be aware of when it comes to FreeRTOS Labs? + +Unfortunately there isn't. FreeRTOS+FAT has become a bit of an orphan. All time and energy goes to the products in the [AWS/FreeRTOS release](https://github.com/aws/amazon-freertos) +But I am still actively maintaining FreeRTOS+FAT: implementing requests and fixes. + +Please comment your findings with the above +FAT release. + +Here is a complete list of all changes since the 160919 Labs release: + +● `ff_dir.c : FF_MkDir()` +refuse to create a directory with an empty name + +● `ff_fat.c : FF_GetFreeSize()` +in case of an error, return 0 + +● `ff_file.c : FF_FileSize()` +This function returns the size of a file, or a negative number in case of an error. +Hence, the maximum size returned was returned is 2 GB. +We've added a new function: +`FF_Error_t FF_GetFileSize( FF_FILE *pxFile, uint32_t *pulSize );` +which separates the length from the error code. + +● `ff_file.c : FF_ExtendFile()` +Sometimes while building up a file, it may be more efficient not to flush the changes immediately. When defining `ffconfigFILE_EXTEND_FLUSHES_BUFFERS` as `0`, there is no immediate flushing. + +● `ff_file.c : FF_Seek()` +Seeking didn't work for sizes larger than 2 GB. Although the parameter `int32_t lOffset` is signed, it will now be casted to 32-bits unsigned: +`ulPosition = ( uint32_t )lOffset;` +All options (`SET`, `CUR`, and `END` ) re-tested. + +● `ff_file.c : FF_Close()` +`FF_FlushCache()` is now called at the end of the function in order to also write the last changes. + +● `ff_format.c : FF_Format()` +A variable `lRemaining` should have been declared unsigned: `uint32_t`. +Also: a small optimisation for large SD-cards: +"Putting the FAT-table into the second 4MB erase block gives a higher performance and a longer life-time" + +● `ff_format.c : FF_Partition()` +`ulHiddenSectors` must be at least `1` +( see [this post](https://sourceforge.net/p/freertos/discussion/382005/thread/d2b6524a/?limit=250#e1ea) ) + +● `ff_ioman.c : FF_CreateIOManger()` +`FF_CreateEvents` shall only be called in case an `pxIOManager` was successfully created. + +● `ff_ioman.c : FF_DeleteIOManager()` +Added a call to `FF_DeleteEvents()`, which will delete the event group belonging to the I/O manager. + +● `ff_ioman.c : FF_FlushCache()` +Added a user application hook per disk: `fnFlushApplicationHook()`. This is useful for e.g. NAND-drivers. + +● `ff_ioman.c : FF_Mount()` +Make sure that `pcVolumeLabel` is null-terminated. + +● `ff_ioman.c : FF_IncreaseFreeClusters()` +A lock is needed before `ulLastFreeCluster` can be changed. But before taking this lock, check if has already been taken to avoid a dead lock. + +● `ff_locking.c : FF_DeleteEvents` +This is a new function which deletes ( frees up ) the event group belonging to an I/O manager. + +● `ff_stdio.c : ff_filelength()` +This function will now call `FF_GetFileSize()` in order to get the `unsigned` length of a file, increasing the maximum reported size from 2 to 4 GB. + +● `ff_sys.c : *` +This module combines several I/O managers ( = disks ) into a single file system that starts with a root `"/"`. +All code has been re-written ( re-styled ) and re-tested. diff --git a/ff_crc.c b/ff_crc.c index c7f7d72..a313ebd 100755 --- a/ff_crc.c +++ b/ff_crc.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/ff_dev_support.c b/ff_dev_support.c index b7bf621..ac7120f 100755 --- a/ff_dev_support.c +++ b/ff_dev_support.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/ff_dir.c b/ff_dir.c index 07d6e50..d46bdc3 100755 --- a/ff_dir.c +++ b/ff_dir.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -2197,7 +2174,7 @@ FF_DirEnt_t xMyDirectory; FF_Error_t xResult = 0; BaseType_t xIndex, x, y; uint16_t NameLen; -char pcNumberBuf[6]; +char pcNumberBuf[ 12 ]; uint32_t ulCluster; #if( ffconfigUNICODE_UTF16_SUPPORT != 0 ) @@ -2280,7 +2257,7 @@ uint32_t ulCluster; */ if( xIndex <= 4 ) { - sprintf( pcNumberBuf, "%d", ( int ) xIndex ); + snprintf( pcNumberBuf, sizeof( pcNumberBuf ), "%d", ( int ) xIndex ); } else { @@ -2293,12 +2270,12 @@ uint32_t ulCluster; { usShortHash = FF_GetCRC16( ( uint8_t *)&usShortHash, sizeof( usShortHash ) ); } - sprintf( pcNumberBuf, "%04X", ( int ) usShortHash ); + snprintf( pcNumberBuf, sizeof( pcNumberBuf ), "%04X", ( int ) usShortHash ); } } #else { - sprintf( pcNumberBuf, "%d", ( int ) xIndex ); + snprintf( pcNumberBuf, sizeof( pcNumberBuf ), "%d", ( int ) xIndex ); } #endif @@ -3020,6 +2997,12 @@ FF_FindParams_t xFindParams; xIndex = 1; } + if( pcDirName[ 0 ] == '\0' ) + { + xError = ( FF_ERR_DIR_OBJECT_EXISTS | FF_MKDIR ); + break; + } + xFindParams.ulDirCluster = FF_FindDir( pxIOManager, pcPath, ( uint16_t ) xIndex, &xError ); if( FF_isERR( xError ) ) diff --git a/ff_error.c b/ff_error.c index e3695c4..af85d6b 100755 --- a/ff_error.c +++ b/ff_error.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/ff_fat.c b/ff_fat.c index 2815b03..b7c2e11 100755 --- a/ff_fat.c +++ b/ff_fat.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/ff_file.c b/ff_file.c index 3057db0..c5ae2d1 100755 --- a/ff_file.c +++ b/ff_file.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -63,14 +40,6 @@ #include #endif -/* _HT_ the default value for 'ffconfigFILE_EXTEND_FLUSHES_BUFFERS' -equals 1, and it should be defined in FreeRTOSFATConfigDefaults.h. */ -#ifndef ffconfigFILE_EXTEND_FLUSHES_BUFFERS - #define ffconfigFILE_EXTEND_FLUSHES_BUFFERS 1 -#endif - -/*-----------------------------------------------------------*/ - static FF_Error_t FF_Truncate( FF_FILE *pxFile, BaseType_t bClosing ); static int32_t FF_ReadPartial( FF_FILE *pxFile, uint32_t ulItemLBA, uint32_t ulRelBlockPos, uint32_t ulCount, @@ -2369,7 +2338,7 @@ FF_Error_t xResult; FF_Error_t FF_Seek( FF_FILE *pxFile, int32_t lOffset, BaseType_t xOrigin ) { FF_Error_t xError; -uint32_t ulPosition; +uint32_t ulPosition = 0ul; xError = FF_CheckValid( pxFile ); @@ -2967,12 +2936,10 @@ FF_Error_t xError; } } #endif - if( FF_isERR( xError ) == pdFALSE ) { xError = FF_FlushCache( pxFile->pxIOManager ); /* Ensure all modified blocks are flushed to disk! */ } - ffconfigFREE( pxFile ); } while( pdFALSE ); diff --git a/ff_format.c b/ff_format.c index b9076b5..6454dd4 100755 --- a/ff_format.c +++ b/ff_format.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/ff_ioman.c b/ff_ioman.c index ba5a68d..b418906 100755 --- a/ff_ioman.c +++ b/ff_ioman.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/ff_locking.c b/ff_locking.c index b80a466..c064229 100755 --- a/ff_locking.c +++ b/ff_locking.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -53,6 +30,8 @@ /* Scheduler include files. */ #include "FreeRTOS.h" +#include "task.h" +#include "semphr.h" #include "ff_headers.h" #include "event_groups.h" @@ -84,6 +63,11 @@ BaseType_t FF_TrySemaphore( void *pxSemaphore, uint32_t ulTime_ms ) { BaseType_t xReturn; + /* HT: Actually FF_TrySemaphore is never used. */ + if( xTaskGetSchedulerState() != taskSCHEDULER_RUNNING ) + { + return 0; + } configASSERT( pxSemaphore ); xReturn = xSemaphoreTakeRecursive( ( SemaphoreHandle_t ) pxSemaphore, pdMS_TO_TICKS( ulTime_ms ) ); return xReturn; @@ -92,6 +76,11 @@ BaseType_t xReturn; void FF_PendSemaphore( void *pxSemaphore ) { + if( xTaskGetSchedulerState() != taskSCHEDULER_RUNNING ) + { + /* No need to take the semaphore. */ + return; + } configASSERT( pxSemaphore ); xSemaphoreTakeRecursive( ( SemaphoreHandle_t ) pxSemaphore, portMAX_DELAY ); } @@ -99,6 +88,11 @@ void FF_PendSemaphore( void *pxSemaphore ) void FF_ReleaseSemaphore( void *pxSemaphore ) { + if( xTaskGetSchedulerState() != taskSCHEDULER_RUNNING ) + { + /* Scheduler not yet active. */ + return; + } configASSERT( pxSemaphore ); xSemaphoreGiveRecursive( ( SemaphoreHandle_t ) pxSemaphore ); } @@ -106,6 +100,12 @@ void FF_ReleaseSemaphore( void *pxSemaphore ) void FF_Sleep( uint32_t ulTime_ms ) { + if( xTaskGetSchedulerState() != taskSCHEDULER_RUNNING ) + { + /* This sleep is used as a kind of yield. + Not necessary while the Scheduler does not run. */ + return; + } vTaskDelay( pdMS_TO_TICKS( ulTime_ms ) ); } /*-----------------------------------------------------------*/ @@ -143,6 +143,11 @@ void FF_LockDirectory( FF_IOManager_t *pxIOManager ) { EventBits_t xBits; + if( xTaskGetSchedulerState() != taskSCHEDULER_RUNNING ) + { + /* Scheduler not yet active. */ + return; + } for( ;; ) { /* Called when a task want to make changes to a directory. @@ -169,6 +174,11 @@ void FF_LockDirectory( FF_IOManager_t *pxIOManager ) void FF_UnlockDirectory( FF_IOManager_t *pxIOManager ) { + if( xTaskGetSchedulerState() != taskSCHEDULER_RUNNING ) + { + /* Scheduler not yet active. */ + return; + } configASSERT( ( xEventGroupGetBits( pxIOManager->xEventGroup ) & FF_DIR_LOCK_EVENT_BITS ) == 0 ); xEventGroupSetBits( pxIOManager->xEventGroup, FF_DIR_LOCK_EVENT_BITS ); } @@ -178,6 +188,11 @@ int FF_Has_Lock( FF_IOManager_t *pxIOManager, uint32_t aBits ) { int iReturn; + if( xTaskGetSchedulerState() != taskSCHEDULER_RUNNING ) + { + /* Scheduler not yet active. */ + return 0; + } void *handle = xTaskGetCurrentTaskHandle(); if( ( aBits & FF_FAT_LOCK_EVENT_BITS ) != 0 ) { @@ -199,7 +214,14 @@ int iReturn; void FF_Assert_Lock( FF_IOManager_t *pxIOManager, uint32_t aBits ) { - void *handle = xTaskGetCurrentTaskHandle(); + void *handle; + + if( xTaskGetSchedulerState() != taskSCHEDULER_RUNNING ) + { + /* Scheduler not yet active. */ + return; + } + handle = xTaskGetCurrentTaskHandle(); if( ( aBits & FF_FAT_LOCK_EVENT_BITS ) != 0 ) { @@ -215,6 +237,11 @@ void FF_LockFAT( FF_IOManager_t *pxIOManager ) { EventBits_t xBits; + if( xTaskGetSchedulerState() != taskSCHEDULER_RUNNING ) + { + /* Scheduler not yet active. */ + return; + } configASSERT( FF_Has_Lock( pxIOManager, FF_FAT_LOCK ) == pdFALSE ); for( ;; ) @@ -244,6 +271,11 @@ EventBits_t xBits; void FF_UnlockFAT( FF_IOManager_t *pxIOManager ) { + if( xTaskGetSchedulerState() != taskSCHEDULER_RUNNING ) + { + /* Scheduler not yet active. */ + return; + } configASSERT( ( xEventGroupGetBits( pxIOManager->xEventGroup ) & FF_FAT_LOCK_EVENT_BITS ) == 0 ); pxIOManager->pvFATLockHandle = NULL; xEventGroupSetBits( pxIOManager->xEventGroup, FF_FAT_LOCK_EVENT_BITS ); @@ -255,6 +287,11 @@ BaseType_t FF_BufferWait( FF_IOManager_t *pxIOManager, uint32_t xWaitMS ) EventBits_t xBits; BaseType_t xReturn; + if( xTaskGetSchedulerState() != taskSCHEDULER_RUNNING ) + { + /* Scheduler not yet active. */ + return pdTRUE; + } /* This function is called when a task is waiting for a sector buffer to become available. */ xBits = xEventGroupWaitBits( pxIOManager->xEventGroup, @@ -277,6 +314,11 @@ BaseType_t xReturn; void FF_BufferProceed( FF_IOManager_t *pxIOManager ) { + if( xTaskGetSchedulerState() != taskSCHEDULER_RUNNING ) + { + /* Scheduler not yet active. */ + return; + } /* Wake-up all tasks that are waiting for a sector buffer to become available. */ xEventGroupSetBits( pxIOManager->xEventGroup, FF_BUF_LOCK_EVENT_BITS ); } diff --git a/ff_locking.org.c b/ff_locking.org.c new file mode 100644 index 0000000..c5ec3f3 --- /dev/null +++ b/ff_locking.org.c @@ -0,0 +1,262 @@ +/* + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Authors include James Walmsley, Hein Tibosch and Richard Barry + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * https://www.FreeRTOS.org + * + */ + +#include +#include +#include + +/* Scheduler include files. */ +#include "FreeRTOS.h" +#include "task.h" +#include "semphr.h" +#include "ff_headers.h" +#include "event_groups.h" + +#ifndef configUSE_RECURSIVE_MUTEXES + #error configUSE_RECURSIVE_MUTEXES must be set to 1 in FreeRTOSConfig.h +#else + #if( configUSE_RECURSIVE_MUTEXES != 1 ) + #error configUSE_RECURSIVE_MUTEXES must be set to 1 in FreeRTOSConfig.h + #endif +#endif /* configUSE_RECURSIVE_MUTEXES */ + +#if ( INCLUDE_vTaskDelay != 1 ) + #error Missing some FreeRTOS define +#endif + +/* There are two areas which are protected with a semaphore: +Directories and the FAT area. +The masks below are used when calling Group Event functions. */ +#define FF_FAT_LOCK_EVENT_BITS ( ( const EventBits_t ) FF_FAT_LOCK ) +#define FF_DIR_LOCK_EVENT_BITS ( ( const EventBits_t ) FF_DIR_LOCK ) + +/* This is not a real lock: it is a bit (or semaphore) will will be given +each time when a sector buffer is released. */ +#define FF_BUF_LOCK_EVENT_BITS ( ( const EventBits_t ) FF_BUF_LOCK ) + +/*-----------------------------------------------------------*/ + +BaseType_t FF_TrySemaphore( void *pxSemaphore, uint32_t ulTime_ms ) +{ +BaseType_t xReturn; + + configASSERT( pxSemaphore ); + xReturn = xSemaphoreTakeRecursive( ( SemaphoreHandle_t ) pxSemaphore, pdMS_TO_TICKS( ulTime_ms ) ); + return xReturn; +} +/*-----------------------------------------------------------*/ + +void FF_PendSemaphore( void *pxSemaphore ) +{ + configASSERT( pxSemaphore ); + xSemaphoreTakeRecursive( ( SemaphoreHandle_t ) pxSemaphore, portMAX_DELAY ); +} +/*-----------------------------------------------------------*/ + +void FF_ReleaseSemaphore( void *pxSemaphore ) +{ + configASSERT( pxSemaphore ); + xSemaphoreGiveRecursive( ( SemaphoreHandle_t ) pxSemaphore ); +} +/*-----------------------------------------------------------*/ + +void FF_Sleep( uint32_t ulTime_ms ) +{ + vTaskDelay( pdMS_TO_TICKS( ulTime_ms ) ); +} +/*-----------------------------------------------------------*/ + +void FF_DeleteEvents( FF_IOManager_t *pxIOManager ) +{ + if( pxIOManager->xEventGroup != NULL ) + { + vEventGroupDelete( pxIOManager->xEventGroup ); + } +} +/*-----------------------------------------------------------*/ + +BaseType_t FF_CreateEvents( FF_IOManager_t *pxIOManager ) +{ +BaseType_t xResult; + + pxIOManager->xEventGroup = xEventGroupCreate(); + if( pxIOManager->xEventGroup != NULL ) + { + xEventGroupSetBits( pxIOManager->xEventGroup, + FF_FAT_LOCK_EVENT_BITS | FF_DIR_LOCK_EVENT_BITS | FF_BUF_LOCK_EVENT_BITS ); + xResult = pdTRUE; + } + else + { + xResult = pdFALSE; + } + + return xResult; +} +/*-----------------------------------------------------------*/ + +void FF_LockDirectory( FF_IOManager_t *pxIOManager ) +{ + EventBits_t xBits; + + for( ;; ) + { + /* Called when a task want to make changes to a directory. + First it waits for the desired bit to come high. */ + xEventGroupWaitBits( pxIOManager->xEventGroup, + FF_DIR_LOCK_EVENT_BITS, /* uxBitsToWaitFor */ + ( EventBits_t )0, /* xClearOnExit */ + pdFALSE, /* xWaitForAllBits n.a. */ + pdMS_TO_TICKS( 10000UL ) ); + + /* The next operation will only succeed for 1 task at a time, + because it is an atomary test & set operation: */ + xBits = xEventGroupClearBits( pxIOManager->xEventGroup, FF_DIR_LOCK_EVENT_BITS ); + + if( ( xBits & FF_DIR_LOCK_EVENT_BITS ) != 0 ) + { + /* This task has cleared the desired bit. + It now 'owns' the resource. */ + break; + } + } +} +/*-----------------------------------------------------------*/ + +void FF_UnlockDirectory( FF_IOManager_t *pxIOManager ) +{ + configASSERT( ( xEventGroupGetBits( pxIOManager->xEventGroup ) & FF_DIR_LOCK_EVENT_BITS ) == 0 ); + xEventGroupSetBits( pxIOManager->xEventGroup, FF_DIR_LOCK_EVENT_BITS ); +} +/*-----------------------------------------------------------*/ + +int FF_Has_Lock( FF_IOManager_t *pxIOManager, uint32_t aBits ) +{ +int iReturn; + + void *handle = xTaskGetCurrentTaskHandle(); + if( ( aBits & FF_FAT_LOCK_EVENT_BITS ) != 0 ) + { + if( ( pxIOManager->pvFATLockHandle != NULL ) && ( pxIOManager->pvFATLockHandle == handle ) ) + { + iReturn = pdTRUE; + } + else + { + iReturn = pdFALSE; + } + } + else + { + iReturn = pdFALSE; + } + return iReturn; +} + +void FF_Assert_Lock( FF_IOManager_t *pxIOManager, uint32_t aBits ) +{ + void *handle = xTaskGetCurrentTaskHandle(); + + if( ( aBits & FF_FAT_LOCK_EVENT_BITS ) != 0 ) + { + configASSERT( ( pxIOManager->pvFATLockHandle != NULL ) && ( pxIOManager->pvFATLockHandle == handle ) ); + + /* In case configASSERT() is not defined. */ + ( void ) pxIOManager; + ( void ) handle; + } +} + +void FF_LockFAT( FF_IOManager_t *pxIOManager ) +{ +EventBits_t xBits; + + configASSERT( FF_Has_Lock( pxIOManager, FF_FAT_LOCK ) == pdFALSE ); + + for( ;; ) + { + /* Called when a task want to make changes to the FAT area. + First it waits for the desired bit to come high. */ + xEventGroupWaitBits( pxIOManager->xEventGroup, + FF_FAT_LOCK_EVENT_BITS, /* uxBitsToWaitFor */ + ( EventBits_t )0, /* xClearOnExit */ + pdFALSE, /* xWaitForAllBits n.a. */ + pdMS_TO_TICKS( 10000UL ) ); + + /* The next operation will only succeed for 1 task at a time, + because it is an atomary test & set operation: */ + xBits = xEventGroupClearBits( pxIOManager->xEventGroup, FF_FAT_LOCK_EVENT_BITS ); + + if( ( xBits & FF_FAT_LOCK_EVENT_BITS ) != 0 ) + { + /* This task has cleared the desired bit. + It now 'owns' the resource. */ + pxIOManager->pvFATLockHandle = xTaskGetCurrentTaskHandle(); + break; + } + } +} +/*-----------------------------------------------------------*/ + +void FF_UnlockFAT( FF_IOManager_t *pxIOManager ) +{ + configASSERT( ( xEventGroupGetBits( pxIOManager->xEventGroup ) & FF_FAT_LOCK_EVENT_BITS ) == 0 ); + pxIOManager->pvFATLockHandle = NULL; + xEventGroupSetBits( pxIOManager->xEventGroup, FF_FAT_LOCK_EVENT_BITS ); +} +/*-----------------------------------------------------------*/ + +BaseType_t FF_BufferWait( FF_IOManager_t *pxIOManager, uint32_t xWaitMS ) +{ +EventBits_t xBits; +BaseType_t xReturn; + + /* This function is called when a task is waiting for a sector buffer + to become available. */ + xBits = xEventGroupWaitBits( pxIOManager->xEventGroup, + FF_BUF_LOCK_EVENT_BITS, /* uxBitsToWaitFor */ + FF_BUF_LOCK_EVENT_BITS, /* xClearOnExit */ + pdFALSE, /* xWaitForAllBits n.a. */ + pdMS_TO_TICKS( xWaitMS ) ); + if( ( xBits & FF_BUF_LOCK_EVENT_BITS ) != 0 ) + { + xReturn = pdTRUE; + } + else + { + xReturn = pdFALSE; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +void FF_BufferProceed( FF_IOManager_t *pxIOManager ) +{ + /* Wake-up all tasks that are waiting for a sector buffer to become available. */ + xEventGroupSetBits( pxIOManager->xEventGroup, FF_BUF_LOCK_EVENT_BITS ); +} +/*-----------------------------------------------------------*/ diff --git a/ff_memory.c b/ff_memory.c index 15825bb..ec3e073 100755 --- a/ff_memory.c +++ b/ff_memory.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/ff_stdio.c b/ff_stdio.c index 59cf993..e304313 100755 --- a/ff_stdio.c +++ b/ff_stdio.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -98,7 +75,7 @@ in a call to ff_truncate(). */ * Add the CWD to the beginning of a relative path, and copy the resultant * absolute path into a thread local non const buffer. */ - static const char *prvABSPath( const char *pcPath ); + /*static*/ const char *prvABSPath( const char *pcPath ); /* * Lookup the CWD of the current task. @@ -120,7 +97,7 @@ in a call to ff_truncate(). */ /* Only absolute paths are supported so define away the prvABSPath() function. */ - static const char *prvABSPath( const char *pcPath ) + /*static*/ const char *prvABSPath( const char *pcPath ) { return pcPath; } @@ -142,7 +119,7 @@ in a call to ff_truncate(). */ * If the value represents an error, it is negative * The return value of this function will always be positive */ -static int prvFFErrorToErrno( FF_Error_t xError ); +int prvFFErrorToErrno( FF_Error_t xError ); /* * Generate a time stamp for the file. @@ -1770,7 +1747,7 @@ uint32_t ulLength; #endif /* ffconfigUSE_DELTREE */ /*-----------------------------------------------------------*/ -static int prvFFErrorToErrno( FF_Error_t xError ) +int prvFFErrorToErrno( FF_Error_t xError ) { if( FF_isERR( xError ) == pdFALSE ) { @@ -1852,6 +1829,24 @@ static int prvFFErrorToErrno( FF_Error_t xError ) } /*-----------------------------------------------------------*/ +#if( ffconfigHAS_CWD == 1 ) + + void ff_free_CWD_space( void ) + { + WorkingDirectory_t *pxSpace; + + /* Obtain the CWD used by the current task. */ + pxSpace = ( WorkingDirectory_t * ) pvTaskGetThreadLocalStoragePointer( NULL, stdioCWD_THREAD_LOCAL_OFFSET ); + if( pxSpace != NULL ) + { + vTaskSetThreadLocalStoragePointer( NULL, stdioCWD_THREAD_LOCAL_OFFSET, ( void * ) NULL ); + ffconfigFREE( pxSpace ); + } + } + +#endif /* ffconfigHAS_CWD */ +/*-----------------------------------------------------------*/ + #if( ffconfigHAS_CWD == 1 ) static WorkingDirectory_t *pxFindCWD( void ) @@ -1967,7 +1962,7 @@ static int prvFFErrorToErrno( FF_Error_t xError ) #if( ffconfigHAS_CWD == 1 ) - static const char *prvABSPath( const char *pcPath ) + /*static*/ const char *prvABSPath( const char *pcPath ) { char *pcReturn; WorkingDirectory_t *pxWorkingDirectory = pxFindCWD(); diff --git a/ff_string.c b/ff_string.c index d2539fd..a517a99 100755 --- a/ff_string.c +++ b/ff_string.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/ff_sys.c b/ff_sys.c index 48c1635..be00ac1 100755 --- a/ff_sys.c +++ b/ff_sys.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/ff_time.c b/ff_time.c index 55b3b81..81888a5 100755 --- a/ff_time.c +++ b/ff_time.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/include/FreeRTOSFATConfigDefaults.h b/include/FreeRTOSFATConfigDefaults.h index 896633f..b6b8e29 100755 --- a/include/FreeRTOSFATConfigDefaults.h +++ b/include/FreeRTOSFATConfigDefaults.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/include/FreeRTOS_errno_FAT.h b/include/FreeRTOS_errno_FAT.h index 89d4528..1dae928 100755 --- a/include/FreeRTOS_errno_FAT.h +++ b/include/FreeRTOS_errno_FAT.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/include/ff_crc.h b/include/ff_crc.h index 0c14492..35a12a5 100755 --- a/include/ff_crc.h +++ b/include/ff_crc.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/include/ff_devices.h b/include/ff_devices.h index 22c656e..cf536ee 100755 --- a/include/ff_devices.h +++ b/include/ff_devices.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -54,7 +31,7 @@ #define FF_DEVICES_H #ifndef PLUS_FAT_H - #error this header will be included from "plusfat.h" + #error this header will be included from "ff_headers.h" #endif #ifdef __cplusplus diff --git a/include/ff_dir.h b/include/ff_dir.h index 3d0d4bc..5666825 100755 --- a/include/ff_dir.h +++ b/include/ff_dir.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -56,7 +33,7 @@ #define _FF_DIR_H_ #ifndef PLUS_FAT_H - #error this header will be included from "plusfat.h" + #error this header will be included from "ff_headers.h" #endif #define FIND_FLAG_SHORTNAME_SET 0x01u diff --git a/include/ff_error.h b/include/ff_error.h index 033a07f..18e0f7c 100755 --- a/include/ff_error.h +++ b/include/ff_error.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/include/ff_fat.h b/include/ff_fat.h index dd606c5..7c8c62d 100755 --- a/include/ff_fat.h +++ b/include/ff_fat.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -56,7 +33,7 @@ #define _FF_FAT_H_ #ifndef PLUS_FAT_H - #error this header will be included from "plusfat.h" + #error this header will be included from "ff_headers.h" #endif /*---------- ERROR CODES */ diff --git a/include/ff_fatdef.h b/include/ff_fatdef.h index 9bc3bcb..506a175 100755 --- a/include/ff_fatdef.h +++ b/include/ff_fatdef.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/include/ff_file.h b/include/ff_file.h index aba4e21..8e20bf4 100755 --- a/include/ff_file.h +++ b/include/ff_file.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -55,7 +32,7 @@ #define _FF_FILE_H_ #ifndef PLUS_FAT_H - #error this header will be included from "plusfat.h" + #error this header will be included from "ff_headers.h" #endif #define FF_SEEK_SET 0 diff --git a/include/ff_format.h b/include/ff_format.h index 76f4426..73277bf 100755 --- a/include/ff_format.h +++ b/include/ff_format.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -63,7 +40,7 @@ extern "C" { #ifndef PLUS_FAT_H - #error this header will be included from "plusfat.h" + #error this header will be included from "ff_headers.h" #endif /*---------- PROTOTYPES */ diff --git a/include/ff_headers.h b/include/ff_headers.h index ce7fee3..abb49c5 100755 --- a/include/ff_headers.h +++ b/include/ff_headers.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/include/ff_ioman.h b/include/ff_ioman.h index 83309a0..3a2b901 100755 --- a/include/ff_ioman.h +++ b/include/ff_ioman.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -62,7 +39,7 @@ extern "C" { #include /* Use of malloc() */ #ifndef PLUS_FAT_H - #error this header will be included from "plusfat.h" + #error this header will be included from "ff_headers.h" #endif #define FF_T_FAT12 0x0A @@ -390,6 +367,12 @@ void FF_ReadParts( uint8_t *pucBuffer, FF_Part_t *pxParts ); */ FF_Error_t FF_PartitionSearch( FF_IOManager_t *pxIOManager, FF_SPartFound_t *pPartsFound ); +/* HT : for debugging only. */ +BaseType_t xIsFatSector( FF_IOManager_t *pxIOManager, uint32_t ulSectorNr ); +BaseType_t xNeedLogging( FF_IOManager_t *pxIOManager ); +BaseType_t xIsRootDirSector( FF_IOManager_t *pxIOManager, uint32_t ulSectorNr ); +const char *pcSectorType( FF_IOManager_t *pxIOManager, uint32_t ulSectorNr ); + /* Needed to make this public/private to be used in FF_Partition/FF_Format. */ void FF_IOMAN_InitBufferDescriptors( FF_IOManager_t *pxIOManager ); diff --git a/include/ff_locking.h b/include/ff_locking.h index 3ac85d8..903b081 100755 --- a/include/ff_locking.h +++ b/include/ff_locking.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/include/ff_memory.h b/include/ff_memory.h index 4fa1d57..46704b4 100755 --- a/include/ff_memory.h +++ b/include/ff_memory.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/include/ff_old_config_defines.h b/include/ff_old_config_defines.h index 5d75c88..9f7b924 100755 --- a/include/ff_old_config_defines.h +++ b/include/ff_old_config_defines.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/include/ff_stdio.h b/include/ff_stdio.h index 23a1dae..7ce475e 100755 --- a/include/ff_stdio.h +++ b/include/ff_stdio.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -355,6 +332,11 @@ int ff_isdirempty(const char *pcPath ); #endif int ff_finddir( const char *pcPath ); +#if( ffconfigHAS_CWD == 1 ) + /* Obtain the CWD used by the current task. */ + void ff_free_CWD_space( void ); +#endif + typedef enum _EFileAction { eFileCreate, eFileRemove, diff --git a/include/ff_string.h b/include/ff_string.h index b502a26..d8e3882 100755 --- a/include/ff_string.h +++ b/include/ff_string.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/include/ff_sys.h b/include/ff_sys.h index 029a65e..ab9cc9b 100755 --- a/include/ff_sys.h +++ b/include/ff_sys.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/include/ff_time.h b/include/ff_time.h index 283e1f0..858b924 100755 --- a/include/ff_time.h +++ b/include/ff_time.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/portable/ATSAM4E/ff_sddisk.c b/portable/ATSAM4E/ff_sddisk.c index a816d97..4ba7472 100755 --- a/portable/ATSAM4E/ff_sddisk.c +++ b/portable/ATSAM4E/ff_sddisk.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/portable/ATSAM4E/ff_sddisk_r.c b/portable/ATSAM4E/ff_sddisk_r.c new file mode 100644 index 0000000..9a2c3bd --- /dev/null +++ b/portable/ATSAM4E/ff_sddisk_r.c @@ -0,0 +1,552 @@ +/* + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Authors include James Walmsley, Hein Tibosch and Richard Barry + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * https://www.FreeRTOS.org + * + */ + +/* Standard includes. */ +#include +#include +#include +#include + +/* FreeRTOS includes. */ +#include "FreeRTOS.h" +#include "task.h" +#include "semphr.h" +#include "portmacro.h" + +/* FreeRTOS+FAT includes. */ +#include "ff_sddisk.h" +#include "ff_sys.h" + +/* Atmel includes. */ +#include + +/* Misc definitions. */ +#define sdSIGNATURE 0x41404342UL +#define sdHUNDRED_64_BIT ( 100ull ) +#define sdBYTES_PER_MB ( 1024ull * 1024ull ) +#define sdSECTORS_PER_MB ( sdBYTES_PER_MB / 512ull ) +#define sdIOMAN_MEM_SIZE 4096 +#define xSDCardInfo ( sd_mmc_cards[ 0 ] ) + +/*-----------------------------------------------------------*/ + +/* + * Return pdFALSE if the SD card is not inserted. + */ +static BaseType_t prvSDDetect( void ); + +/* + * Check if the card is present, and if so, print out some info on the card. + */ +static BaseType_t prvSDMMCInit( BaseType_t xDriveNumber ); + +/*-----------------------------------------------------------*/ + +/* + * Mutex for partition. + */ +static SemaphoreHandle_t xPlusFATMutex = NULL; + +/* + * Remembers if the card is currently considered to be present. + */ +static BaseType_t xSDCardStatus = pdFALSE; + +/*-----------------------------------------------------------*/ + +static int32_t prvFFRead( uint8_t *pucBuffer, uint32_t ulSectorNumber, uint32_t ulSectorCount, FF_Disk_t *pxDisk ) +{ +int32_t lReturnCode = FF_ERR_IOMAN_OUT_OF_BOUNDS_READ | FF_ERRFLAG, lResult; + + if( ( pxDisk != NULL ) && + ( xSDCardStatus == pdPASS ) && + ( pxDisk->ulSignature == sdSIGNATURE ) && + ( pxDisk->xStatus.bIsInitialised != pdFALSE ) && + ( ulSectorNumber < pxDisk->ulNumberOfSectors ) && + ( ( pxDisk->ulNumberOfSectors - ulSectorNumber ) >= ulSectorCount ) ) + { + lResult = sd_physical_read( ulSectorNumber, pucBuffer, ulSectorCount); + + if( lResult != pdFALSE ) + { + lReturnCode = 0L; + } + else + { + /* Some error occurred. */ + FF_PRINTF( "prvFFRead: %lu: %lu\n", ulSectorNumber, lResult ); + } + } + else + { + /* Make sure no random data is in the returned buffer. */ + memset( ( void * ) pucBuffer, '\0', ulSectorCount * 512UL ); + + if( pxDisk->xStatus.bIsInitialised != pdFALSE ) + { + FF_PRINTF( "prvFFRead: warning: %lu + %lu > %lu\n", ulSectorNumber, ulSectorCount, pxDisk->ulNumberOfSectors ); + } + } + + return lReturnCode; +} +/*-----------------------------------------------------------*/ + +static int32_t prvFFWrite( uint8_t *pucBuffer, uint32_t ulSectorNumber, uint32_t ulSectorCount, FF_Disk_t *pxDisk ) +{ +int32_t lReturnCode = FF_ERR_IOMAN_OUT_OF_BOUNDS_READ | FF_ERRFLAG; +BaseType_t xResult; + + if( ( pxDisk != NULL ) && + ( xSDCardStatus == pdPASS ) && + ( pxDisk->ulSignature == sdSIGNATURE ) && + ( pxDisk->xStatus.bIsInitialised != pdFALSE ) && + ( ulSectorNumber < pxDisk->ulNumberOfSectors ) && + ( ( pxDisk->ulNumberOfSectors - ulSectorNumber ) >= ulSectorCount ) ) + { + xResult = sd_physical_write( ulSectorNumber, pucBuffer, ulSectorCount ); + + if( xResult != pdFALSE ) + { + /* No errors. */ + lReturnCode = 0L; + } + else + { + FF_PRINTF( "prvFFWrite: %lu: %lu\n", ulSectorNumber, xResult ); + } + } + else + { + if( pxDisk->xStatus.bIsInitialised != pdFALSE ) + { + FF_PRINTF( "prvFFWrite: warning: %lu + %lu > %lu\n", ulSectorNumber, ulSectorCount, pxDisk->ulNumberOfSectors ); + } + } + + return lReturnCode; +} +/*-----------------------------------------------------------*/ + +void FF_SDDiskFlush( FF_Disk_t *pxDisk ) +{ + if( ( pxDisk != NULL ) && + ( pxDisk->xStatus.bIsInitialised != pdFALSE ) && + ( pxDisk->pxIOManager != NULL ) ) + { + FF_FlushCache( pxDisk->pxIOManager ); + } +} +/*-----------------------------------------------------------*/ + +/* Initialise the SDIO driver and mount an SD card */ +FF_Disk_t *FF_SDDiskInit( const char *pcName ) +{ +FF_Error_t xFFError; +BaseType_t xPartitionNumber = 0; +FF_CreationParameters_t xParameters; +FF_Disk_t *pxDisk; + + xSDCardStatus = prvSDMMCInit( 0 ); + + if( xSDCardStatus != pdPASS ) + { + FF_PRINTF( "FF_SDDiskInit: prvSDMMCInit failed\n" ); + pxDisk = NULL; + } + else + { + pxDisk = ( FF_Disk_t * )pvPortMalloc( sizeof( *pxDisk ) ); + if( pxDisk == NULL ) + { + FF_PRINTF( "FF_SDDiskInit: Malloc failed\n" ); + } + else + { + /* Initialise the created disk structure. */ + memset( pxDisk, '\0', sizeof( *pxDisk ) ); + + /* The Atmel MMC driver sets capacity as a number of KB. + Divide by two to get the number of 512-byte sectors. */ + pxDisk->ulNumberOfSectors = xSDCardInfo.capacity << 1; + + if( xPlusFATMutex == NULL ) + { + xPlusFATMutex = xSemaphoreCreateRecursiveMutex(); + } + pxDisk->ulSignature = sdSIGNATURE; + + if( xPlusFATMutex != NULL) + { + memset( &xParameters, '\0', sizeof( xParameters ) ); + xParameters.ulMemorySize = sdIOMAN_MEM_SIZE; + xParameters.ulSectorSize = 512; + xParameters.fnWriteBlocks = prvFFWrite; + xParameters.fnReadBlocks = prvFFRead; + xParameters.pxDisk = pxDisk; + + /* prvFFRead()/prvFFWrite() are not re-entrant and must be + protected with the use of a semaphore. */ + xParameters.xBlockDeviceIsReentrant = pdFALSE; + + /* The semaphore will be used to protect critical sections in + the +FAT driver, and also to avoid concurrent calls to + prvFFRead()/prvFFWrite() from different tasks. */ + xParameters.pvSemaphore = ( void * ) xPlusFATMutex; + + pxDisk->pxIOManager = FF_CreateIOManger( &xParameters, &xFFError ); + + if( pxDisk->pxIOManager == NULL ) + { + FF_PRINTF( "FF_SDDiskInit: FF_CreateIOManger: %s\n", (const char*)FF_GetErrMessage( xFFError ) ); + FF_SDDiskDelete( pxDisk ); + pxDisk = NULL; + } + else + { + pxDisk->xStatus.bIsInitialised = pdTRUE; + pxDisk->xStatus.bPartitionNumber = xPartitionNumber; + if( FF_SDDiskMount( pxDisk ) == 0 ) + { + FF_SDDiskDelete( pxDisk ); + pxDisk = NULL; + } + else + { + if( pcName == NULL ) + { + pcName = "/"; + } + FF_FS_Add( pcName, pxDisk ); + FF_PRINTF( "FF_SDDiskInit: Mounted SD-card as root \"%s\"\n", pcName ); + FF_SDDiskShowPartition( pxDisk ); + } + } /* if( pxDisk->pxIOManager != NULL ) */ + } /* if( xPlusFATMutex != NULL) */ + } /* if( pxDisk != NULL ) */ + } /* if( xSDCardStatus == pdPASS ) */ + + return pxDisk; +} +/*-----------------------------------------------------------*/ + +BaseType_t FF_SDDiskFormat( FF_Disk_t *pxDisk, BaseType_t aPart ) +{ +FF_Error_t xError; +BaseType_t xReturn = pdFAIL; + + xError = FF_Unmount( pxDisk ); + + if( FF_isERR( xError ) != pdFALSE ) + { + FF_PRINTF( "FF_SDDiskFormat: unmount fails: %08x\n", ( unsigned ) xError ); + } + else + { + /* Format the drive - try FAT32 with large clusters. */ + xError = FF_Format( pxDisk, aPart, pdFALSE, pdFALSE); + + if( FF_isERR( xError ) ) + { + FF_PRINTF( "FF_SDDiskFormat: %s\n", (const char*)FF_GetErrMessage( xError ) ); + } + else + { + FF_PRINTF( "FF_SDDiskFormat: OK, now remounting\n" ); + pxDisk->xStatus.bPartitionNumber = aPart; + xError = FF_SDDiskMount( pxDisk ); + FF_PRINTF( "FF_SDDiskFormat: rc %08x\n", ( unsigned )xError ); + if( FF_isERR( xError ) == pdFALSE ) + { + xReturn = pdPASS; + FF_SDDiskShowPartition( pxDisk ); + } + } + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +BaseType_t FF_SDDiskUnmount( FF_Disk_t *pxDisk ) +{ +FF_Error_t xFFError; +BaseType_t xReturn = pdPASS; + + if( ( pxDisk != NULL ) && ( pxDisk->xStatus.bIsMounted != pdFALSE ) ) + { + pxDisk->xStatus.bIsMounted = pdFALSE; + xFFError = FF_Unmount( pxDisk ); + + if( FF_isERR( xFFError ) ) + { + FF_PRINTF( "FF_SDDiskUnmount: rc %08x\n", ( unsigned )xFFError ); + xReturn = pdFAIL; + } + else + { + FF_PRINTF( "Drive unmounted\n" ); + } + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +BaseType_t FF_SDDiskReinit( FF_Disk_t *pxDisk ) +{ +BaseType_t xStatus = prvSDMMCInit( 0 ); /* Hard coded index. */ + + /*_RB_ parameter not used. */ + ( void ) pxDisk; + + FF_PRINTF( "FF_SDDiskReinit: rc %08x\n", ( unsigned ) xStatus ); + return xStatus; +} +/*-----------------------------------------------------------*/ + +BaseType_t FF_SDDiskMount( FF_Disk_t *pxDisk ) +{ +FF_Error_t xFFError; +BaseType_t xReturn; + + /* Mount the partition */ + xFFError = FF_Mount( pxDisk, pxDisk->xStatus.bPartitionNumber ); + + if( FF_isERR( xFFError ) ) + { + FF_PRINTF( "FF_SDDiskMount: %08lX\n", xFFError ); + xReturn = pdFAIL; + } + else + { + pxDisk->xStatus.bIsMounted = pdTRUE; + FF_PRINTF( "****** FreeRTOS+FAT initialized %lu sectors\n", pxDisk->pxIOManager->xPartition.ulTotalSectors ); + xReturn = pdPASS; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +FF_IOManager_t *sddisk_ioman( FF_Disk_t *pxDisk ) +{ +FF_IOManager_t *pxReturn; + + if( ( pxDisk != NULL ) && ( pxDisk->xStatus.bIsInitialised != pdFALSE ) ) + { + pxReturn = pxDisk->pxIOManager; + } + else + { + pxReturn = NULL; + } + return pxReturn; +} +/*-----------------------------------------------------------*/ + +/* Release all resources */ +BaseType_t FF_SDDiskDelete( FF_Disk_t *pxDisk ) +{ + if( pxDisk != NULL ) + { + pxDisk->ulSignature = 0; + pxDisk->xStatus.bIsInitialised = 0; + if( pxDisk->pxIOManager != NULL ) + { + if( FF_Mounted( pxDisk->pxIOManager ) != pdFALSE ) + { + FF_Unmount( pxDisk ); + } + FF_DeleteIOManager( pxDisk->pxIOManager ); + } + + vPortFree( pxDisk ); + } + return 1; +} +/*-----------------------------------------------------------*/ + +BaseType_t FF_SDDiskShowPartition( FF_Disk_t *pxDisk ) +{ +FF_Error_t xError; +uint64_t ullFreeSectors; +uint32_t ulTotalSizeMB, ulFreeSizeMB; +int iPercentageFree; +FF_IOManager_t *pxIOManager; +const char *pcTypeName = "unknown type"; +BaseType_t xReturn = pdPASS; + + if( pxDisk == NULL ) + { + xReturn = pdFAIL; + } + else + { + pxIOManager = pxDisk->pxIOManager; + + FF_PRINTF( "Reading FAT and calculating Free Space\n" ); + + switch( pxIOManager->xPartition.ucType ) + { + case FF_T_FAT12: + pcTypeName = "FAT12"; + break; + + case FF_T_FAT16: + pcTypeName = "FAT16"; + break; + + case FF_T_FAT32: + pcTypeName = "FAT32"; + break; + + default: + pcTypeName = "UNKOWN"; + break; + } + + FF_GetFreeSize( pxIOManager, &xError ); + + ullFreeSectors = pxIOManager->xPartition.ulFreeClusterCount * pxIOManager->xPartition.ulSectorsPerCluster; + iPercentageFree = ( int ) ( ( sdHUNDRED_64_BIT * ullFreeSectors + pxIOManager->xPartition.ulDataSectors / 2 ) / + ( ( uint64_t )pxIOManager->xPartition.ulDataSectors ) ); + + ulTotalSizeMB = pxIOManager->xPartition.ulDataSectors / sdSECTORS_PER_MB; + ulFreeSizeMB = ( uint32_t ) ( ullFreeSectors / sdSECTORS_PER_MB ); + + /* It is better not to use the 64-bit format such as %Lu because it + might not be implemented. */ + FF_PRINTF( "Partition Nr %8u\n", pxDisk->xStatus.bPartitionNumber ); + FF_PRINTF( "Type %8u (%s)\n", pxIOManager->xPartition.ucType, pcTypeName ); + FF_PRINTF( "VolLabel '%8s' \n", pxIOManager->xPartition.pcVolumeLabel ); + FF_PRINTF( "TotalSectors %8lu\n", pxIOManager->xPartition.ulTotalSectors ); + FF_PRINTF( "SecsPerCluster %8lu\n", pxIOManager->xPartition.ulSectorsPerCluster ); + FF_PRINTF( "Size %8lu MB\n", ulTotalSizeMB ); + FF_PRINTF( "FreeSize %8lu MB ( %d perc free )\n", ulFreeSizeMB, iPercentageFree ); + } + + return xReturn; +} +/*-----------------------------------------------------------*/ + +BaseType_t FF_SDDiskDetect( FF_Disk_t *pxDisk ) +{ +BaseType_t xIsPresent; +void *pvSemaphore; + + if( ( pxDisk != NULL ) && + ( pxDisk->pxIOManager ) ) + { + pvSemaphore = pxDisk->pxIOManager->pvSemaphore; + } + else + { + pvSemaphore = NULL; + } + + /*_RB_ Can these NULL checks be moved inside the FF_nnnSemaphore() functions? */ + /*_HT_ I'm afraid not, both functions start with configASSERT( pxSemaphore ); */ + if( pvSemaphore != NULL ) + { + FF_PendSemaphore( pvSemaphore ); + } + + xIsPresent = prvSDDetect(); + + if( pvSemaphore != NULL ) + { + FF_ReleaseSemaphore( pvSemaphore ); + } + + return xIsPresent; +} +/*-----------------------------------------------------------*/ + +static BaseType_t prvSDDetect( void ) +{ +static BaseType_t xWasPresent; +BaseType_t xIsPresent; +sd_mmc_err_t xSDPresence; + + if( xWasPresent == pdFALSE ) + { + /* Try to initialize SD MMC stack */ + sd_mmc_init(); + xSDPresence = sd_mmc_check( 0 ); + if( ( xSDPresence == SD_MMC_OK ) || ( xSDPresence == SD_MMC_INIT_ONGOING ) ) + { + xIsPresent = pdTRUE; + } + else + { + xIsPresent = pdFALSE; + } + } + else + { + /* See if the card is still present. */ + xSDPresence = sd_mmc_check_status(0); + if( xSDPresence == SD_MMC_OK ) + { + xIsPresent = pdTRUE; + } + else + { + xIsPresent = pdFALSE; + } + } + xWasPresent = xIsPresent; + + return xIsPresent; +} +/*-----------------------------------------------------------*/ + +static BaseType_t prvSDMMCInit( BaseType_t xDriveNumber ) +{ +BaseType_t xReturn; + + /* 'xDriveNumber' not yet in use. */ + ( void ) xDriveNumber; + + /* Check if the SD card is plugged in the slot */ + if( prvSDDetect() == pdFALSE ) + { + FF_PRINTF( "No SD card detected\n" ); + xReturn = pdFAIL; + } + else + { + FF_PRINTF( "HAL_SD_Init: type: %s Capacity: %lu MB\n", + xSDCardInfo.type & CARD_TYPE_HC ? "SDHC" : "SD", + ( xSDCardInfo.capacity << 1 ) / 2048 ); + + xReturn = pdPASS; + } + + return xReturn; +} +/*-----------------------------------------------------------*/ diff --git a/portable/STM32F4xx/ff_sddisk.c b/portable/STM32F4xx/ff_sddisk.c index aef879c..6f8fcc2 100755 --- a/portable/STM32F4xx/ff_sddisk.c +++ b/portable/STM32F4xx/ff_sddisk.c @@ -1,32 +1,8 @@ /* - * Some constants, hardware definitions and comments taken from ST's HAL driver - * library, COPYRIGHT(c) 2015 STMicroelectronics. - */ - -/* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -44,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -273,7 +245,7 @@ int32_t lReturnCode = FF_ERR_IOMAN_OUT_OF_BOUNDS_READ | FF_ERRFLAG; else { /* Some error occurred. */ - FF_PRINTF( "prvFFRead: %lu: %lu (%s)\n", ulSectorNumber, sd_result, prvSDCodePrintable( sd_result ) ); + FF_PRINTF( "prvFFRead: %lu: %u (%s)\n", ulSectorNumber, sd_result, prvSDCodePrintable( sd_result ) ); } } else @@ -362,7 +334,7 @@ int32_t lReturnCode = FF_ERR_IOMAN_OUT_OF_BOUNDS_READ | FF_ERRFLAG; } else { - FF_PRINTF( "prvFFWrite: %lu: %lu (%s)\n", ulSectorNumber, sd_result, prvSDCodePrintable( sd_result ) ); + FF_PRINTF( "prvFFWrite: %lu: %u (%s)\n", ulSectorNumber, sd_result, prvSDCodePrintable( sd_result ) ); } } else @@ -861,7 +833,8 @@ static BaseType_t prvSDMMCInit( BaseType_t xDriveNumber ) } #endif FF_PRINTF( "HAL_SD_Init: %d: %s type: %s Capacity: %lu MB\n", - SD_state, prvSDCodePrintable( ( uint32_t )SD_state ), + SD_state, + prvSDCodePrintable( ( uint32_t )SD_state ), xSDHandle.CardType == HIGH_CAPACITY_SD_CARD ? "SDHC" : "SD", xSDCardInfo.CardCapacity / ( 1024 * 1024 ) ); diff --git a/portable/STM32F4xx/stm32f4xx_hal_sd.c b/portable/STM32F4xx/stm32f4xx_hal_sd.c index a98b7bc..a264612 100755 --- a/portable/STM32F4xx/stm32f4xx_hal_sd.c +++ b/portable/STM32F4xx/stm32f4xx_hal_sd.c @@ -2642,7 +2642,7 @@ static HAL_SD_ErrorTypedef SD_PowerON(SD_HandleTypeDef *hsd) if( ( count == 0 ) || ( validvoltage != 0 ) ) { - FF_PRINTF("Voltage resp: %08x\n", response); + FF_PRINTF("Voltage resp: %08x\n", ( unsigned ) response); } count++; @@ -2855,7 +2855,7 @@ static HAL_SD_ErrorTypedef SD_CmdResp1Error(SD_HandleTypeDef *hsd, uint8_t SD_CM /* Check response received is of desired command */ if(SDIO_GetCommandResponse(hsd->Instance) != SD_CMD) { - FF_PRINTF( "RESPCMD[1] = %08x cmd = %02x\n", hsd->Instance->RESPCMD, SD_CMD ); + FF_PRINTF( "RESPCMD[1] = %08x cmd = %02x\n", ( unsigned ) hsd->Instance->RESPCMD, SD_CMD ); errorstate = SD_ILLEGAL_CMD; return errorstate; @@ -3079,7 +3079,7 @@ static HAL_SD_ErrorTypedef SD_CmdResp6Error(SD_HandleTypeDef *hsd, uint8_t SD_CM /* Check response received is of desired command */ if(SDIO_GetCommandResponse(hsd->Instance) != SD_CMD) { - FF_PRINTF( "RESPCMD[2] = %08x cmd = %02x\n", hsd->Instance->RESPCMD, SD_CMD ); + FF_PRINTF( "RESPCMD[2] = %08x cmd = %02x\n", ( unsigned ) hsd->Instance->RESPCMD, SD_CMD ); errorstate = SD_ILLEGAL_CMD; return errorstate; @@ -3105,7 +3105,7 @@ static HAL_SD_ErrorTypedef SD_CmdResp6Error(SD_HandleTypeDef *hsd, uint8_t SD_CM if((response_r1 & SD_R6_ILLEGAL_CMD) == SD_R6_ILLEGAL_CMD) { - FF_PRINTF( "response_r1 = %08x cmd = %02x\n", hsd->Instance->RESPCMD, SD_R6_ILLEGAL_CMD ); + FF_PRINTF( "response_r1 = %08x cmd = %02x\n", ( unsigned ) hsd->Instance->RESPCMD, ( unsigned ) SD_R6_ILLEGAL_CMD ); return(SD_ILLEGAL_CMD); } @@ -3425,7 +3425,7 @@ static HAL_SD_ErrorTypedef SD_IsCardProgramming(SD_HandleTypeDef *hsd, uint8_t * /* Check response received is of desired command */ if((uint32_t)SDIO_GetCommandResponse(hsd->Instance) != SD_CMD_SEND_STATUS) { - FF_PRINTF( "RESPCMD[3] = %08x cmd = %02x\n", hsd->Instance->RESPCMD, SD_CMD_SEND_STATUS ); + FF_PRINTF( "RESPCMD[3] = %08x cmd = %02x\n", ( unsigned ) hsd->Instance->RESPCMD, SD_CMD_SEND_STATUS ); errorstate = SD_ILLEGAL_CMD; return errorstate; diff --git a/portable/STM32F7xx/ff_sddisk.c b/portable/STM32F7xx/ff_sddisk.c index e613064..50a1d23 100755 --- a/portable/STM32F7xx/ff_sddisk.c +++ b/portable/STM32F7xx/ff_sddisk.c @@ -1,60 +1,26 @@ /* - * Some constants, hardware definitions and comments taken from ST's HAL driver - * library, COPYRIGHT(c) 2015 STMicroelectronics. - */ - -/* - * FreeRTOS+FAT Labs Build 160818 (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** This product is functional and is already being used in commercial *** - *** products. Be aware however that we are still refining its design, *** - *** the source code does not yet fully conform to the strict coding and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: * - * FreeRTOS+FAT can be used under two different free open source licenses. The - * license that applies is dependent on the processor on which FreeRTOS+FAT is - * executed, as follows: + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. * - * If FreeRTOS+FAT is executed on one of the processors listed under the Special - * License Arrangements heading of the FreeRTOS+FAT license information web - * page, then it can be used under the terms of the FreeRTOS Open Source - * License. If FreeRTOS+FAT is used on any other processor, then it can be used - * under the terms of the GNU General Public License V2. Links to the relevant - * licenses follow: + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * The FreeRTOS+FAT License Information Page: http://www.FreeRTOS.org/fat_license - * The FreeRTOS Open Source License: http://www.FreeRTOS.org/license - * The GNU General Public License Version 2: http://www.FreeRTOS.org/gpl-2.0.txt - * - * FreeRTOS+FAT is distributed in the hope that it will be useful. You cannot - * use FreeRTOS+FAT unless you agree that you use the software 'as is'. - * FreeRTOS+FAT is provided WITHOUT ANY WARRANTY; without even the implied - * warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. Real Time Engineers Ltd. disclaims all conditions and terms, be they - * implied, expressed, or statutory. - * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -122,7 +88,7 @@ #ifdef STM32F7xx - /* This driver was originally developed for STM32F4xx. + /* This driver was originally developed for STM32F4xx. With a few defines it can also be used for STM32F7xx : */ /* The Instance of the MMC peripheral. */ #define SDIO SDMMC1 diff --git a/portable/Zynq/ff_sddisk.c b/portable/Zynq/ff_sddisk.c index c24b3f9..81574de 100755 --- a/portable/Zynq/ff_sddisk.c +++ b/portable/Zynq/ff_sddisk.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ @@ -665,9 +642,12 @@ BaseType_t xReturn = pdPASS; FF_PRINTF( "Type %8u (%s)\n", pxIOManager->xPartition.ucType, pcTypeName ); FF_PRINTF( "VolLabel '%8s' \n", pxIOManager->xPartition.pcVolumeLabel ); FF_PRINTF( "TotalSectors %8lu\n", pxIOManager->xPartition.ulTotalSectors ); + FF_PRINTF( "DataSectors %8lu\n", pxIOManager->xPartition.ulDataSectors ); FF_PRINTF( "SecsPerCluster %8lu\n", pxIOManager->xPartition.ulSectorsPerCluster ); FF_PRINTF( "Size %8lu MB\n", ulTotalSizeMB ); FF_PRINTF( "FreeSize %8lu MB ( %d perc free )\n", ulFreeSizeMB, iPercentageFree ); + FF_PRINTF( "BeginLBA %8lu\n", pxIOManager->xPartition.ulBeginLBA ); + FF_PRINTF( "FATBeginLBA %8lu\n", pxIOManager->xPartition.ulFATBeginLBA ); } return xReturn; diff --git a/portable/Zynq/xsdps.c b/portable/Zynq/xsdps.c index df77071..2186a99 100755 --- a/portable/Zynq/xsdps.c +++ b/portable/Zynq/xsdps.c @@ -1303,6 +1303,7 @@ s32 XSdPs_WritePolled(XSdPs *InstancePtr, u32 Arg, u32 BlkCnt, const u8 *Buff) uint64_t ullLastTime = ullGetHighResolutionTime(); uint64_t ullNow; + XSdPs_ReadStatus(InstancePtr); for( ;; ) { ullNow = ullGetHighResolutionTime(); @@ -1312,6 +1313,13 @@ s32 XSdPs_WritePolled(XSdPs *InstancePtr, u32 Arg, u32 BlkCnt, const u8 *Buff) break; } } + XSdPs_ReadStatus(InstancePtr); +// eventLogAdd("Wt %lx %lx%s", Status[0], Status[1], Status[0] != Status[1] ? " DIFF" : ""); + } + else + { + u32 Status = XSdPs_ReadStatus(InstancePtr); +// eventLogAdd("Wt %lx", Status); } XSdPs_WriteReg16(InstancePtr->Config.BaseAddress, diff --git a/portable/avr32_uc3/ff_flush.h b/portable/avr32_uc3/ff_flush.h index eece7ce..7b014b8 100755 --- a/portable/avr32_uc3/ff_flush.h +++ b/portable/avr32_uc3/ff_flush.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/portable/avr32_uc3/ff_locking.c b/portable/avr32_uc3/ff_locking.c index e9cb183..4c66500 100755 --- a/portable/avr32_uc3/ff_locking.c +++ b/portable/avr32_uc3/ff_locking.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/portable/common/ff_ramdisk.c b/portable/common/ff_ramdisk.c index d2a6d89..0f7a2c4 100755 --- a/portable/common/ff_ramdisk.c +++ b/portable/common/ff_ramdisk.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/portable/common/ff_ramdisk.h b/portable/common/ff_ramdisk.h index b0b5e33..4a3bff5 100755 --- a/portable/common/ff_ramdisk.h +++ b/portable/common/ff_ramdisk.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/portable/common/ff_sddisk.h b/portable/common/ff_sddisk.h index 15c6601..077e497 100755 --- a/portable/common/ff_sddisk.h +++ b/portable/common/ff_sddisk.h @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */ diff --git a/portable/lpc18xx/ff_sddisk.c b/portable/lpc18xx/ff_sddisk.c index ac42292..0c4b232 100755 --- a/portable/lpc18xx/ff_sddisk.c +++ b/portable/lpc18xx/ff_sddisk.c @@ -1,27 +1,8 @@ /* - * FreeRTOS+FAT Labs Build 160919a (C) 2016 Real Time Engineers ltd. + * FreeRTOS+FAT build 191128 - Note: FreeRTOS+FAT is still in the lab! + * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Authors include James Walmsley, Hein Tibosch and Richard Barry * - ******************************************************************************* - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - *** *** - *** *** - *** FREERTOS+FAT IS STILL IN THE LAB: *** - *** *** - *** Be aware we are still refining the FreeRTOS+FAT design, *** - *** the source code does not yet fully conform to the strict quality and *** - *** style standards mandated by Real Time Engineers ltd., and the *** - *** documentation and testing is not necessarily complete. *** - *** *** - *** PLEASE REPORT EXPERIENCES USING THE SUPPORT RESOURCES FOUND ON THE *** - *** URL: http://www.FreeRTOS.org/contact Active early adopters may, at *** - *** the sole discretion of Real Time Engineers Ltd., be offered versions *** - *** under a license other than that described below. *** - *** *** - *** *** - ***** NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE ******* NOTE *** - ******************************************************************************* - * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to @@ -39,11 +20,7 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * 1 tab == 4 spaces! - * - * http://www.FreeRTOS.org - * http://www.FreeRTOS.org/plus - * http://www.FreeRTOS.org/labs + * https://www.FreeRTOS.org * */