初始版本

This commit is contained in:
2026-04-23 13:56:52 +08:00
parent 6c611f1fa3
commit 23ab9ca0f9
252 changed files with 136838 additions and 0 deletions
@@ -0,0 +1,78 @@
/*------------------------------------------------------------------------------
* MDK Middleware - Component ::File System
* Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved.
*------------------------------------------------------------------------------
* Name: FS_Config.c
* Purpose: File System Configuration
* Rev.: V6.3.0
*----------------------------------------------------------------------------*/
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
// <h>FAT File System
// <i>Define FAT File System parameters
// <o>Number of open files <1-16>
// <i>Define number of files that can be opened at the same time.
// <i>Default: 4
#define FAT_MAX_OPEN_FILES 4
// </h>
// <h>Embedded File System
// <i>Define Embedded File System parameters
// <o>Number of open files <1-16>
// <i>Define number of files that can be opened at the same time.
// <i>Default: 4
#define EFS_MAX_OPEN_FILES 4
// </h>
// <o>Initial Current Drive <0=>F0: <1=>F1:
// <2=>M0: <3=>M1:
// <4=>N0: <5=>N1:
// <6=>R0: <9=>R1:
// <7=>U0: <8=>U1:
// <i>Set initial setting for current drive. Current drive is used for File System functions
// <i>that are invoked with the "" string and can be altered anytime during run-time.
#define FS_INITIAL_CDRIVE 2
#include "RTE_Components.h"
#ifdef RTE_FileSystem_Drive_RAM_0
#include "FS_Config_RAM_0.h"
#endif
#ifdef RTE_FileSystem_Drive_RAM_1
#include "FS_Config_RAM_1.h"
#endif
#ifdef RTE_FileSystem_Drive_NOR_0
#include "FS_Config_NOR_0.h"
#endif
#ifdef RTE_FileSystem_Drive_NOR_1
#include "FS_Config_NOR_1.h"
#endif
#ifdef RTE_FileSystem_Drive_NAND_0
#include "FS_Config_NAND_0.h"
#endif
#ifdef RTE_FileSystem_Drive_NAND_1
#include "FS_Config_NAND_1.h"
#endif
#ifdef RTE_FileSystem_Drive_MC_0
#include "FS_Config_MC_0.h"
#endif
#ifdef RTE_FileSystem_Drive_MC_1
#include "FS_Config_MC_1.h"
#endif
#ifdef RTE_FileSystem_Drive_USB_0
#include "FS_Config_USB_0.h"
#endif
#ifdef RTE_FileSystem_Drive_USB_1
#include "FS_Config_USB_1.h"
#endif
#include "fs_config.h"
@@ -0,0 +1,55 @@
/*------------------------------------------------------------------------------
* MDK Middleware - Component ::File System:Drive
* Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved.
*------------------------------------------------------------------------------
* Name: FS_Config_MC_0.h
* Purpose: File System Configuration for Memory Card Drive
* Rev.: V6.2.0
*----------------------------------------------------------------------------*/
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
// <h>Memory Card Drive 0
// <i>Configuration for SD/SDHC/MMC Memory Card assigned to drive letter "M0:"
#define MC0_ENABLE 1
// <o>Connect to hardware via Driver_MCI# <0-255>
// <i>Select driver control block for hardware interface
#define MC0_MCI_DRIVER 0
// <o>Connect to hardware via Driver_SPI# <0-255>
// <i>Select driver control block for hardware interface when in SPI mode
#define MC0_SPI_DRIVER 0
// <o>Memory Card Interface Mode <0=>Native <1=>SPI
// <i>Native uses a SD Bus with up to 8 data lines, CLK, and CMD
// <i>SPI uses 2 data lines (MOSI and MISO), SCLK and CS
#define MC0_SPI 0
// <o>Drive Cache Size <0=>OFF <1=>1 KB <2=>2 KB <4=>4 KB
// <8=>8 KB <16=>16 KB <32=>32 KB
// <i>Drive Cache stores data sectors and may be increased to speed-up
// <i>file read/write operations on this drive (default: 4 KB)
#define MC0_CACHE_SIZE 4
// <e>Locate Drive Cache and Drive Buffer
// <i>Some microcontrollers support DMA only in specific memory areas and
// <i>require to locate the drive buffers at a fixed address.
#define MC0_CACHE_RELOC 0
// <o>Base address <0x0000-0xFFFFFE00:0x200>
// <i>Set buffer base address to RAM areas that support DMA with the drive.
#define MC0_CACHE_ADDR 0x7FD00000
// </e>
// <o>Filename Cache Size <0-1000000>
// <i>Define number of cached file or directory names.
// <i>48 bytes of RAM is required for each cached name.
#define MC0_NAME_CACHE_SIZE 0
// <q>Use FAT Journal
// <i>Protect File Allocation Table and Directory Entries for
// <i>fail-safe operation.
#define MC0_FAT_JOURNAL 0
// </h>
@@ -0,0 +1,50 @@
/*------------------------------------------------------------------------------
* MDK Middleware - Component ::File System
* Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved.
*------------------------------------------------------------------------------
* Name: FS_Debug.c
* Purpose: File System Debug Configuration
* Rev.: V1.0.0
*----------------------------------------------------------------------------*/
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
// <e>File System Debug
// <i>Enable File System event recording
#define FS_DEBUG_EVR_ENABLE 0
// <o>Core Management <0=>Off <1=>Errors <2=>Errors + API <3=>All
// <i>Configure FsCore: Core Management event recording
#define FS_DEBUG_EVR_CORE 1
// <o>FAT File System <0=>Off <1=>Errors <2=>Errors + API <3=>All
// <i>Configure FsFAT: FAT File System event recording
#define FS_DEBUG_EVR_FAT 1
// <o>EFS File System <0=>Off <1=>Errors <2=>Errors + API <3=>All
// <i>Configure FsEFS: EFS File System event recording
#define FS_DEBUG_EVR_EFS 1
// <o>I/O Control Interface <0=>Off <1=>Errors <2=>Errors + API <3=>All
// <i>Configure FsIOC: I/O Control Interface event recording
#define FS_DEBUG_EVR_IOC 1
// <o>NAND Flash Translation Layer <0=>Off <1=>Errors <2=>Errors + API <3=>All
// <i>Configure FsNFTL: NAND Flash Translation Layer event recording
#define FS_DEBUG_EVR_NFTL 1
// <o>NAND Device Interface <0=>Off <1=>Errors <2=>Errors + API <3=>All
// <i>Configure FsNAND: NAND Device Interface event recording
#define FS_DEBUG_EVR_NAND 1
// <o>Memory Card MCI <0=>Off <1=>Errors <2=>Errors + API <3=>All
// <i>Configure FsMcMCI: Memory Card MCI event recording
#define FS_DEBUG_EVR_MC_MCI 1
// <o>Memory Card SPI <0=>Off <1=>Errors <2=>Errors + API <3=>All
// <i>Configure FsMcSPI: Memory Card SPI event recording
#define FS_DEBUG_EVR_MC_SPI 1
// </e>
#include "fs_debug.h"