File System Characteristics
111
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
File System
8.3
File System Characteristics
The following list describes the file system characteristics:
•
Supported number of files is 240, including system files.
•
The maximum number of system files is 50 files; however, most of the system files are created only if
they are required by the application.
•
File size is unlimited.
•
Filename can be up to 180 bytes. Choose short names due to the limited allocated size for filenames.
Filenames are kept on a best-effort basis; the size allocated for filenames is 3136 bytes. If the total
length of the filenames (calculated without the null terminator) exceeds the allocated size, the file name
is not kept, that is, the name is displayed in the file list as “name not kept”. Files where names were
not kept have all of file system functions working correctly, can open files, read and write, close, and
so forth.
•
File can be opened for either a read or a write; file cannot be read and written, correspondingly.
•
During the programming or restore to factory process, no file operation can be executed; when trying
to read or write a file, an error of SL_ERROR_FS_PROGRAMMING_IN_PROCESS is received. In this
case, the file system function can be re-invoked after the programming process is finished.
•
Trying to invoke a file system function when the file system is not yet formatted results in the error
SL_ERROR_FS_NO_DEVICE_IS_LOADED.
•
Some of the file system functionality is only available for secure devices;
describes the
different functionality between secure and nonsecure devices.
Table 8-2. Secure Files
CC3220S, CC3220SF, CC3120
CC3220R
Create encrypt programming image
+
–
Setting alarms threshold
+
–
Store the CC3220 host app as secure
+
–
Write secure user files
+
Only certificate files and private keys can
be created secure. These files could not
be read by the host.
Read secure user files
+
–
Secure programming
+
–
•
The common way to create the service pack and the trusted root-certificate catalog is by the UniFlash
Image Creator tool. The Image Creator tool supports the functionality of setting the correct creation
attributes for the system files. If the following files are first created by the host, the described creation
attributes should be used:
–
Trusted root-certificate catalog, name: /sys/certstore.lst ,maxsize : 7000 bytes. Creation flags:
SL_FS_CREATE_SECURE |SL_FS_CREATE_PUBLIC_WRITE| SL_FS_CREATE_FAILSAFE
–
Service pack, name: /sys/servicepack.ucf ,maxsize : 131072 bytes. Creation flags:
SL_FS_CREATE_SECURE |SL_FS_CREATE_PUBLIC_WRITE| SL_FS_CREATE_FAILSAFE
NOTE:
When closing (after open for write) the service pack file or the trusted root-certificate
catalog file, a signature must be supplied with a null certificate.
8.4
Write a File
8.4.1 Introduction
To write a file, the file must first be opened for write; at the end it should be closed. The following is a
description of the writing procedure:
1. Open the file for create or write, function sl_FsOpen().
2. Write the file, function sl_FsWrite (); can be called several times.