source: umon/ports/template/config.h @ ddf6706

Last change on this file since ddf6706 was 87db514, checked in by Amar Takhar <amar@…>, on 04/16/15 at 19:26:21

Initial commit of the umon repository.

Prior to this three changes were made:

  • Remove umon_ prefix from parent directories.
  • Collapse main/target/ into main/
  • Remove ports/template/flashtest.scr.ucon script.
  • Property mode set to 100644
File size: 6.5 KB
Line 
1/* Template MicroMonitor configuration file.
2 */
3#define CPU_BE
4
5/* PLATFORM_NAME:
6 * Some string that briefly describes your target.
7 */
8#define PLATFORM_NAME       "Name of your Board here"
9
10/* CPU_NAME:
11 * The name of your CPU (i.e. "PowerPC 405", "Coldfire 5272" ,etc...).
12 */
13#define CPU_NAME    "CPU_NAME_HERE"
14
15/* LOOPS_PER_SECOND:
16 * Approximately the size of a loop that will cause a 1-second delay.
17 * This value can be adjusted by using the "sleep -c" command.
18 */
19#define LOOPS_PER_SECOND        23000
20
21/* PRE_TFSAUTOBOOT_HOOK():
22 * This is a port-specific function that will be called just prior to
23 * uMon running any/each autobootable file (not including monrc).
24#define PRE_TFSAUTOBOOT_HOOK()  func()
25 */
26
27/* PRE_COMMANDLOOP_HOOK():
28 * This is a port-specific function that will be called just before
29 * MicroMonitor turns over control to the endless command processing
30 * loop in start() (start.c).
31#define PRE_COMMANDLOOP_HOOK()  func()
32 */
33
34/* If a watchdog macro is needed, this is how you do it
35 * (using target specific code in the macro of course)...
36 * The remoteWatchDog() call is only needed if your appliation
37 * will override the monitor's watchdog macro.  If that isn't
38 * needed, then that logic can be omitted from the macro.
39
40#define WATCHDOG_MACRO                                                                          \
41        {                                                                                                               \
42                extern void (*remoteWatchDog)(void);                            \
43                if (remoteWatchDog) {                                                           \
44                        remoteWatchdog()                                                                \
45                }                                                                                                       \
46                else {                                                                                          \
47                        *(unsigned long *)0xff000000 |= 0x00100000;             \
48                        *(unsigned long *)0xff000000 &= ~0x00100000;    \
49                }
50        }
51 *
52 */
53
54/* If the ENET_LINK_IS_UP macro is defined as some function, then
55 * that function will be called every half second for some number of
56 * ticks.  The default tick count is set by the definition of
57 * LINKUP_TICK_MAX also defined in that file.  This can be overridden
58 * here if necessary.  Refer to the function EthernetWaitforLinkup() in
59 * ethernet.c (umon_main/target/common/ethernet.c) for complete details.
60 *
61 * The function defined by ENET_LINK_IS_UP (shown below as phy_linkup())
62 * is assumed to return 1 if the link is up; else 0.
63 *
64#define ENET_LINK_IS_UP phy_linkup
65#define LINKUP_TICK_MAX 10
66 *
67 * The purpose of this is to provide a common way to wait for the up-state
68 * of the link prior to allowing other commands to execute from uMon at
69 * startup.
70 */
71
72
73/* Flash bank configuration:
74 * Basic information needed to configure the flash driver.
75 * Fill in port specific values here.
76 */
77#define SINGLE_FLASH_DEVICE     1
78#define FLASH_COPY_TO_RAM               1
79#define FLASH_BANK0_BASE_ADDR   0xFF800000
80#define FLASH_PROTECT_RANGE     "0-2"
81#define FLASH_BANK0_WIDTH       2
82#define FLASH_LARGEST_SECTOR    0x20000
83
84/* If there is a need to have the range of protected sectors locked (and
85 * the flash device driver supports it), then enable this macro...
86#define LOCK_FLASH_PROTECT_RANGE
87 */
88
89/* TFS definitions:
90 * Values that configure the flash space that is allocated to TFS.
91 * Fill in port specific values here.
92 */
93#define TFSSPARESIZE                    FLASH_LARGEST_SECTOR
94#define TFSSTART                        (FLASH_BANK0_BASE_ADDR+0x80000)
95#define TFSEND                          0xFFFDFFFF
96#define TFSSPARE                        (TFSEND+1)
97#define TFSSECTORCOUNT                  ((TFSSPARE-TFSSTART)/0x20000)
98#define TFS_EBIN_ELF                    1
99#define TFS_VERBOSE_STARTUP             1
100#define TFS_ALTDEVTBL_BASE              &alt_tfsdevtbl_base
101
102/* FLASHRAM Parameters (not required):
103 * Primarily used for configuring TFS on battery-backed RAM.
104 * For a simple (volatile) RAM-based TFS device, use the
105 * "tfs ramdev" command.
106 *
107 * Define a block of RAM space to be used as a TFS-device.
108 * This is a block of RAM that TFS is fooled into treating like flash.
109 * It essentially provides a RAM-based file-storage area.
110 */
111#define FLASHRAM_BASE                   0x380000
112
113#ifdef FLASHRAM_BASE
114# define FLASHRAM_END                   0x3fffff
115# define FLASHRAM_SECTORSIZE    0x010000
116# define FLASHRAM_SPARESIZE             FLASHRAM_SECTORSIZE
117# define FLASHRAM_SECTORCOUNT   8
118# define FLASHRAM_BANKNUM               1
119# define FLASHBANKS                             2
120#else
121# define FLASHBANKS                             1
122#endif
123
124/* ALLOCSIZE:
125 * Specify the size of the memory block (in monitor space) that
126 * is to be allocated to malloc in the monitor.  Note that this
127 * size can be dynamically increased using the heap command at
128 * runtime.
129 */
130#define ALLOCSIZE               (64*1024)
131
132/* MONSTACKSIZE:
133 * The amount of space allocated to the monitor's stack.
134 */
135#define MONSTACKSIZE    (8*1024)
136
137/* INCLUDE_XXX Macros:
138 * Set/clear the appropriate macros depending on what you want
139 * to configure in your system.  The sanity of this list is tested
140 * through the inclusion of "inc_check.h" at the bottom of this list...
141 * When starting a port, set all but INCLUDE_MALLOC, INCLUDE_SHELLVARS,
142 * INCLUDE_MEMCMDS and INCLUDE_XMODEM to zero.  Then in small steps
143 * enable the following major features in the following order:
144 *
145 *      INCLUDE_FLASH to test the flash device drivers.
146 *      INCLUDE_TFS* to overlay TFS onto the flash.
147 *  INCLUDE_ETHERNET, INCLUDE_TFTP to turn the ethernet interface.
148 *
149 * All other INCLUDE_XXX macros can be enabled as needed and for the
150 * most part, they're hardware independent.
151 * Note that for building a very small footprint, INCLUDE_MALLOC and
152 * INCLUDE_SHELLVARS can be disabled.
153 */
154                                                               
155#define INCLUDE_MALLOC                  1
156#define INCLUDE_MEMCMDS         1
157#define INCLUDE_SHELLVARS               1
158#define INCLUDE_XMODEM          1
159#define INCLUDE_EDIT            0
160#define INCLUDE_DISASSEMBLER    0
161#define INCLUDE_UNZIP           0
162#define INCLUDE_ETHERNET        0
163#define INCLUDE_ICMP                    0
164#define INCLUDE_TFTP            0
165#define INCLUDE_TFS             0
166#define INCLUDE_FLASH           0
167#define INCLUDE_LINEEDIT        0
168#define INCLUDE_DHCPBOOT        0
169#define INCLUDE_TFSAPI          0
170#define INCLUDE_TFSSYMTBL       0
171#define INCLUDE_TFSSCRIPT       0
172#define INCLUDE_TFSCLI          0
173#define INCLUDE_EE              0
174#define INCLUDE_GDB             0
175#define INCLUDE_STRACE          0
176#define INCLUDE_CAST            0
177#define INCLUDE_STRUCT          0
178#define INCLUDE_REDIRECT        0
179#define INCLUDE_QUICKMEMCPY     0
180#define INCLUDE_PROFILER        0
181#define INCLUDE_BBC             0
182#define INCLUDE_MEMTRACE        0
183#define INCLUDE_STOREMAC        0
184#define INCLUDE_VERBOSEHELP     0
185#define INCLUDE_HWTMR               0
186#define INCLUDE_PORTCMD             0
187#define INCLUDE_USRLVL              0
188
189/* Some fine tuning (if needed)...
190 * If these #defines are not in config.h, they default to '1' in
191 * various other include files within uMon source; hence, they're
192 * really only useful if you need to turn off ('0') the specific
193 * facility or block of code.
194 */
195#define INCLUDE_TFTPSRVR                0
196#define INCLUDE_ETHERVERBOSE    0
197#define INCLUDE_MONCMD                  0
198
199#include "inc_check.h"
Note: See TracBrowser for help on using the repository browser.