Sundance SMT387-FS User Manual

SMT387-File System
User Manual
Sundance Digital Signal Processing Inc, 4790 Caughlin Parkway #233, Reno, NV 89509-0907, USA. This document is the property of Sundance and may not be copied nor communicated to a third part
Page 1
Revision History
Changes Made Issue Initials 02/04/05 Edition 1.1
Page 2
List of Abbreviations
Abbreviation Explanation
FAT File Allocation Tables FS File System SMT Sundance Multiprocessor Technology SATA Serial ATA Disk TIM Texas Instruments Module
Page 3
Table Of Contents
Introduction ............................................................................................................................5
Overview ..............................................................................................................................5
Requirements.......................................................................................................................5
Packaging ...............................................................................................................................6
Hard Disk Drive Preparation..................................................................................................7
Partitioning ...........................................................................................................................7
Formatting............................................................................................................................7
Application Programming Interface (API)............................................................................9
API Overview........................................................................................................................9
File Names...........................................................................................................................9
API Details..........................................................................................................................10
Function smt387fs_init .......................................................................................................11
Function smt387fs_deinit ...................................................................................................12
Function smt387fs_delete..................................................................................................13
Function smt387fs_rename................................................................................................14
Function smt387fs_create_write ........................................................................................15
Function smt387fs_open_read...........................................................................................16
Function smt387fs_close....................................................................................................17
Function smt387fs_read.....................................................................................................18
Function smt387fs_write ....................................................................................................19
Function smt387fs_sync.....................................................................................................20
Page 4

Introduction

This document describes the file system software package provided for use with the Sundance SMT387 module. It includes descriptions of the functions available in the package as well as details of the procedures to be used when setting up a new hard disk drive for use with the SMT387.

Overview

The SMT387 File System Package allows an application running on the SMT387 to read and write files in FAT32 file systems on attached SATA hard disk drives. Attaching the same hard disk drive to a personal computer running Windows XP or Windows 2000 allows the same FAT32 file system to be read and written by applications on that computer.
The library should only be used in a single user task. Use in multiple tasks will result in data corruption. If you need to access a FAT32 file system from more than one user task, you must use inter-task communication to forward requests from one task to another.
Within the task that is using the File System Package, multiple threads can all access files at the same time, subject to available memory. The SMT387 File System Package synchronizes access to the files, and manages all file system metadata such as File Allocation Tables (FATs) and directory records. The package is compatible with the Diamond stand-alone library for use in fully embedded applications.
Performance features included in the SMT387 File System Package include a data buffering facility to decouple user threads from activity on the disk drive, and a preallocation facility designed to reduce the time taken when files are extended.

Requirements

The following requirements must be met for a system to be able to use the SMT387 File System Package:
SMT387 module with V2 DSP silicon.
One or two attached SATA disk drives.
Diamond version 2.5.2 or later.
Page 5

Packaging

The software is provided as the following files:
Smt387fs.h contains the API definitions as described in the User Guide, and must be #included into user applications.
Smt387fs.lib is the library containing the code implementing the file system functionality, and must be linked into user applications.
Blockman.mod is a required kernel extension module. It must be visible to the Diamond configurer, either by being placed in the same directory as your user application or in the Diamond modules directory,\3L\Diamond\C6000\modules.
Smt387show.app is an application you can run using the Diamond Windows Server. When run, it first displays each drive and each FAT partition. After this it attempts to mount all partitions in the same way an application using the library would do, so that any problems in this process can be diagnosed. Finally, the files in the root directory of each volume are listed.
In addition, a demonstration program is supplied as demo_create.c. You can build an application from this file using the supplied make_demo.bat command file. This demonstration program creates two files on the first detected FAT32 file system; one file is empty, the second is roughly 172MB in size containing a repeated pattern.
Page 6
Loading...
+ 14 hidden pages