NetBurner 3.0
SSH/SshServerUserKey/AM29LV160B.h
1 /* Revision: 2.8.7 */
2 
3 /******************************************************************************
4 * Copyright 1998-2018 NetBurner, Inc. ALL RIGHTS RESERVED
5 *
6 * Permission is hereby granted to purchasers of NetBurner Hardware to use or
7 * modify this computer program for any use as long as the resultant program
8 * is only executed on NetBurner provided hardware.
9 *
10 * No other rights to use this program or its derivatives in part or in
11 * whole are granted.
12 *
13 * It may be possible to license this or other NetBurner software for use on
14 * non-NetBurner Hardware. Contact sales@Netburner.com for more information.
15 *
16 * NetBurner makes no representation or warranties with respect to the
17 * performance of this computer program, and specifically disclaims any
18 * responsibility for any damages, special or consequential, connected with
19 * the use of this program.
20 *
21 * NetBurner
22 * 5405 Morehouse Dr.
23 * San Diego, CA 92121
24 * www.netburner.com
25 ******************************************************************************/
26 
27 
28 /*------------------------------------------------------------------------------
29  * EFFS-STD configuration file for Spansion AM29LV160B flash chip. This file is
30  * part of an example that allocates 512kB of flash space to the file system,
31  * and the rest to the application.
32  *
33  * Note: The AM29LV160B is identical to the Spansion S29AL016D.
34  *
35  * To modify the amount of space allocated to the file system:
36  *
37  * 1. Change the definition in this file: #define FS_SIZE ( 1024 * 1024 )
38  * 2. Change the compcode memory address range for the application in your
39  * NBEclipse project settings so that the end of the application space does
40  * not exceed the start of the file system space. See the EFFS Programmer's
41  * Guide for details, and the header comments in main.cpp of this example
42  * on how to make the changes in the NBEclipse project.
43  * 3. Be sure to add the \Nburn\lib\StdFFile.a library to your NBEclipse project
44  * C/C++ build linker library options. See the header comments in main.cpp
45  * for this example on how to add the library in the NBEclipse project.
46  *----------------------------------------------------------------------------*/
47 
48 #ifndef _ONCHIPFLASH_H_
49 #define _ONCHIPFLASH_H_
50 
51 #include <file/fsf.h>
52 
53 
57 extern int fs_phy_OnChipFlash( FS_FLASH *flash );
58 
59 
60 #define FLASH_NAME "S29AL016/AMDLV160"
61 
62 
66 #define FS_FLASHBASE ( 0xFFC00000 )
67 
68 
128 #define BLOCKSIZE ( 64 * 1024 ) // Use only the 64k sectors
129 #define SECTORSIZE ( 16 * 1024 ) // 4 sectors per block
130 #define SECTORPERBLOCK ( BLOCKSIZE / SECTORSIZE )
131 
132 
133 /*
134  * Specify the total amount of flash memory in the system, and the amount
135  * allocated to be used by the file system (the rest is used by the
136  * application).
137  */
138 #define FLASH_SIZE ( 2 * 1024 * 1024 ) // Size of total flash in the
139  // system, 2MB
140 //#define FS_SIZE ( 512 * 1024 ) // Amount allocated to file
141  // system, 512kB
142 #define FS_SIZE ( 1024 * 1024 ) // Amount allocated to file
143  // system, 1MB
144 #define FIRST_ADDR ( FLASH_SIZE - FS_SIZE ) // First file system address to
145  // use in the flash
146 #define BLOCKSTART ( 2 ) // First block where file system
147  // data starts (first 2
148  // blocks are DESCRIPTORS)
149 
150 
151 /*
152  * Descriptor Blocks:
153  * These blocks contain critical information about the file system, block
154  * allocation, wear information, and file/directory information. At least two
155  * descriptor blocks must be included in the system, which can be erased
156  * independently. An optional descriptor write cache may be configured which
157  * improves the performance of the file system. Please refer to the EFFS-STD
158  * implementation guide for additional information.
159  */
160 #define DESCSIZE ( 8 * 1024 ) // Size of one descriptor
161 #define DESCBLOCKSTART ( 0 ) // Position of first descriptor
162 #define DESCBLOCKEND ( 1 ) // Position of last descriptor
163 #define DESCCACHE ( 2048 )
164 
165 
166 #endif /* _ONCHIPFLASH_H_ */
Embedded Flash File System API - STD.