mirror of
https://github.com/eclipse-threadx/filex.git
synced 2026-09-14 04:05:59 +08:00
Compare commits
20
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
048a01ed64 | ||
|
|
584c5fff0d | ||
|
|
047f822392 | ||
|
|
fb48c62046 | ||
|
|
ecd70a28fe | ||
|
|
2d11b561c3 | ||
|
|
42b4ee916e | ||
|
|
84d35d9b27 | ||
|
|
8112cd45cc | ||
|
|
b1f509820d | ||
|
|
9023227ba4 | ||
|
|
c7ec0eaedf | ||
|
|
1312f87f3b | ||
|
|
98ce59bea2 | ||
|
|
151b9158ee | ||
|
|
ee280d9d14 | ||
|
|
1b85eb2141 | ||
|
|
3c00cd8b13 | ||
|
|
f79b511e43 | ||
|
|
42d10db66b |
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve Azure RTOS.
|
||||
about: Create a report to help us improve Eclipse ThreadX.
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
@@ -13,7 +13,7 @@ A clear and concise description of what the bug is.
|
||||
Please also mention any information which could help others to understand
|
||||
the problem you're facing:
|
||||
- What target device are you using?
|
||||
- Which version of Azure RTOS?
|
||||
- Which version of Eclipse ThreadX?
|
||||
- What toolchain and environment?
|
||||
- What have you tried to diagnose or workaround this issue?
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea or enhancement to existing feature for Azure RTOS.
|
||||
about: Suggest an idea or enhancement to existing feature for Eclipse ThreadX.
|
||||
title: ''
|
||||
labels: feature
|
||||
assignees: ''
|
||||
|
||||
@@ -8,12 +8,12 @@ assignees: ''
|
||||
---
|
||||
|
||||
**Is this request related to a particular hardware platform, SoC, board? Please describe.**
|
||||
Describe in details the hardware support being requested and why this support benefits Azure RTOS.
|
||||
Describe in details the hardware support being requested and why this support benefits Eclipse ThreadX.
|
||||
|
||||
**Describe why you are asking for this support?**
|
||||
Describe why you are asking for this support.
|
||||
|
||||
If this is a new board or SoC, please state whether you are willing to maintain the Azure RTOS support together with you.
|
||||
If this is a new board or SoC, please state whether you are willing to maintain the Eclipse ThreadX support together with you.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or graphics (drag-and-drop an image) about the hardware here.
|
||||
|
||||
@@ -22,4 +22,4 @@ jobs:
|
||||
pull-requests: write
|
||||
pages: write
|
||||
id-token: write
|
||||
uses: azure-rtos/threadx/.github/workflows/regression_template.yml@master
|
||||
uses: eclipse-threadx/threadx/.github/workflows/regression_template.yml@master
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
||||
|
||||
# Set up the project
|
||||
project(filex
|
||||
|
||||
@@ -123,7 +123,7 @@ Instruction for building the FileX as static library using Arm GNU Toolchain and
|
||||
|
||||
## Licensing
|
||||
|
||||
License terms for using Eclipse ThreadX are defined in the LICENSE.txt file of this repo. Please refer to this file for all definitive licensing information.
|
||||
License terms for using Eclipse ThreadX are defined in the LICENSE.txt file of this repo. Please refer to this file for all definitive licensing information for all content, incl. the history of this repo.
|
||||
|
||||
## Resources
|
||||
|
||||
|
||||
+3
-1
@@ -138,7 +138,9 @@ extern "C" {
|
||||
#define AZURE_RTOS_FILEX
|
||||
#define FILEX_MAJOR_VERSION 6
|
||||
#define FILEX_MINOR_VERSION 4
|
||||
#define FILEX_PATCH_VERSION 1
|
||||
#define FILEX_PATCH_VERSION 2
|
||||
#define FILEX_BUILD_VERSION 202503
|
||||
#define FILEX_HOTFIX_VERSION ''
|
||||
|
||||
/* Define the following symbols for backward compatibility */
|
||||
#define EL_PRODUCT_FILEX
|
||||
|
||||
@@ -443,17 +443,24 @@ UINT sectors_per_fat, f, s;
|
||||
_fx_utility_memory_set(&byte_ptr[j + i], ' ', (11 - i));
|
||||
#endif /* FX_DISABLE_FORCE_MEMORY_OPERATION */
|
||||
|
||||
|
||||
/* Set bootrecord signature. */
|
||||
#ifdef FX_FORCE_512_BYTE_BOOT_SECTOR
|
||||
|
||||
/* Set bootrecord signature. */
|
||||
byte_ptr[510] = 0x55;
|
||||
byte_ptr[511] = 0xAA;
|
||||
/* Put the boot signature in the standard position. */
|
||||
byte_ptr[FX_SIG_OFFSET] = FX_SIG_BYTE_1;
|
||||
byte_ptr[FX_SIG_OFFSET + 1] = FX_SIG_BYTE_2;
|
||||
#else
|
||||
|
||||
/* Set bootrecord signature. */
|
||||
byte_ptr[bytes_per_sector - 2] = 0x55;
|
||||
byte_ptr[bytes_per_sector - 1] = 0xAA;
|
||||
if (bytes_per_sector < 512)
|
||||
{
|
||||
/* Put the boot signature at the end of the sector. */
|
||||
byte_ptr[bytes_per_sector - 2] = FX_SIG_BYTE_1;
|
||||
byte_ptr[bytes_per_sector - 1] = FX_SIG_BYTE_2;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Put the boot signature in the standard position. */
|
||||
byte_ptr[FX_SIG_OFFSET] = FX_SIG_BYTE_1;
|
||||
byte_ptr[FX_SIG_OFFSET + 1] = FX_SIG_BYTE_2;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Select the boot record write command. */
|
||||
@@ -510,8 +517,8 @@ UINT sectors_per_fat, f, s;
|
||||
byte_ptr[487] = 0x61;
|
||||
|
||||
/* Build the final signature word, this too is used to help verify that this is a FSINFO sector. */
|
||||
byte_ptr[508] = 0x55;
|
||||
byte_ptr[509] = 0xAA;
|
||||
byte_ptr[FX_SIG_OFFSET] = FX_SIG_BYTE_1;
|
||||
byte_ptr[FX_SIG_OFFSET + 1] = FX_SIG_BYTE_2;
|
||||
|
||||
/* Setup the total available clusters on the media. We need to subtract 1 for the FAT32 root directory. */
|
||||
_fx_utility_32_unsigned_write(&byte_ptr[488], (total_clusters - 1));
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
target_sources(${PROJECT_NAME} PRIVATE
|
||||
# {{BEGIN_TARGET_SOURCES}}
|
||||
|
||||
# {{END_TARGET_SOURCES}}
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}/inc
|
||||
)
|
||||
@@ -0,0 +1,23 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2024 Microsoft Corporation
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the MIT License which is available at
|
||||
* https://opensource.org/licenses/MIT.
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
/** */
|
||||
/** FileX Component */
|
||||
/** */
|
||||
/** Port Specific */
|
||||
/** */
|
||||
/**************************************************************************/
|
||||
/**************************************************************************/
|
||||
|
||||
/* Include the generic version of fx_port.h. */
|
||||
#include "../../../generic/inc/fx_port.h"
|
||||
+36
-11
@@ -1,3 +1,15 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2024 Microsoft Corporation
|
||||
* Copyright (c) 2025 Eclipse ThreadX contributors
|
||||
*
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the MIT License which is available at
|
||||
* https://opensource.org/licenses/MIT.
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
/* 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. */
|
||||
#include "fx_api.h"
|
||||
@@ -29,14 +41,16 @@ void thread_0_entry(ULONG thread_input);
|
||||
|
||||
|
||||
/* Define FileX global data structures. */
|
||||
|
||||
#define TOTAL_SECTORS 256
|
||||
#define SECTOR_SIZE 512
|
||||
FX_MEDIA ram_disk;
|
||||
FX_FILE my_file;
|
||||
|
||||
|
||||
#ifndef FX_STANDALONE_ENABLE
|
||||
CHAR *ram_disk_memory;
|
||||
#else
|
||||
unsigned char ram_disk_memory[256*512];
|
||||
unsigned char ram_disk_memory[TOTAL_SECTORS*SECTOR_SIZE];
|
||||
#endif
|
||||
|
||||
/* Define ThreadX global data structures. */
|
||||
@@ -102,8 +116,12 @@ CHAR local_buffer[30];
|
||||
|
||||
|
||||
/* Format the RAM disk - the memory for the RAM disk was setup in
|
||||
tx_application_define above. */
|
||||
fx_media_format(&ram_disk,
|
||||
tx_application_define above.
|
||||
|
||||
Important Note: The user must ensure there is enough RAM for the format
|
||||
specified. Otherwise, memory corruption can occur.
|
||||
*/
|
||||
status = fx_media_format(&ram_disk,
|
||||
_fx_ram_driver, // Driver entry
|
||||
ram_disk_memory, // RAM disk memory pointer
|
||||
media_memory, // Media buffer pointer
|
||||
@@ -112,28 +130,35 @@ CHAR local_buffer[30];
|
||||
1, // Number of FATs
|
||||
32, // Directory Entries
|
||||
0, // Hidden sectors
|
||||
256, // Total sectors
|
||||
512, // Sector size
|
||||
TOTAL_SECTORS, // Total sectors
|
||||
SECTOR_SIZE, // Sector size
|
||||
8, // Sectors per cluster
|
||||
1, // Heads
|
||||
1); // Sectors per track
|
||||
|
||||
/* Determine if the RAM disk format was successful. */
|
||||
if (status != FX_SUCCESS)
|
||||
{
|
||||
/* Error formatting the RAM disk. */
|
||||
printf("HTTPS RAM disk format failed, error: %x\n", status);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Loop to repeat the demo over and over! */
|
||||
do
|
||||
{
|
||||
|
||||
/* Open the RAM disk. */
|
||||
status = fx_media_open(&ram_disk, "RAM DISK", _fx_ram_driver, ram_disk_memory, media_memory, sizeof(media_memory));
|
||||
|
||||
/* Check the media open status. */
|
||||
/* Determine if the RAM disk open was successful. */
|
||||
if (status != FX_SUCCESS)
|
||||
{
|
||||
|
||||
/* Error, break the loop! */
|
||||
break;
|
||||
/* Error opening the RAM disk. */
|
||||
printf("RAM disk open failed, error: %x\n", status);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#ifdef FX_ENABLE_FAULT_TOLERANT
|
||||
status = fx_fault_tolerant_enable(&ram_disk, fault_tolerant_memory, sizeof(fault_tolerant_memory));
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
||||
cmake_policy(SET CMP0057 NEW)
|
||||
|
||||
project(regression_test LANGUAGES C)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
||||
cmake_policy(SET CMP0057 NEW)
|
||||
|
||||
project(samples LANGUAGES C)
|
||||
|
||||
Reference in New Issue
Block a user