1 | /* |
---|
2 | * Monitor configuration file for the Beaglebone Black |
---|
3 | * |
---|
4 | * Adapted by Jarielle Catbagan |
---|
5 | * email: jcatbagan93@gmail.com |
---|
6 | * |
---|
7 | * |
---|
8 | * General notice: |
---|
9 | * This code is part of a boot-monitor package developed as a generic base |
---|
10 | * platform for embedded system designs. As such, it is likely to be |
---|
11 | * distributed to various projects beyond the control of the original |
---|
12 | * author. Please notify the author of any enhancements made or bugs found |
---|
13 | * so that all may benefit from the changes. In addition, notification back |
---|
14 | * to the author will allow the new user to pick up changes that may have |
---|
15 | * been made by other users after this version of the code was distributed. |
---|
16 | * |
---|
17 | * Author: Ed Sutter |
---|
18 | * email: esutter@lucent.com |
---|
19 | * phone: 908-582-2351 |
---|
20 | */ |
---|
21 | |
---|
22 | #include "am335x.h" |
---|
23 | |
---|
24 | /* |
---|
25 | * The target_putchar() function also drops the character at the |
---|
26 | * LCD... |
---|
27 | */ |
---|
28 | //#define MORE_PUTCHAR lcd_putchar |
---|
29 | //#define CONSOLE_UART_BASE (OMAP35XX_L4_IO_BASE+0x6C000) |
---|
30 | #define CONSOLE_UART_BASE UART0_BASE |
---|
31 | |
---|
32 | #define SIO_STEP 4 |
---|
33 | #define IEN_DEFAULT 0x40 |
---|
34 | #define MCTL_DEFAULT 0x01 |
---|
35 | |
---|
36 | #define TIMER_TICKS_PER_MSEC 545000 |
---|
37 | |
---|
38 | /* DEFAULT_ETHERADD & DEFAULT_IPADD: |
---|
39 | * Refer to notes in ethernet.c function EthernetStartup() for details |
---|
40 | * regarding the use of these definitions. |
---|
41 | * DEFAULT_IPADD could be set to "DHCP" or "BOOTP" as well. |
---|
42 | */ |
---|
43 | #define DEFAULT_ETHERADD "00:30:23:40:00:" // Cogent Block |
---|
44 | #define DEFAULT_IPADD "192.168.254.110" |
---|
45 | |
---|
46 | #define CPU_LE |
---|
47 | |
---|
48 | // Establish a user defined function to be called when uMon |
---|
49 | // prints out the startup banner... |
---|
50 | // If this is defined, then the output similar to the following will |
---|
51 | // be printed just above the uMon header... |
---|
52 | // Silicon ID: 1.0 |
---|
53 | // CPU Rev: 2, Variant: 1 |
---|
54 | // CM Rev: 1.0, PRM Rev: 1.0 |
---|
55 | // #define USR_HEADER_FUNC show_revision |
---|
56 | |
---|
57 | /* Defining DONT_CENTER_MONHEADER eliminates the automatic centering |
---|
58 | * of the monitor's startup banner... |
---|
59 | */ |
---|
60 | #define DONT_CENTER_MONHEADER |
---|
61 | |
---|
62 | /* XBUFCNT & RBUFCNT: |
---|
63 | * Number of transmit and receive buffers allocated to ethernet. |
---|
64 | * The total of XBUFCNT+RBUFCNT should not exceed MAXEBDS |
---|
65 | */ |
---|
66 | #define XBUFCNT 8 |
---|
67 | #define RBUFCNT 8 |
---|
68 | #define XBUFSIZE 2048 |
---|
69 | #define RBUFSIZE 2048 |
---|
70 | |
---|
71 | /* LOOPS_PER_SECOND: |
---|
72 | * Approximately the size of a loop that will cause a 1-second delay. |
---|
73 | * This can be guestimated or modified with the sleep -c command at the |
---|
74 | * monitor command line. |
---|
75 | */ |
---|
76 | #define LOOPS_PER_SECOND 15000 |
---|
77 | |
---|
78 | #define INCLUDE_NANDCMD 0 |
---|
79 | |
---|
80 | #if INCLUDE_NANDCMD |
---|
81 | /* Needed for NAND to work with TFSRAM: |
---|
82 | */ |
---|
83 | #define NAND_TFS_BASE 0x10000 // base of TFS in NAND |
---|
84 | |
---|
85 | #define FLASHRAM_BASE 0x80300000 |
---|
86 | #define FLASHRAM_END 0x8037ffff |
---|
87 | #define FLASHRAM_SECTORSIZE 0x00010000 |
---|
88 | #define FLASHRAM_SPARESIZE FLASHRAM_SECTORSIZE |
---|
89 | #define FLASHRAM_BANKNUM 1 |
---|
90 | #define FLASHRAM_SECTORCOUNT 8 |
---|
91 | #endif |
---|
92 | |
---|
93 | /* Flash bank configuration: |
---|
94 | */ |
---|
95 | #ifdef FLASHRAM_BASE |
---|
96 | #define FLASHBANKS 2 |
---|
97 | #else |
---|
98 | #define FLASHBANKS 1 |
---|
99 | #endif |
---|
100 | #define SINGLE_FLASH_DEVICE 1 |
---|
101 | #define FLASH_COPY_TO_RAM 1 |
---|
102 | #define FLASH_BANK0_BASE_ADDR 0x08000000 |
---|
103 | #define FLASH_PROTECT_RANGE "0-2" |
---|
104 | #define FLASH_BANK0_WIDTH 2 |
---|
105 | #define FLASH_LARGEST_SECTOR 0x20000 |
---|
106 | #define FLASH_LOOP_TIMEOUT 10000000 |
---|
107 | #define BUFFERED_WRITE |
---|
108 | |
---|
109 | /* TFS definitions: |
---|
110 | * TFSSTART: Base address in FLASH at which TFS starts. |
---|
111 | * TFSEND: End address of TFS in FLASH. |
---|
112 | * TFSSPARE: Location of sector that is used as the spare sector |
---|
113 | * by TFS for defragmentation. |
---|
114 | * TFSSPARESIZE: Size of the spare sector used by TFS for defragmentation. |
---|
115 | * TFSSECTORCOUNT: Number of eraseable sectors that TFS covers, not including |
---|
116 | * the TFSSPARE sector. |
---|
117 | */ |
---|
118 | #define TFSSPARESIZE FLASH_LARGEST_SECTOR |
---|
119 | #define TFS_DEVTOT 1 |
---|
120 | #define TFSSTART (FLASH_BANK0_BASE_ADDR+0x060000) |
---|
121 | //#define TFSEND (FLASH_BANK0_BASE_ADDR+0x007dffff) // 8MB Flash |
---|
122 | #define TFSEND (FLASH_BANK0_BASE_ADDR+0x00edffff) // 16MB Flash |
---|
123 | //#define TFSEND (FLASH_BANK0_BASE_ADDR+0x03dfffff) // 64MB Flash |
---|
124 | #define TFSSPARE (TFSEND+1) |
---|
125 | #define TFSSECTORCOUNT ((TFSSPARE-TFSSTART)/0x20000) |
---|
126 | #define TFS_EBIN_ELFMSBIN 1 |
---|
127 | #define TFS_VERBOSE_STARTUP 1 |
---|
128 | #define TFS_ALTDEVTBL_BASE &alt_tfsdevtbl_base |
---|
129 | |
---|
130 | /* Specify CPU/PLATFORM type and name so that common code can be used |
---|
131 | * for a similar cpu, on different platforms. |
---|
132 | * The 'TYPE' definition is used for ifdefs in the code and the 'NAME' |
---|
133 | * is used for printfs in the code. |
---|
134 | */ |
---|
135 | #define CPU_TYPE AM3358 |
---|
136 | #define CPU_NAME "TI AM3358 Cortex-A8" |
---|
137 | #define PLATFORM_TYPE BEAGLEBONEBLACK |
---|
138 | #define PLATFORM_NAME "Beaglebone Black" |
---|
139 | |
---|
140 | /* Specify the size of the memory block (in monitor space) that is to be |
---|
141 | * allocated to malloc in the monitor. Note that this size can be dynamically |
---|
142 | * increased using the heap extension option in the heap command. |
---|
143 | */ |
---|
144 | #define ALLOCSIZE 1024 // (64*1024) |
---|
145 | #define MONSTACKSIZE (16*1024) |
---|
146 | |
---|
147 | |
---|
148 | /* Specify inclusion of subsystems within the monitor here. |
---|
149 | * Refer to comments in common/monitor/inc_check.h for details on |
---|
150 | * each of these macros. |
---|
151 | */ |
---|
152 | |
---|
153 | #define INCLUDE_MEMTRACE 0 |
---|
154 | #define INCLUDE_MEMCMDS 1 |
---|
155 | #define INCLUDE_DM 1 |
---|
156 | #define INCLUDE_PM 1 |
---|
157 | #define INCLUDE_EDIT 0 |
---|
158 | #define INCLUDE_DISASSEMBLER 0 |
---|
159 | #define INCLUDE_UNZIP 0 |
---|
160 | #define INCLUDE_ETHERNET 0 |
---|
161 | #define INCLUDE_ICMP 0 |
---|
162 | #define INCLUDE_TFTP 0 |
---|
163 | #define INCLUDE_DHCPBOOT 0 |
---|
164 | #define INCLUDE_TFS 0 |
---|
165 | #define INCLUDE_TFSCLI 0 |
---|
166 | #define INCLUDE_TFSAPI 0 |
---|
167 | #define INCLUDE_TFSSCRIPT 0 |
---|
168 | #define INCLUDE_TFSSYMTBL 0 |
---|
169 | #define INCLUDE_XMODEM 0 |
---|
170 | #define INCLUDE_LINEEDIT 0 |
---|
171 | #define INCLUDE_EE 0 |
---|
172 | #define INCLUDE_FLASH 0 |
---|
173 | #define INCLUDE_STRACE 0 |
---|
174 | #define INCLUDE_CAST 0 |
---|
175 | #define INCLUDE_STRUCT 0 |
---|
176 | #define INCLUDE_REDIRECT 0 |
---|
177 | #define INCLUDE_QUICKMEMCPY 0 |
---|
178 | #define INCLUDE_PROFILER 0 |
---|
179 | #define INCLUDE_BBC 0 |
---|
180 | #define INCLUDE_STOREMAC 0 |
---|
181 | #define INCLUDE_SHELLVARS 0 |
---|
182 | #define INCLUDE_MALLOC 0 |
---|
183 | #define INCLUDE_PORTCMD 0 |
---|
184 | #define INCLUDE_SYSLOG 0 |
---|
185 | #define INCLUDE_HWTMR 0 |
---|
186 | #define INCLUDE_VERBOSEHELP 0 |
---|
187 | #define INCLUDE_GDB 0 |
---|
188 | #define INCLUDE_USRLVL 0 |
---|
189 | #define INCLUDE_JFFS2 0 |
---|
190 | #define INCLUDE_JFFS2ZLIB 0 |
---|
191 | #define INCLUDE_FBI 0 |
---|
192 | #define INCLUDE_TSI 0 |
---|
193 | #define INCLUDE_SD 0 |
---|
194 | #define INCLUDE_DNS 0 |
---|
195 | #define INCLUDE_BLINKLED 1 |
---|
196 | #define TARGET_BLINKLED target_blinkled |
---|
197 | |
---|
198 | /* Inclusion of this next file will make sure that all of the above |
---|
199 | * inclusions are legal; and warn/adjust where necessary. |
---|
200 | */ |
---|
201 | #include "inc_check.h" |
---|