Release 6.1.5

This commit is contained in:
Yuxin Zhou 2021-02-28 04:52:25 +00:00
parent a312a9251e
commit 0642fb869d
23 changed files with 556 additions and 87 deletions

View File

@ -6,6 +6,9 @@ project(filex
LANGUAGES C ASM LANGUAGES C ASM
) )
option(FX_STANDALONE_ENABLE "Enable Filex in standalone mode" OFF)
if(NOT DEFINED THREADX_ARCH) if(NOT DEFINED THREADX_ARCH)
message(FATAL_ERROR "Error: THREADX_ARCH not defined") message(FATAL_ERROR "Error: THREADX_ARCH not defined")
endif() endif()
@ -18,9 +21,11 @@ add_library(${PROJECT_NAME})
add_library("azrtos::${PROJECT_NAME}" ALIAS ${PROJECT_NAME}) add_library("azrtos::${PROJECT_NAME}" ALIAS ${PROJECT_NAME})
# Define any required dependencies between this library and others # Define any required dependencies between this library and others
target_link_libraries(${PROJECT_NAME} PUBLIC if(NOT FX_STANDALONE_ENABLE)
target_link_libraries(${PROJECT_NAME} PUBLIC
"azrtos::threadx" "azrtos::threadx"
) )
endif()
# A place for generated/copied include files (no need to change) # A place for generated/copied include files (no need to change)
set(CUSTOM_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/custom_inc) set(CUSTOM_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/custom_inc)
@ -46,7 +51,12 @@ target_include_directories(${PROJECT_NAME}
PUBLIC PUBLIC
${CUSTOM_INC_DIR} ${CUSTOM_INC_DIR}
) )
target_compile_definitions(${PROJECT_NAME} PUBLIC "FX_INCLUDE_USER_DEFINE_FILE" )
if(NOT FX_STANDALONE_ENABLE)
target_compile_definitions(${PROJECT_NAME} PUBLIC "FX_INCLUDE_USER_DEFINE_FILE" )
else()
target_compile_definitions(${PROJECT_NAME} PUBLIC "FX_INCLUDE_USER_DEFINE_FILE" -DFX_STANDALONE_ENABLE)
endif()
# Enable a build target that produces a ZIP file of all sources # Enable a build target that produces a ZIP file of all sources
set(CPACK_SOURCE_GENERATOR "ZIP") set(CPACK_SOURCE_GENERATOR "ZIP")
@ -61,3 +71,4 @@ set(CPACK_SOURCE_IGNORE_FILES
) )
set(CPACK_VERBATIM_VARIABLES YES) set(CPACK_VERBATIM_VARIABLES YES)
include(CPack) include(CPack)

View File

@ -26,7 +26,7 @@
/* APPLICATION INTERFACE DEFINITION RELEASE */ /* APPLICATION INTERFACE DEFINITION RELEASE */
/* */ /* */
/* fx_api.h PORTABLE C */ /* fx_api.h PORTABLE C */
/* 6.1.3 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -54,6 +54,9 @@
/* 12-31-2020 William E. Lamie Modified comment(s), and */ /* 12-31-2020 William E. Lamie Modified comment(s), and */
/* updated product constants, */ /* updated product constants, */
/* resulting in version 6.1.3 */ /* resulting in version 6.1.3 */
/* 03-02-2021 William E. Lamie Modified comment(s), and */
/* added standalone support, */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
@ -91,6 +94,11 @@ extern "C" {
#include "fx_port.h" #include "fx_port.h"
/* Define compiler library include files */
#ifdef FX_STANDALONE_ENABLE
#include "string.h"
#endif
/* Define the major/minor version information that can be used by the application /* Define the major/minor version information that can be used by the application
and the FileX source as well. */ and the FileX source as well. */
@ -98,11 +106,36 @@ extern "C" {
#define AZURE_RTOS_FILEX #define AZURE_RTOS_FILEX
#define FILEX_MAJOR_VERSION 6 #define FILEX_MAJOR_VERSION 6
#define FILEX_MINOR_VERSION 1 #define FILEX_MINOR_VERSION 1
#define FILEX_PATCH_VERSION 3 #define FILEX_PATCH_VERSION 5
/* Define the following symbols for backward compatibility */ /* Define the following symbols for backward compatibility */
#define EL_PRODUCT_FILEX #define EL_PRODUCT_FILEX
#ifdef FX_STANDALONE_ENABLE
/* FileX will be used without Azure RTOS ThreadX */
#ifndef FX_SINGLE_THREAD
#define FX_SINGLE_THREAD
#endif /* !FX_SINGLE_THREAD */
/* FileX will be used with local path logic disabled */
#ifndef FX_NO_LOCAL_PATH
#define FX_NO_LOCAL_PATH
#endif /* !FX_NO_LOCAL_PATH */
/* FileX is built without update to the time parameters. */
#ifndef FX_NO_TIMER
#define FX_NO_TIMER
#endif /* !FX_NO_TIMER */
#endif
/* Override the interrupt protection provided in FileX port files to simply use ThreadX protection, /* Override the interrupt protection provided in FileX port files to simply use ThreadX protection,
which is often in-line assembly. */ which is often in-line assembly. */
@ -148,14 +181,17 @@ extern "C" {
#ifndef FX_NO_LOCAL_PATH #ifndef FX_NO_LOCAL_PATH
#ifndef FX_LOCAL_PATH_SETUP #ifndef FX_LOCAL_PATH_SETUP
#ifndef FX_SINGLE_THREAD
#define FX_LOCAL_PATH_SETUP extern TX_THREAD *_tx_thread_current_ptr; #define FX_LOCAL_PATH_SETUP extern TX_THREAD *_tx_thread_current_ptr;
#else
#define FX_NO_LOCAL_PATH
#endif
#endif #endif
#endif #endif
/* Determine if tracing is enabled. */ /* Determine if tracing is enabled. */
#ifdef TX_ENABLE_EVENT_TRACE #if defined(TX_ENABLE_EVENT_TRACE) && !defined(FX_STANDALONE_ENABLE)
/* Trace is enabled. Remap calls so that interrupts can be disabled around the actual event logging. */ /* Trace is enabled. Remap calls so that interrupts can be disabled around the actual event logging. */

View File

@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */ /* PORT SPECIFIC C INFORMATION RELEASE */
/* */ /* */
/* fx_user.h PORTABLE C */ /* fx_user.h PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* */ /* */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
@ -50,6 +50,9 @@
/* to enable code */ /* to enable code */
/* size optimization, */ /* size optimization, */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), and */
/* added standalone support, */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
@ -162,6 +165,11 @@
/* #define FX_SINGLE_THREAD */ /* #define FX_SINGLE_THREAD */
/* Defined, Filex will be used in standalone mode (without ThreadX) */
/* #define FX_STANDALONE_ENABLE */
/* Defined, data sector write requests are flushed immediately to the driver. */ /* Defined, data sector write requests are flushed immediately to the driver. */
/*#define FX_FAULT_TOLERANT_DATA */ /*#define FX_FAULT_TOLERANT_DATA */

View File

@ -39,7 +39,7 @@
/* FUNCTION RELEASE */ /* FUNCTION RELEASE */
/* */ /* */
/* _fx_directory_entry_write PORTABLE C */ /* _fx_directory_entry_write PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -78,6 +78,8 @@
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
UINT _fx_directory_entry_write(FX_MEDIA *media_ptr, FX_DIR_ENTRY *entry_ptr) UINT _fx_directory_entry_write(FX_MEDIA *media_ptr, FX_DIR_ENTRY *entry_ptr)
@ -261,7 +263,7 @@ ULONG changed_offset;
} }
/* Default the name match to true. */ /* Default the name match to true. */
match = TX_TRUE; match = FX_TRUE;
/* Loop through the newly derived short name and the original name and look /* Loop through the newly derived short name and the original name and look
for a non-matching character. */ for a non-matching character. */

View File

@ -40,7 +40,7 @@ FX_LOCAL_PATH_SETUP
/* FUNCTION RELEASE */ /* FUNCTION RELEASE */
/* */ /* */
/* _fx_directory_local_path_get PORTABLE C */ /* _fx_directory_local_path_get PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -74,6 +74,8 @@ FX_LOCAL_PATH_SETUP
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
UINT _fx_directory_local_path_get(FX_MEDIA *media_ptr, CHAR **return_path_name) UINT _fx_directory_local_path_get(FX_MEDIA *media_ptr, CHAR **return_path_name)
@ -96,6 +98,8 @@ UINT _fx_directory_local_path_get(FX_MEDIA *media_ptr, CHAR **return_path_name)
#ifdef FX_NO_LOCAL_PATH #ifdef FX_NO_LOCAL_PATH
FX_PARAMETER_NOT_USED(return_path_name);
/* Error, return to caller. */ /* Error, return to caller. */
return(FX_NOT_IMPLEMENTED); return(FX_NOT_IMPLEMENTED);
#else #else

View File

@ -40,7 +40,7 @@ FX_LOCAL_PATH_SETUP
/* FUNCTION RELEASE */ /* FUNCTION RELEASE */
/* */ /* */
/* _fx_directory_local_path_restore PORTABLE C */ /* _fx_directory_local_path_restore PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -74,6 +74,8 @@ FX_LOCAL_PATH_SETUP
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
UINT _fx_directory_local_path_restore(FX_MEDIA *media_ptr, FX_LOCAL_PATH *local_path_ptr) UINT _fx_directory_local_path_restore(FX_MEDIA *media_ptr, FX_LOCAL_PATH *local_path_ptr)
@ -96,6 +98,8 @@ UINT _fx_directory_local_path_restore(FX_MEDIA *media_ptr, FX_LOCAL_PATH *local
#ifdef FX_NO_LOCAL_PATH #ifdef FX_NO_LOCAL_PATH
FX_PARAMETER_NOT_USED(local_path_ptr);
/* Error, return to caller. */ /* Error, return to caller. */
return(FX_NOT_IMPLEMENTED); return(FX_NOT_IMPLEMENTED);
#else #else

View File

@ -40,7 +40,7 @@ FX_LOCAL_PATH_SETUP
/* FUNCTION RELEASE */ /* FUNCTION RELEASE */
/* */ /* */
/* _fx_directory_local_path_set PORTABLE C */ /* _fx_directory_local_path_set PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -78,6 +78,8 @@ FX_LOCAL_PATH_SETUP
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
UINT _fx_directory_local_path_set(FX_MEDIA *media_ptr, FX_LOCAL_PATH *local_path_ptr, CHAR *new_path_name) UINT _fx_directory_local_path_set(FX_MEDIA *media_ptr, FX_LOCAL_PATH *local_path_ptr, CHAR *new_path_name)
@ -121,6 +123,8 @@ FX_DIR_ENTRY dir_entry;
#ifdef FX_NO_LOCAL_PATH #ifdef FX_NO_LOCAL_PATH
FX_PARAMETER_NOT_USED(new_path_name);
/* Error, return to caller. */ /* Error, return to caller. */
return(FX_NOT_IMPLEMENTED); return(FX_NOT_IMPLEMENTED);
#else #else

View File

@ -25,7 +25,6 @@
/* Include necessary system files. */ /* Include necessary system files. */
#include "tx_api.h"
#include "fx_api.h" #include "fx_api.h"
#include "fx_media.h" #include "fx_media.h"
#include "fx_utility.h" #include "fx_utility.h"
@ -59,7 +58,7 @@ ULONG _fx_media_format_volume_id = 1;
/* FUNCTION RELEASE */ /* FUNCTION RELEASE */
/* */ /* */
/* _fx_media_format PORTABLE C */ /* _fx_media_format PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -116,6 +115,8 @@ ULONG _fx_media_format_volume_id = 1;
/* added conditional to */ /* added conditional to */
/* disable force memset, */ /* disable force memset, */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
UINT _fx_media_format(FX_MEDIA *media_ptr, VOID (*driver)(FX_MEDIA *media), VOID *driver_info_ptr, UCHAR *memory_ptr, UINT memory_size, UINT _fx_media_format(FX_MEDIA *media_ptr, VOID (*driver)(FX_MEDIA *media), VOID *driver_info_ptr, UCHAR *memory_ptr, UINT memory_size,

View File

@ -25,7 +25,6 @@
/* Include necessary system files. */ /* Include necessary system files. */
#include "tx_api.h"
#include "fx_api.h" #include "fx_api.h"
#include "fx_media.h" #include "fx_media.h"
@ -40,7 +39,7 @@ UINT fx_media_format_oem_name_set(UCHAR new_oem_name[8]);
/* FUNCTION RELEASE */ /* FUNCTION RELEASE */
/* */ /* */
/* _fx_media_format_oem_name_set PORTABLE C */ /* _fx_media_format_oem_name_set PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -74,6 +73,8 @@ UINT fx_media_format_oem_name_set(UCHAR new_oem_name[8]);
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
UINT fx_media_format_oem_name_set(UCHAR new_oem_name[8]) UINT fx_media_format_oem_name_set(UCHAR new_oem_name[8])

View File

@ -25,7 +25,6 @@
/* Include necessary system files. */ /* Include necessary system files. */
#include "tx_api.h"
#include "fx_api.h" #include "fx_api.h"
#include "fx_media.h" #include "fx_media.h"
@ -40,7 +39,7 @@ UINT fx_media_format_type_set(UCHAR new_media_type);
/* FUNCTION RELEASE */ /* FUNCTION RELEASE */
/* */ /* */
/* _fx_media_format_type_set PORTABLE C */ /* _fx_media_format_type_set PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -73,6 +72,8 @@ UINT fx_media_format_type_set(UCHAR new_media_type);
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
UINT fx_media_format_type_set(UCHAR new_media_type) UINT fx_media_format_type_set(UCHAR new_media_type)

View File

@ -25,7 +25,6 @@
/* Include necessary system files. */ /* Include necessary system files. */
#include "tx_api.h"
#include "fx_api.h" #include "fx_api.h"
#include "fx_media.h" #include "fx_media.h"
@ -40,7 +39,7 @@ UINT fx_media_format_volume_id_set(ULONG new_volume_id);
/* FUNCTION RELEASE */ /* FUNCTION RELEASE */
/* */ /* */
/* _fx_media_format_media_volume_id_set PORTABLE C */ /* _fx_media_format_media_volume_id_set PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -74,6 +73,8 @@ UINT fx_media_format_volume_id_set(ULONG new_volume_id);
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
UINT fx_media_format_volume_id_set(ULONG new_volume_id) UINT fx_media_format_volume_id_set(ULONG new_volume_id)

View File

@ -23,7 +23,6 @@
/* Include necessary system files. */ /* Include necessary system files. */
#include "tx_api.h"
#include "fx_api.h" #include "fx_api.h"
@ -57,7 +56,7 @@ VOID _fx_ram_driver(FX_MEDIA *media_ptr);
/* FUNCTION RELEASE */ /* FUNCTION RELEASE */
/* */ /* */
/* _fx_ram_driver PORTABLE C */ /* _fx_ram_driver PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -107,6 +106,8 @@ VOID _fx_ram_driver(FX_MEDIA *media_ptr);
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
VOID _fx_ram_driver(FX_MEDIA *media_ptr) VOID _fx_ram_driver(FX_MEDIA *media_ptr)

View File

@ -39,7 +39,7 @@
/* FUNCTION RELEASE */ /* FUNCTION RELEASE */
/* */ /* */
/* _fx_utility_exFAT_size_calculate PORTABLE C */ /* _fx_utility_exFAT_size_calculate PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -77,6 +77,9 @@
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), fixed */
/* FAT size calculation issue, */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
VOID _fx_utility_exFAT_size_calculate(ULONG boundary_unit, ULONG64 size_in_sectors, ULONG sectors_per_cluster, VOID _fx_utility_exFAT_size_calculate(ULONG boundary_unit, ULONG64 size_in_sectors, ULONG sectors_per_cluster,
@ -122,10 +125,12 @@ ULONG64 total_cluster_heap_sectors;
*fat_offset_ptr -= *sectors_per_fat_ptr; *fat_offset_ptr -= *sectors_per_fat_ptr;
} }
else /* Recalculate FAT size since System Area will be increased on FAT size. */ else /* Recalculate FAT size since System Area will be increased on FAT size. */
{
do
{ {
/* Increase System Area size on number of FAT sectors aligned according BU. */ /* Increase System Area size on number of FAT sectors aligned according BU. */
system_area_sectors += *sectors_per_fat_ptr; system_area_sectors = *fat_offset_ptr + *sectors_per_fat_ptr;
/* Decrease sectors available for clusters heap. */ /* Decrease sectors available for clusters heap. */
total_cluster_heap_sectors = size_in_sectors - system_area_sectors; total_cluster_heap_sectors = size_in_sectors - system_area_sectors;
@ -137,7 +142,10 @@ ULONG64 total_cluster_heap_sectors;
*sectors_per_fat_ptr = ALIGN_UP(*sectors_per_fat_ptr, boundary_unit >> 1); *sectors_per_fat_ptr = ALIGN_UP(*sectors_per_fat_ptr, boundary_unit >> 1);
/* Increase Cluster Heap offset according new FAT size. */ /* Increase Cluster Heap offset according new FAT size. */
*cluster_heap_offset_ptr += *sectors_per_fat_ptr; *cluster_heap_offset_ptr = *fat_offset_ptr + *sectors_per_fat_ptr;
/* Loop until we find a FAT size that can hold all the clusters. */
}while (*sectors_per_fat_ptr * FX_BOOT_SECTOR_SIZE * BITS_PER_BYTE / EXFAT_FAT_BITS < ((size_in_sectors - *cluster_heap_offset_ptr) / sectors_per_cluster));
} }
} }

View File

@ -24,7 +24,6 @@
/* Include necessary system files. */ /* Include necessary system files. */
#include "tx_api.h"
#include "fx_api.h" #include "fx_api.h"
@ -40,7 +39,7 @@ FX_CALLER_CHECKING_EXTERNS
/* FUNCTION RELEASE */ /* FUNCTION RELEASE */
/* */ /* */
/* _fxe_media_exFAT_format PORTABLE C */ /* _fxe_media_exFAT_format PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -90,6 +89,8 @@ FX_CALLER_CHECKING_EXTERNS
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
UINT _fxe_media_exFAT_format(FX_MEDIA *media_ptr, VOID (*driver)(FX_MEDIA *media), VOID *driver_info_ptr, UINT _fxe_media_exFAT_format(FX_MEDIA *media_ptr, VOID (*driver)(FX_MEDIA *media), VOID *driver_info_ptr,

View File

@ -25,7 +25,6 @@
/* Include necessary system files. */ /* Include necessary system files. */
#include "tx_api.h"
#include "fx_api.h" #include "fx_api.h"
#include "fx_media.h" #include "fx_media.h"
@ -38,7 +37,7 @@ FX_CALLER_CHECKING_EXTERNS
/* FUNCTION RELEASE */ /* FUNCTION RELEASE */
/* */ /* */
/* _fxe_media_format PORTABLE C */ /* _fxe_media_format PORTABLE C */
/* 6.1 */ /* 6.1.5 */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
/* William E. Lamie, Microsoft Corporation */ /* William E. Lamie, Microsoft Corporation */
@ -89,6 +88,8 @@ FX_CALLER_CHECKING_EXTERNS
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
UINT _fxe_media_format(FX_MEDIA *media_ptr, VOID (*driver)(FX_MEDIA *media), VOID *driver_info_ptr, UCHAR *memory_ptr, UINT memory_size, UINT _fxe_media_format(FX_MEDIA *media_ptr, VOID (*driver)(FX_MEDIA *media), VOID *driver_info_ptr, UCHAR *memory_ptr, UINT memory_size,

View File

@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */ /* PORT SPECIFIC C INFORMATION RELEASE */
/* */ /* */
/* fx_port.h Cortex-M0/GNU */ /* fx_port.h Cortex-M0/GNU */
/* 6.1 */ /* 6.1.5 */
/* */ /* */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
@ -47,6 +47,8 @@
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
@ -68,6 +70,7 @@
/* Include the ThreadX api file. */ /* Include the ThreadX api file. */
#ifndef FX_STANDALONE_ENABLE
#include "tx_api.h" #include "tx_api.h"
@ -78,13 +81,45 @@
typedef unsigned long long ULONG64; typedef unsigned long long ULONG64;
#endif #endif
#else
/* Define compiler library include files. */
#include <stdint.h>
#include <stdlib.h>
#define VOID void
typedef char CHAR;
typedef char BOOL;
typedef unsigned char UCHAR;
typedef int INT;
typedef unsigned int UINT;
typedef long LONG;
typedef unsigned long ULONG;
typedef short SHORT;
typedef unsigned short USHORT;
#ifndef ULONG64_DEFINED
#define ULONG64_DEFINED
typedef unsigned long long ULONG64;
#endif
/* Define basic alignment type used in block and byte pool operations. This data type must
be at least 32-bits in size and also be large enough to hold a pointer type. */
#ifndef ALIGN_TYPE_DEFINED
#define ALIGN_TYPE_DEFINED
#define ALIGN_TYPE ULONG
#endif
#endif
/* Define FileX internal protection macros. If FX_SINGLE_THREAD is defined, /* Define FileX internal protection macros. If FX_SINGLE_THREAD is defined,
these protection macros are effectively disabled. However, for multi-thread these protection macros are effectively disabled. However, for multi-thread
uses, the macros are setup to utilize a ThreadX mutex for multiple thread uses, the macros are setup to utilize a ThreadX mutex for multiple thread
access control into an open media. */ access control into an open media. */
#ifdef FX_SINGLE_THREAD #if defined(FX_SINGLE_THREAD) || defined(FX_STANDALONE_ENABLE)
#define FX_PROTECT #define FX_PROTECT
#define FX_UNPROTECT #define FX_UNPROTECT
#else #else
@ -96,16 +131,33 @@ typedef unsigned long long ULONG64;
/* Define interrupt lockout constructs to protect the system date/time from being updated /* Define interrupt lockout constructs to protect the system date/time from being updated
while they are being read. */ while they are being read. */
#ifndef FX_STANDALONE_ENABLE
#ifndef FX_INT_SAVE_AREA
#define FX_INT_SAVE_AREA unsigned int old_interrupt_posture; #define FX_INT_SAVE_AREA unsigned int old_interrupt_posture;
#define FX_DISABLE_INTS old_interrupt_posture = tx_interrupt_control(TX_INT_DISABLE); #endif
#define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture);
#ifndef FX_DISABLE_INTS
#define FX_DISABLE_INTS old_interrupt_posture = tx_interrupt_control(TX_INT_DISABLE);
#endif
#ifndef FX_RESTORE_INTS
#define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture);
#endif
#else
/* Disable use of ThreadX protection in standalone mode for FileX */
#ifndef FX_LEGACY_INTERRUPT_PROTECTION
#define FX_LEGACY_INTERRUPT_PROTECTION
#endif
#define FX_INT_SAVE_AREA
#define FX_DISABLE_INTS
#define FX_RESTORE_INTS
#endif
/* Define the error checking logic to determine if there is a caller error in the FileX API. /* Define the error checking logic to determine if there is a caller error in the FileX API.
The default definitions assume ThreadX is being used. This code can be completely turned The default definitions assume ThreadX is being used. This code can be completely turned
off by just defining these macros to white space. */ off by just defining these macros to white space. */
#ifndef FX_STANDALONE_ENABLE
#ifndef TX_TIMER_PROCESS_IN_ISR #ifndef TX_TIMER_PROCESS_IN_ISR
#define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \ #define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \
@ -125,6 +177,10 @@ typedef unsigned long long ULONG64;
(_tx_thread_current_ptr == TX_NULL)) \ (_tx_thread_current_ptr == TX_NULL)) \
return(FX_CALLER_ERROR); return(FX_CALLER_ERROR);
#endif #endif
#else
#define FX_CALLER_CHECKING_EXTERNS
#define FX_CALLER_CHECKING_CODE
#endif
/* Define the update rate of the system timer. These values may also be defined at the command /* Define the update rate of the system timer. These values may also be defined at the command
@ -146,7 +202,7 @@ typedef unsigned long long ULONG64;
this value is derived from TX_TIMER_TICKS_PER_SECOND. */ this value is derived from TX_TIMER_TICKS_PER_SECOND. */
#ifndef FX_UPDATE_RATE_IN_TICKS #ifndef FX_UPDATE_RATE_IN_TICKS
#ifdef TX_TIMER_TICKS_PER_SECOND #if (defined(TX_TIMER_TICKS_PER_SECOND) && (!defined(FX_STANDALONE_ENABLE)))
#define FX_UPDATE_RATE_IN_TICKS (TX_TIMER_TICKS_PER_SECOND * FX_UPDATE_RATE_IN_SECONDS) #define FX_UPDATE_RATE_IN_TICKS (TX_TIMER_TICKS_PER_SECOND * FX_UPDATE_RATE_IN_SECONDS)
#else #else
#define FX_UPDATE_RATE_IN_TICKS 1000 #define FX_UPDATE_RATE_IN_TICKS 1000
@ -158,7 +214,7 @@ typedef unsigned long long ULONG64;
#ifdef FX_SYSTEM_INIT #ifdef FX_SYSTEM_INIT
CHAR _fx_version_id[] = CHAR _fx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * FileX Cortex-M0/GNU Version 6.1 *"; "Copyright (c) Microsoft Corporation. All rights reserved. * FileX Cortex-M0/GNU Version 6.1.5 *";
#else #else
extern CHAR _fx_version_id[]; extern CHAR _fx_version_id[];
#endif #endif

View File

@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */ /* PORT SPECIFIC C INFORMATION RELEASE */
/* */ /* */
/* fx_port.h Cortex-M3/GNU */ /* fx_port.h Cortex-M3/GNU */
/* 6.1 */ /* 6.1.5 */
/* */ /* */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
@ -47,6 +47,8 @@
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
@ -68,6 +70,7 @@
/* Include the ThreadX api file. */ /* Include the ThreadX api file. */
#ifndef FX_STANDALONE_ENABLE
#include "tx_api.h" #include "tx_api.h"
@ -78,13 +81,45 @@
typedef unsigned long long ULONG64; typedef unsigned long long ULONG64;
#endif #endif
#else
/* Define compiler library include files. */
#include <stdint.h>
#include <stdlib.h>
#define VOID void
typedef char CHAR;
typedef char BOOL;
typedef unsigned char UCHAR;
typedef int INT;
typedef unsigned int UINT;
typedef long LONG;
typedef unsigned long ULONG;
typedef short SHORT;
typedef unsigned short USHORT;
#ifndef ULONG64_DEFINED
#define ULONG64_DEFINED
typedef unsigned long long ULONG64;
#endif
/* Define basic alignment type used in block and byte pool operations. This data type must
be at least 32-bits in size and also be large enough to hold a pointer type. */
#ifndef ALIGN_TYPE_DEFINED
#define ALIGN_TYPE_DEFINED
#define ALIGN_TYPE ULONG
#endif
#endif
/* Define FileX internal protection macros. If FX_SINGLE_THREAD is defined, /* Define FileX internal protection macros. If FX_SINGLE_THREAD is defined,
these protection macros are effectively disabled. However, for multi-thread these protection macros are effectively disabled. However, for multi-thread
uses, the macros are setup to utilize a ThreadX mutex for multiple thread uses, the macros are setup to utilize a ThreadX mutex for multiple thread
access control into an open media. */ access control into an open media. */
#ifdef FX_SINGLE_THREAD #if defined(FX_SINGLE_THREAD) || defined(FX_STANDALONE_ENABLE)
#define FX_PROTECT #define FX_PROTECT
#define FX_UNPROTECT #define FX_UNPROTECT
#else #else
@ -96,16 +131,33 @@ typedef unsigned long long ULONG64;
/* Define interrupt lockout constructs to protect the system date/time from being updated /* Define interrupt lockout constructs to protect the system date/time from being updated
while they are being read. */ while they are being read. */
#ifndef FX_STANDALONE_ENABLE
#ifndef FX_INT_SAVE_AREA
#define FX_INT_SAVE_AREA unsigned int old_interrupt_posture; #define FX_INT_SAVE_AREA unsigned int old_interrupt_posture;
#define FX_DISABLE_INTS old_interrupt_posture = tx_interrupt_control(TX_INT_DISABLE); #endif
#define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture);
#ifndef FX_DISABLE_INTS
#define FX_DISABLE_INTS old_interrupt_posture = tx_interrupt_control(TX_INT_DISABLE);
#endif
#ifndef FX_RESTORE_INTS
#define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture);
#endif
#else
/* Disable use of ThreadX protection in standalone mode for FileX */
#ifndef FX_LEGACY_INTERRUPT_PROTECTION
#define FX_LEGACY_INTERRUPT_PROTECTION
#endif
#define FX_INT_SAVE_AREA
#define FX_DISABLE_INTS
#define FX_RESTORE_INTS
#endif
/* Define the error checking logic to determine if there is a caller error in the FileX API. /* Define the error checking logic to determine if there is a caller error in the FileX API.
The default definitions assume ThreadX is being used. This code can be completely turned The default definitions assume ThreadX is being used. This code can be completely turned
off by just defining these macros to white space. */ off by just defining these macros to white space. */
#ifndef FX_STANDALONE_ENABLE
#ifndef TX_TIMER_PROCESS_IN_ISR #ifndef TX_TIMER_PROCESS_IN_ISR
#define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \ #define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \
@ -125,6 +177,10 @@ typedef unsigned long long ULONG64;
(_tx_thread_current_ptr == TX_NULL)) \ (_tx_thread_current_ptr == TX_NULL)) \
return(FX_CALLER_ERROR); return(FX_CALLER_ERROR);
#endif #endif
#else
#define FX_CALLER_CHECKING_EXTERNS
#define FX_CALLER_CHECKING_CODE
#endif
/* Define the update rate of the system timer. These values may also be defined at the command /* Define the update rate of the system timer. These values may also be defined at the command
@ -146,7 +202,7 @@ typedef unsigned long long ULONG64;
this value is derived from TX_TIMER_TICKS_PER_SECOND. */ this value is derived from TX_TIMER_TICKS_PER_SECOND. */
#ifndef FX_UPDATE_RATE_IN_TICKS #ifndef FX_UPDATE_RATE_IN_TICKS
#ifdef TX_TIMER_TICKS_PER_SECOND #if (defined(TX_TIMER_TICKS_PER_SECOND) && (!defined(FX_STANDALONE_ENABLE)))
#define FX_UPDATE_RATE_IN_TICKS (TX_TIMER_TICKS_PER_SECOND * FX_UPDATE_RATE_IN_SECONDS) #define FX_UPDATE_RATE_IN_TICKS (TX_TIMER_TICKS_PER_SECOND * FX_UPDATE_RATE_IN_SECONDS)
#else #else
#define FX_UPDATE_RATE_IN_TICKS 1000 #define FX_UPDATE_RATE_IN_TICKS 1000
@ -158,7 +214,7 @@ typedef unsigned long long ULONG64;
#ifdef FX_SYSTEM_INIT #ifdef FX_SYSTEM_INIT
CHAR _fx_version_id[] = CHAR _fx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * FileX Cortex-M3/GNU Version 6.1 *"; "Copyright (c) Microsoft Corporation. All rights reserved. * FileX Cortex-M3/GNU Version 6.1.5 *";
#else #else
extern CHAR _fx_version_id[]; extern CHAR _fx_version_id[];
#endif #endif

View File

@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */ /* PORT SPECIFIC C INFORMATION RELEASE */
/* */ /* */
/* fx_port.h Cortex-M4/GNU */ /* fx_port.h Cortex-M4/GNU */
/* 6.1 */ /* 6.1.5 */
/* */ /* */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
@ -47,6 +47,8 @@
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
@ -68,6 +70,7 @@
/* Include the ThreadX api file. */ /* Include the ThreadX api file. */
#ifndef FX_STANDALONE_ENABLE
#include "tx_api.h" #include "tx_api.h"
@ -78,13 +81,45 @@
typedef unsigned long long ULONG64; typedef unsigned long long ULONG64;
#endif #endif
#else
/* Define compiler library include files. */
#include <stdint.h>
#include <stdlib.h>
#define VOID void
typedef char CHAR;
typedef char BOOL;
typedef unsigned char UCHAR;
typedef int INT;
typedef unsigned int UINT;
typedef long LONG;
typedef unsigned long ULONG;
typedef short SHORT;
typedef unsigned short USHORT;
#ifndef ULONG64_DEFINED
#define ULONG64_DEFINED
typedef unsigned long long ULONG64;
#endif
/* Define basic alignment type used in block and byte pool operations. This data type must
be at least 32-bits in size and also be large enough to hold a pointer type. */
#ifndef ALIGN_TYPE_DEFINED
#define ALIGN_TYPE_DEFINED
#define ALIGN_TYPE ULONG
#endif
#endif
/* Define FileX internal protection macros. If FX_SINGLE_THREAD is defined, /* Define FileX internal protection macros. If FX_SINGLE_THREAD is defined,
these protection macros are effectively disabled. However, for multi-thread these protection macros are effectively disabled. However, for multi-thread
uses, the macros are setup to utilize a ThreadX mutex for multiple thread uses, the macros are setup to utilize a ThreadX mutex for multiple thread
access control into an open media. */ access control into an open media. */
#ifdef FX_SINGLE_THREAD #if defined(FX_SINGLE_THREAD) || defined(FX_STANDALONE_ENABLE)
#define FX_PROTECT #define FX_PROTECT
#define FX_UNPROTECT #define FX_UNPROTECT
#else #else
@ -96,16 +131,33 @@ typedef unsigned long long ULONG64;
/* Define interrupt lockout constructs to protect the system date/time from being updated /* Define interrupt lockout constructs to protect the system date/time from being updated
while they are being read. */ while they are being read. */
#ifndef FX_STANDALONE_ENABLE
#ifndef FX_INT_SAVE_AREA
#define FX_INT_SAVE_AREA unsigned int old_interrupt_posture; #define FX_INT_SAVE_AREA unsigned int old_interrupt_posture;
#define FX_DISABLE_INTS old_interrupt_posture = tx_interrupt_control(TX_INT_DISABLE); #endif
#define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture);
#ifndef FX_DISABLE_INTS
#define FX_DISABLE_INTS old_interrupt_posture = tx_interrupt_control(TX_INT_DISABLE);
#endif
#ifndef FX_RESTORE_INTS
#define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture);
#endif
#else
/* Disable use of ThreadX protection in standalone mode for FileX */
#ifndef FX_LEGACY_INTERRUPT_PROTECTION
#define FX_LEGACY_INTERRUPT_PROTECTION
#endif
#define FX_INT_SAVE_AREA
#define FX_DISABLE_INTS
#define FX_RESTORE_INTS
#endif
/* Define the error checking logic to determine if there is a caller error in the FileX API. /* Define the error checking logic to determine if there is a caller error in the FileX API.
The default definitions assume ThreadX is being used. This code can be completely turned The default definitions assume ThreadX is being used. This code can be completely turned
off by just defining these macros to white space. */ off by just defining these macros to white space. */
#ifndef FX_STANDALONE_ENABLE
#ifndef TX_TIMER_PROCESS_IN_ISR #ifndef TX_TIMER_PROCESS_IN_ISR
#define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \ #define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \
@ -125,6 +177,10 @@ typedef unsigned long long ULONG64;
(_tx_thread_current_ptr == TX_NULL)) \ (_tx_thread_current_ptr == TX_NULL)) \
return(FX_CALLER_ERROR); return(FX_CALLER_ERROR);
#endif #endif
#else
#define FX_CALLER_CHECKING_EXTERNS
#define FX_CALLER_CHECKING_CODE
#endif
/* Define the update rate of the system timer. These values may also be defined at the command /* Define the update rate of the system timer. These values may also be defined at the command
@ -146,7 +202,7 @@ typedef unsigned long long ULONG64;
this value is derived from TX_TIMER_TICKS_PER_SECOND. */ this value is derived from TX_TIMER_TICKS_PER_SECOND. */
#ifndef FX_UPDATE_RATE_IN_TICKS #ifndef FX_UPDATE_RATE_IN_TICKS
#ifdef TX_TIMER_TICKS_PER_SECOND #if (defined(TX_TIMER_TICKS_PER_SECOND) && (!defined(FX_STANDALONE_ENABLE)))
#define FX_UPDATE_RATE_IN_TICKS (TX_TIMER_TICKS_PER_SECOND * FX_UPDATE_RATE_IN_SECONDS) #define FX_UPDATE_RATE_IN_TICKS (TX_TIMER_TICKS_PER_SECOND * FX_UPDATE_RATE_IN_SECONDS)
#else #else
#define FX_UPDATE_RATE_IN_TICKS 1000 #define FX_UPDATE_RATE_IN_TICKS 1000
@ -158,7 +214,7 @@ typedef unsigned long long ULONG64;
#ifdef FX_SYSTEM_INIT #ifdef FX_SYSTEM_INIT
CHAR _fx_version_id[] = CHAR _fx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * FileX Cortex-M4/GNU Version 6.1 *"; "Copyright (c) Microsoft Corporation. All rights reserved. * FileX Cortex-M4/GNU Version 6.1.5 *";
#else #else
extern CHAR _fx_version_id[]; extern CHAR _fx_version_id[];
#endif #endif

View File

@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */ /* PORT SPECIFIC C INFORMATION RELEASE */
/* */ /* */
/* fx_port.h Cortex-M7/GNU */ /* fx_port.h Cortex-M7/GNU */
/* 6.1 */ /* 6.1.5 */
/* */ /* */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
@ -47,6 +47,8 @@
/* 05-19-2020 William E. Lamie Initial Version 6.0 */ /* 05-19-2020 William E. Lamie Initial Version 6.0 */
/* 09-30-2020 William E. Lamie Modified comment(s), */ /* 09-30-2020 William E. Lamie Modified comment(s), */
/* resulting in version 6.1 */ /* resulting in version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
@ -68,6 +70,7 @@
/* Include the ThreadX api file. */ /* Include the ThreadX api file. */
#ifndef FX_STANDALONE_ENABLE
#include "tx_api.h" #include "tx_api.h"
@ -78,13 +81,45 @@
typedef unsigned long long ULONG64; typedef unsigned long long ULONG64;
#endif #endif
#else
/* Define compiler library include files. */
#include <stdint.h>
#include <stdlib.h>
#define VOID void
typedef char CHAR;
typedef char BOOL;
typedef unsigned char UCHAR;
typedef int INT;
typedef unsigned int UINT;
typedef long LONG;
typedef unsigned long ULONG;
typedef short SHORT;
typedef unsigned short USHORT;
#ifndef ULONG64_DEFINED
#define ULONG64_DEFINED
typedef unsigned long long ULONG64;
#endif
/* Define basic alignment type used in block and byte pool operations. This data type must
be at least 32-bits in size and also be large enough to hold a pointer type. */
#ifndef ALIGN_TYPE_DEFINED
#define ALIGN_TYPE_DEFINED
#define ALIGN_TYPE ULONG
#endif
#endif
/* Define FileX internal protection macros. If FX_SINGLE_THREAD is defined, /* Define FileX internal protection macros. If FX_SINGLE_THREAD is defined,
these protection macros are effectively disabled. However, for multi-thread these protection macros are effectively disabled. However, for multi-thread
uses, the macros are setup to utilize a ThreadX mutex for multiple thread uses, the macros are setup to utilize a ThreadX mutex for multiple thread
access control into an open media. */ access control into an open media. */
#ifdef FX_SINGLE_THREAD #if defined(FX_SINGLE_THREAD) || defined(FX_STANDALONE_ENABLE)
#define FX_PROTECT #define FX_PROTECT
#define FX_UNPROTECT #define FX_UNPROTECT
#else #else
@ -96,16 +131,33 @@ typedef unsigned long long ULONG64;
/* Define interrupt lockout constructs to protect the system date/time from being updated /* Define interrupt lockout constructs to protect the system date/time from being updated
while they are being read. */ while they are being read. */
#ifndef FX_STANDALONE_ENABLE
#ifndef FX_INT_SAVE_AREA
#define FX_INT_SAVE_AREA unsigned int old_interrupt_posture; #define FX_INT_SAVE_AREA unsigned int old_interrupt_posture;
#define FX_DISABLE_INTS old_interrupt_posture = tx_interrupt_control(TX_INT_DISABLE); #endif
#define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture);
#ifndef FX_DISABLE_INTS
#define FX_DISABLE_INTS old_interrupt_posture = tx_interrupt_control(TX_INT_DISABLE);
#endif
#ifndef FX_RESTORE_INTS
#define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture);
#endif
#else
/* Disable use of ThreadX protection in standalone mode for FileX */
#ifndef FX_LEGACY_INTERRUPT_PROTECTION
#define FX_LEGACY_INTERRUPT_PROTECTION
#endif
#define FX_INT_SAVE_AREA
#define FX_DISABLE_INTS
#define FX_RESTORE_INTS
#endif
/* Define the error checking logic to determine if there is a caller error in the FileX API. /* Define the error checking logic to determine if there is a caller error in the FileX API.
The default definitions assume ThreadX is being used. This code can be completely turned The default definitions assume ThreadX is being used. This code can be completely turned
off by just defining these macros to white space. */ off by just defining these macros to white space. */
#ifndef FX_STANDALONE_ENABLE
#ifndef TX_TIMER_PROCESS_IN_ISR #ifndef TX_TIMER_PROCESS_IN_ISR
#define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \ #define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \
@ -125,6 +177,10 @@ typedef unsigned long long ULONG64;
(_tx_thread_current_ptr == TX_NULL)) \ (_tx_thread_current_ptr == TX_NULL)) \
return(FX_CALLER_ERROR); return(FX_CALLER_ERROR);
#endif #endif
#else
#define FX_CALLER_CHECKING_EXTERNS
#define FX_CALLER_CHECKING_CODE
#endif
/* Define the update rate of the system timer. These values may also be defined at the command /* Define the update rate of the system timer. These values may also be defined at the command
@ -146,7 +202,7 @@ typedef unsigned long long ULONG64;
this value is derived from TX_TIMER_TICKS_PER_SECOND. */ this value is derived from TX_TIMER_TICKS_PER_SECOND. */
#ifndef FX_UPDATE_RATE_IN_TICKS #ifndef FX_UPDATE_RATE_IN_TICKS
#ifdef TX_TIMER_TICKS_PER_SECOND #if (defined(TX_TIMER_TICKS_PER_SECOND) && (!defined(FX_STANDALONE_ENABLE)))
#define FX_UPDATE_RATE_IN_TICKS (TX_TIMER_TICKS_PER_SECOND * FX_UPDATE_RATE_IN_SECONDS) #define FX_UPDATE_RATE_IN_TICKS (TX_TIMER_TICKS_PER_SECOND * FX_UPDATE_RATE_IN_SECONDS)
#else #else
#define FX_UPDATE_RATE_IN_TICKS 1000 #define FX_UPDATE_RATE_IN_TICKS 1000
@ -158,7 +214,7 @@ typedef unsigned long long ULONG64;
#ifdef FX_SYSTEM_INIT #ifdef FX_SYSTEM_INIT
CHAR _fx_version_id[] = CHAR _fx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * FileX Cortex-M7/GNU Version 6.1 *"; "Copyright (c) Microsoft Corporation. All rights reserved. * FileX Cortex-M7/GNU Version 6.1.5 *";
#else #else
extern CHAR _fx_version_id[]; extern CHAR _fx_version_id[];
#endif #endif

View File

@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */ /* PORT SPECIFIC C INFORMATION RELEASE */
/* */ /* */
/* fx_port.h Generic */ /* fx_port.h Generic */
/* 6.1.2 */ /* 6.1.5 */
/* */ /* */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
@ -45,6 +45,9 @@
/* DATE NAME DESCRIPTION */ /* DATE NAME DESCRIPTION */
/* */ /* */
/* 11-09-2020 William E. Lamie Initial Version 6.1.2 */ /* 11-09-2020 William E. Lamie Initial Version 6.1.2 */
/* 03-02-2021 William E. Lamie Modified comment(s), and */
/* added standalone support, */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
@ -66,6 +69,7 @@
/* Include the ThreadX api file. */ /* Include the ThreadX api file. */
#ifndef FX_STANDALONE_ENABLE
#include "tx_api.h" #include "tx_api.h"
@ -76,13 +80,45 @@
typedef unsigned long long ULONG64; typedef unsigned long long ULONG64;
#endif #endif
#else
/* Define compiler library include files. */
#include <stdint.h>
#include <stdlib.h>
#define VOID void
typedef char CHAR;
typedef char BOOL;
typedef unsigned char UCHAR;
typedef int INT;
typedef unsigned int UINT;
typedef long LONG;
typedef unsigned long ULONG;
typedef short SHORT;
typedef unsigned short USHORT;
#ifndef ULONG64_DEFINED
#define ULONG64_DEFINED
typedef unsigned long long ULONG64;
#endif
/* Define basic alignment type used in block and byte pool operations. This data type must
be at least 32-bits in size and also be large enough to hold a pointer type. */
#ifndef ALIGN_TYPE_DEFINED
#define ALIGN_TYPE_DEFINED
#define ALIGN_TYPE ULONG
#endif
#endif
/* Define FileX internal protection macros. If FX_SINGLE_THREAD is defined, /* Define FileX internal protection macros. If FX_SINGLE_THREAD is defined,
these protection macros are effectively disabled. However, for multi-thread these protection macros are effectively disabled. However, for multi-thread
uses, the macros are setup to utilize a ThreadX mutex for multiple thread uses, the macros are setup to utilize a ThreadX mutex for multiple thread
access control into an open media. */ access control into an open media. */
#ifdef FX_SINGLE_THREAD #if defined(FX_SINGLE_THREAD) || defined(FX_STANDALONE_ENABLE)
#define FX_PROTECT #define FX_PROTECT
#define FX_UNPROTECT #define FX_UNPROTECT
#else #else
@ -94,6 +130,7 @@ typedef unsigned long long ULONG64;
/* Define interrupt lockout constructs to protect the system date/time from being updated /* Define interrupt lockout constructs to protect the system date/time from being updated
while they are being read. */ while they are being read. */
#ifndef FX_STANDALONE_ENABLE
#ifndef FX_INT_SAVE_AREA #ifndef FX_INT_SAVE_AREA
#define FX_INT_SAVE_AREA unsigned int old_interrupt_posture; #define FX_INT_SAVE_AREA unsigned int old_interrupt_posture;
#endif #endif
@ -105,11 +142,21 @@ typedef unsigned long long ULONG64;
#ifndef FX_RESTORE_INTS #ifndef FX_RESTORE_INTS
#define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture); #define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture);
#endif #endif
#else
/* Disable use of ThreadX protection in standalone mode for FileX */
#ifndef FX_LEGACY_INTERRUPT_PROTECTION
#define FX_LEGACY_INTERRUPT_PROTECTION
#endif
#define FX_INT_SAVE_AREA
#define FX_DISABLE_INTS
#define FX_RESTORE_INTS
#endif
/* Define the error checking logic to determine if there is a caller error in the FileX API. /* Define the error checking logic to determine if there is a caller error in the FileX API.
The default definitions assume ThreadX is being used. This code can be completely turned The default definitions assume ThreadX is being used. This code can be completely turned
off by just defining these macros to white space. */ off by just defining these macros to white space. */
#ifndef FX_STANDALONE_ENABLE
#ifndef TX_TIMER_PROCESS_IN_ISR #ifndef TX_TIMER_PROCESS_IN_ISR
#define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \ #define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \
@ -129,6 +176,10 @@ typedef unsigned long long ULONG64;
(_tx_thread_current_ptr == TX_NULL)) \ (_tx_thread_current_ptr == TX_NULL)) \
return(FX_CALLER_ERROR); return(FX_CALLER_ERROR);
#endif #endif
#else
#define FX_CALLER_CHECKING_EXTERNS
#define FX_CALLER_CHECKING_CODE
#endif
/* Define the update rate of the system timer. These values may also be defined at the command /* Define the update rate of the system timer. These values may also be defined at the command
@ -150,7 +201,7 @@ typedef unsigned long long ULONG64;
this value is derived from TX_TIMER_TICKS_PER_SECOND. */ this value is derived from TX_TIMER_TICKS_PER_SECOND. */
#ifndef FX_UPDATE_RATE_IN_TICKS #ifndef FX_UPDATE_RATE_IN_TICKS
#ifdef TX_TIMER_TICKS_PER_SECOND #if (defined(TX_TIMER_TICKS_PER_SECOND) && (!defined(FX_STANDALONE_ENABLE)))
#define FX_UPDATE_RATE_IN_TICKS (TX_TIMER_TICKS_PER_SECOND * FX_UPDATE_RATE_IN_SECONDS) #define FX_UPDATE_RATE_IN_TICKS (TX_TIMER_TICKS_PER_SECOND * FX_UPDATE_RATE_IN_SECONDS)
#else #else
#define FX_UPDATE_RATE_IN_TICKS 1000 #define FX_UPDATE_RATE_IN_TICKS 1000
@ -162,7 +213,7 @@ typedef unsigned long long ULONG64;
#ifdef FX_SYSTEM_INIT #ifdef FX_SYSTEM_INIT
CHAR _fx_version_id[] = CHAR _fx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * FileX Generic Version 6.1.2 *"; "Copyright (c) Microsoft Corporation. All rights reserved. * FileX Generic Version 6.1.5 *";
#else #else
extern CHAR _fx_version_id[]; extern CHAR _fx_version_id[];
#endif #endif

View File

@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */ /* PORT SPECIFIC C INFORMATION RELEASE */
/* */ /* */
/* fx_port.h Linux/GCC */ /* fx_port.h Linux/GCC */
/* 6.1 */ /* 6.1.5 */
/* */ /* */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
@ -45,6 +45,9 @@
/* DATE NAME DESCRIPTION */ /* DATE NAME DESCRIPTION */
/* */ /* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */ /* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), and */
/* added standalone support, */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
@ -67,8 +70,42 @@
/* Include the ThreadX api file. */ /* Include the ThreadX api file. */
#ifndef FX_STANDALONE_ENABLE
#include "tx_api.h" #include "tx_api.h"
#else
/* Define compiler library include files. */
#include <stdint.h>
#include <stdlib.h>
#define VOID void
typedef char CHAR;
typedef char BOOL;
typedef unsigned char UCHAR;
typedef int INT;
typedef unsigned int UINT;
typedef long LONG;
typedef unsigned long ULONG;
typedef short SHORT;
typedef unsigned short USHORT;
#ifndef ULONG64_DEFINED
#define ULONG64_DEFINED
typedef unsigned long long ULONG64;
#endif
/* Define basic alignment type used in block and byte pool operations. This data type must
be at least 32-bits in size and also be large enough to hold a pointer type. */
#ifndef ALIGN_TYPE_DEFINED
#define ALIGN_TYPE_DEFINED
#define ALIGN_TYPE ULONG
#endif
#endif
#ifdef FX_REGRESSION_TEST #ifdef FX_REGRESSION_TEST
/* Define parameters for regression test suite. */ /* Define parameters for regression test suite. */
@ -228,7 +265,7 @@ extern VOID fault_tolerant_apply_log_callback(struct FX_MEDIA_STRUCT *media_ptr,
/* Reduce the mutex error checking for testing purpose. */ /* Reduce the mutex error checking for testing purpose. */
#ifdef FX_SINGLE_THREAD #if defined(FX_SINGLE_THREAD) || defined(FX_STANDALONE_ENABLE)
#define FX_PROTECT #define FX_PROTECT
#define FX_UNPROTECT #define FX_UNPROTECT
#else #else
@ -240,15 +277,25 @@ extern VOID fault_tolerant_apply_log_callback(struct FX_MEDIA_STRUCT *media_ptr,
/* Define interrupt lockout constructs to protect the system date/time from being updated /* Define interrupt lockout constructs to protect the system date/time from being updated
while they are being read. */ while they are being read. */
#ifndef FX_STANDALONE_ENABLE
#define FX_INT_SAVE_AREA unsigned int old_interrupt_posture; #define FX_INT_SAVE_AREA unsigned int old_interrupt_posture;
#define FX_DISABLE_INTS old_interrupt_posture = tx_interrupt_control(TX_INT_DISABLE); #define FX_DISABLE_INTS old_interrupt_posture = tx_interrupt_control(TX_INT_DISABLE);
#define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture); #define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture);
#else
/* Disable use of ThreadX protection in standalone mode for FileX */
#ifndef FX_LEGACY_INTERRUPT_PROTECTION
#define FX_LEGACY_INTERRUPT_PROTECTION
#endif
#define FX_INT_SAVE_AREA
#define FX_DISABLE_INTS
#define FX_RESTORE_INTS
#endif
/* Define the error checking logic to determine if there is a caller error in the FileX API. /* Define the error checking logic to determine if there is a caller error in the FileX API.
The default definitions assume ThreadX is being used. This code can be completely turned The default definitions assume ThreadX is being used. This code can be completely turned
off by just defining these macros to white space. */ off by just defining these macros to white space. */
#ifndef FX_STANDALONE_ENABLE
#ifndef TX_TIMER_PROCESS_IN_ISR #ifndef TX_TIMER_PROCESS_IN_ISR
#define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \ #define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \
@ -268,7 +315,10 @@ extern VOID fault_tolerant_apply_log_callback(struct FX_MEDIA_STRUCT *media_ptr,
(_tx_thread_current_ptr == TX_NULL)) \ (_tx_thread_current_ptr == TX_NULL)) \
return(FX_CALLER_ERROR); return(FX_CALLER_ERROR);
#endif #endif
#else
#define FX_CALLER_CHECKING_EXTERNS
#define FX_CALLER_CHECKING_CODE
#endif
/* Define the update rate of the system timer. These values may also be defined at the command /* Define the update rate of the system timer. These values may also be defined at the command
line when compiling the fx_system_initialize.c module in the FileX library build. Alternatively, they can line when compiling the fx_system_initialize.c module in the FileX library build. Alternatively, they can
@ -283,13 +333,12 @@ extern VOID fault_tolerant_apply_log_callback(struct FX_MEDIA_STRUCT *media_ptr,
#define FX_UPDATE_RATE_IN_TICKS 1000 /* Same update rate, but in ticks */ #define FX_UPDATE_RATE_IN_TICKS 1000 /* Same update rate, but in ticks */
#endif #endif
typedef unsigned long long UINT64;
/* Define the version ID of FileX. This may be utilized by the application. */ /* Define the version ID of FileX. This may be utilized by the application. */
#ifdef FX_SYSTEM_INIT #ifdef FX_SYSTEM_INIT
CHAR _fx_version_id[] = CHAR _fx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * FileX Linux/GCC Version 6.1 *"; "Copyright (c) Microsoft Corporation. All rights reserved. * FileX Linux/GCC Version 6.1.5 *";
#else #else
extern CHAR _fx_version_id[]; extern CHAR _fx_version_id[];
#endif #endif

View File

@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */ /* PORT SPECIFIC C INFORMATION RELEASE */
/* */ /* */
/* fx_port.h Win32/Visual */ /* fx_port.h Win32/Visual */
/* 6.1 */ /* 6.1.5 */
/* */ /* */
/* AUTHOR */ /* AUTHOR */
/* */ /* */
@ -45,6 +45,9 @@
/* DATE NAME DESCRIPTION */ /* DATE NAME DESCRIPTION */
/* */ /* */
/* 09-30-2020 William E. Lamie Initial Version 6.1 */ /* 09-30-2020 William E. Lamie Initial Version 6.1 */
/* 03-02-2021 William E. Lamie Modified comment(s), and */
/* added standalone support, */
/* resulting in version 6.1.5 */
/* */ /* */
/**************************************************************************/ /**************************************************************************/
@ -66,6 +69,7 @@
/* Include the ThreadX api file. */ /* Include the ThreadX api file. */
#ifndef FX_STANDALONE_ENABLE
#include "tx_api.h" #include "tx_api.h"
@ -76,13 +80,46 @@
typedef unsigned long long ULONG64; typedef unsigned long long ULONG64;
#endif #endif
#else
/* Define compiler library include files. */
#include <stdint.h>
#include <stdlib.h>
#define VOID void
typedef char CHAR;
typedef char BOOL;
typedef unsigned char UCHAR;
typedef int INT;
typedef unsigned int UINT;
typedef long LONG;
typedef unsigned long ULONG;
typedef short SHORT;
typedef unsigned short USHORT;
#ifndef ULONG64_DEFINED
#define ULONG64_DEFINED
typedef unsigned long long ULONG64;
#endif
/* Define basic alignment type used in block and byte pool operations. This data type must
be at least 32-bits in size and also be large enough to hold a pointer type. */
#ifndef ALIGN_TYPE_DEFINED
#define ALIGN_TYPE_DEFINED
#define ALIGN_TYPE ULONG
#endif
#endif
/* Define FileX internal protection macros. If FX_SINGLE_THREAD is defined, /* Define FileX internal protection macros. If FX_SINGLE_THREAD is defined,
these protection macros are effectively disabled. However, for multi-thread these protection macros are effectively disabled. However, for multi-thread
uses, the macros are setup to utilize a ThreadX mutex for multiple thread uses, the macros are setup to utilize a ThreadX mutex for multiple thread
access control into an open media. */ access control into an open media. */
#ifdef FX_SINGLE_THREAD #if defined(FX_SINGLE_THREAD) || defined(FX_STANDALONE_ENABLE)
#define FX_PROTECT #define FX_PROTECT
#define FX_UNPROTECT #define FX_UNPROTECT
#else #else
@ -95,15 +132,21 @@ typedef unsigned long long ULONG64;
/* Define interrupt lockout constructs to protect the system date/time from being updated /* Define interrupt lockout constructs to protect the system date/time from being updated
while they are being read. */ while they are being read. */
#ifndef FX_STANDALONE_ENABLE
#define FX_INT_SAVE_AREA unsigned int old_interrupt_posture; #define FX_INT_SAVE_AREA unsigned int old_interrupt_posture;
#define FX_DISABLE_INTS old_interrupt_posture = tx_interrupt_control(TX_INT_DISABLE); #define FX_DISABLE_INTS old_interrupt_posture = tx_interrupt_control(TX_INT_DISABLE);
#define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture); #define FX_RESTORE_INTS tx_interrupt_control(old_interrupt_posture);
#else
#define FX_INT_SAVE_AREA
#define FX_DISABLE_INTS
#define FX_RESTORE_INTS
#endif
/* Define the error checking logic to determine if there is a caller error in the FileX API. /* Define the error checking logic to determine if there is a caller error in the FileX API.
The default definitions assume ThreadX is being used. This code can be completely turned The default definitions assume ThreadX is being used. This code can be completely turned
off by just defining these macros to white space. */ off by just defining these macros to white space. */
#ifndef FX_STANDALONE_ENABLE
#ifndef TX_TIMER_PROCESS_IN_ISR #ifndef TX_TIMER_PROCESS_IN_ISR
#define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \ #define FX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \
@ -123,7 +166,10 @@ typedef unsigned long long ULONG64;
(_tx_thread_current_ptr == TX_NULL)) \ (_tx_thread_current_ptr == TX_NULL)) \
return(FX_CALLER_ERROR); return(FX_CALLER_ERROR);
#endif #endif
#else
#define FX_CALLER_CHECKING_EXTERNS
#define FX_CALLER_CHECKING_CODE
#endif
/* Define the update rate of the system timer. These values may also be defined at the command /* Define the update rate of the system timer. These values may also be defined at the command
line when compiling the fx_system_initialize.c module in the FileX library build. Alternatively, they can line when compiling the fx_system_initialize.c module in the FileX library build. Alternatively, they can
@ -144,7 +190,7 @@ typedef unsigned long long ULONG64;
this value is derived from TX_TIMER_TICKS_PER_SECOND. */ this value is derived from TX_TIMER_TICKS_PER_SECOND. */
#ifndef FX_UPDATE_RATE_IN_TICKS #ifndef FX_UPDATE_RATE_IN_TICKS
#ifdef TX_TIMER_TICKS_PER_SECOND #if (defined(TX_TIMER_TICKS_PER_SECOND) && (!defined(FX_STANDALONE_ENABLE)))
#define FX_UPDATE_RATE_IN_TICKS (TX_TIMER_TICKS_PER_SECOND * FX_UPDATE_RATE_IN_SECONDS) #define FX_UPDATE_RATE_IN_TICKS (TX_TIMER_TICKS_PER_SECOND * FX_UPDATE_RATE_IN_SECONDS)
#else #else
#define FX_UPDATE_RATE_IN_TICKS 1000 #define FX_UPDATE_RATE_IN_TICKS 1000
@ -156,7 +202,7 @@ typedef unsigned long long ULONG64;
#ifdef FX_SYSTEM_INIT #ifdef FX_SYSTEM_INIT
CHAR _fx_version_id[] = CHAR _fx_version_id[] =
"Copyright (c) Microsoft Corporation. All rights reserved. * FileX Win32/Version 6.1 *"; "Copyright (c) Microsoft Corporation. All rights reserved. * FileX Win32/Version 6.1.5 *";
#else #else
extern CHAR _fx_version_id[]; extern CHAR _fx_version_id[];
#endif #endif

View File

@ -1,6 +1,5 @@
/* This is a small demo of the high-performance FileX FAT file system. It includes setup for /* This is a small demo of the high-performance FileX FAT file system. It includes setup for
a small 34KB RAM disk and a loop that writes and reads a small file. */ a small 34KB RAM disk and a loop that writes and reads a small file. */
#include "fx_api.h" #include "fx_api.h"
#ifdef FX_ENABLE_FAULT_TOLERANT #ifdef FX_ENABLE_FAULT_TOLERANT
#include "fx_fault_tolerant.h" #include "fx_fault_tolerant.h"
@ -33,25 +32,41 @@ void thread_0_entry(ULONG thread_input);
FX_MEDIA ram_disk; FX_MEDIA ram_disk;
FX_FILE my_file; FX_FILE my_file;
CHAR *ram_disk_memory;
#ifndef FX_STANDALONE_ENABLE
CHAR *ram_disk_memory;
#else
unsigned char ram_disk_memory[256*512];
#endif
/* Define ThreadX global data structures. */ /* Define ThreadX global data structures. */
#ifndef FX_STANDALONE_ENABLE
TX_THREAD thread_0; TX_THREAD thread_0;
#endif
ULONG thread_0_counter; ULONG thread_0_counter;
void main(void) void main(void)
{ {
#ifdef FX_STANDALONE_ENABLE
/* Initialize FileX. */
fx_system_initialize();
thread_0_entry(0);
#else
/* Enter the ThreadX kernel. */ /* Enter the ThreadX kernel. */
tx_kernel_enter(); tx_kernel_enter();
#endif
} }
/* Define what the initial system looks like. */ /* Define what the initial system looks like. */
#ifndef FX_STANDALONE_ENABLE
void tx_application_define(void *first_unused_memory) void tx_application_define(void *first_unused_memory)
{ {
@ -76,7 +91,7 @@ CHAR *pointer;
fx_system_initialize(); fx_system_initialize();
} }
#endif
void thread_0_entry(ULONG thread_input) void thread_0_entry(ULONG thread_input)
{ {