NetBurner 3.5.6
PDF Version
MCF5282Flash.h
1/* Revision: 3.3.8 */
2
3/******************************************************************************
4* Copyright 1998-2022 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 [email protected] 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* 16855 W Bernardo Dr
23* San Diego, CA 92127
24* www.netburner.com
25******************************************************************************/
26
27/*------------------------------------------------------------------------------
28 * EFFS-STD configuration file for MOD5282 processor flash memory. This file is part
29 * of an example that allocates 64kB of flash space to the file system, and the
30 * rest to the application.
31 *
32 * To modify the amount of space allocated to the file system:
33 *
34 * 1. Change the definition in this file: #define FS_SIZE ( 64 * 1024 )
35 * 2. Change the compcode memory address range for the application in your
36 * NBEclipse project settings so that the end of the application space does
37 * not exceed the start of the file system space. See the EFFS Programmer's
38 * Guide for details, and the header comments in main.cpp of this example
39 * on how to make the changes in the NBEclipse project.
40 * 3. Be sure to add the /nburn/platform/<platform>/original/lib/libStdFFile.a library
41 * to your NBEclipse project C/C++ build linker library options. See the header
42 * comments in main.cpp for this example on how to add the library in the
43 * NBEclipse project.
44 *----------------------------------------------------------------------------*/
45
46#ifndef _ONCHIPFLASH_H_
47#define _ONCHIPFLASH_H_
48
49#include "basictypes.h"
50#include "hal.h"
51#include "file/fsf.h"
52
56extern int fs_phy_OnChipFlash(FS_FLASH *flash);
57
58#define FLASH_NAME "MCF5282" // Processor name, not module name
59
63#define FS_FLASHBASE (0xFFC00000)
64
120#define BLOCKSIZE (4 * 1024) // All sectors are 4KB
121#define SECTORSIZE (512) // 8 sectors per block
122#define SECTORPERBLOCK (BLOCKSIZE / SECTORSIZE)
123
124/*
125 * Specify the total amount of flash memory in the system, and the amount
126 * allocated to be used by the file system (the rest is used by the
127 * application).
128 */
129#define FLASH_SIZE \
130 (512 * 1024) // Size of total flash in the
131 // system, 512kB
132#define FS_SIZE \
133 (64 * 1024) // Amount allocated to file
134 // system, 64kB
135#define FIRST_ADDR \
136 (FLASH_SIZE - FS_SIZE) // First file system address to
137 // use in the flash
138#define BLOCKSTART \
139 (2) // First block where file system
140 // data starts (first 2
141 // blocks are DESCRIPTORS)
142
143/*
144 * Descriptor Blocks:
145 * These blocks contain critical information about the file system, block
146 * allocation, wear information, and file/directory information. At least two
147 * descriptor blocks must be included in the system, which can be erased
148 * independently. An optional descriptor write cache may be configured which
149 * improves the performance of the file system. Please refer to the EFFS-STD
150 * implementation guide for additional information.
151 */
152#define DESCSIZE (4 * 1024) // Size of one descriptor
153#define DESCBLOCKSTART (0) // Position of first descriptor
154#define DESCBLOCKEND (1) // Position of last descriptor
155#define DESCCACHE (1024)
156
157#endif /* _ONCHIPFLASH_H_ */