DK1S10.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. /*
  2. * (C) Copyright 2003, Li-Pro.Net <www.li-pro.net>
  3. * Stephan Linz <linz@li-pro.net>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef __CONFIG_H
  24. #define __CONFIG_H
  25. /***********************************************************************
  26. * Include the whole NIOS CPU configuration.
  27. *
  28. * !!! HAVE TO BE HERE !!! DON'T MOVE THIS PART !!!
  29. *
  30. ***********************************************************************/
  31. #if defined(CONFIG_NIOS_SAFE_32)
  32. #include <configs/DK1S10_safe_32.h>
  33. #elif defined(CONFIG_NIOS_STANDARD_32)
  34. #include <configs/DK1S10_standard_32.h>
  35. #elif defined(CONFIG_NIOS_MTX_LDK_20)
  36. #include <configs/DK1S10_mtx_ldk_20.h>
  37. #else
  38. #error *** CFG_ERROR: you have to setup right NIOS CPU configuration
  39. #endif
  40. /*------------------------------------------------------------------------
  41. * BOARD/CPU -- TOP-LEVEL
  42. *----------------------------------------------------------------------*/
  43. #define CONFIG_NIOS 1 /* NIOS-32 core */
  44. #define CONFIG_DK1S10 1 /* Stratix DK-1S10 board*/
  45. #define CONFIG_SYS_CLK_FREQ CFG_NIOS_CPU_CLK/* 50 MHz core clock */
  46. #define CFG_HZ 1000 /* 1 msec time tick */
  47. #undef CFG_CLKS_IN_HZ
  48. #define CONFIG_BOARD_EARLY_INIT_F 1 /* enable early board-spec. init*/
  49. /*------------------------------------------------------------------------
  50. * BASE ADDRESSES / SIZE (Flash, SRAM, SDRAM)
  51. *----------------------------------------------------------------------*/
  52. #if (CFG_NIOS_CPU_SDRAM_SIZE != 0)
  53. #define CFG_SDRAM_BASE CFG_NIOS_CPU_SDRAM_BASE
  54. #define CFG_SDRAM_SIZE CFG_NIOS_CPU_SDRAM_SIZE
  55. #else
  56. #error *** CFG_ERROR: you have to setup any SDRAM in NIOS CPU config
  57. #endif
  58. #if defined(CFG_NIOS_CPU_SRAM_BASE) && defined(CFG_NIOS_CPU_SRAM_SIZE)
  59. #define CFG_SRAM_BASE CFG_NIOS_CPU_SRAM_BASE
  60. #define CFG_SRAM_SIZE CFG_NIOS_CPU_SRAM_SIZE
  61. #else
  62. #undef CFG_SRAM_BASE
  63. #undef CFG_SRAM_SIZE
  64. #endif
  65. #define CFG_VECT_BASE CFG_NIOS_CPU_VEC_BASE
  66. /*------------------------------------------------------------------------
  67. * MEMORY ORGANIZATION - For the most part, you can put things pretty
  68. * much anywhere. This is pretty flexible for Nios. So here we make some
  69. * arbitrary choices & assume that the monitor is placed at the end of
  70. * a memory resource (so you must make sure TEXT_BASE is chosen
  71. * appropriately).
  72. *
  73. * -The heap is placed below the monitor.
  74. * -Global data is placed below the heap.
  75. * -The stack is placed below global data (&grows down).
  76. *----------------------------------------------------------------------*/
  77. #define CFG_MONITOR_LEN (256 * 1024) /* Reserve 256k */
  78. #define CFG_GBL_DATA_SIZE 128 /* Global data size rsvd*/
  79. #define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
  80. #define CFG_MONITOR_BASE TEXT_BASE
  81. #define CFG_MALLOC_BASE (CFG_MONITOR_BASE - CFG_MALLOC_LEN)
  82. #define CFG_GBL_DATA_OFFSET (CFG_MALLOC_BASE - CFG_GBL_DATA_SIZE)
  83. #define CFG_INIT_SP CFG_GBL_DATA_OFFSET
  84. /*------------------------------------------------------------------------
  85. * FLASH (AM29LV065D)
  86. *----------------------------------------------------------------------*/
  87. #if (CFG_NIOS_CPU_FLASH_SIZE != 0)
  88. #define CFG_FLASH_BASE CFG_NIOS_CPU_FLASH_BASE
  89. #define CFG_FLASH_SIZE CFG_NIOS_CPU_FLASH_SIZE
  90. #define CFG_MAX_FLASH_SECT 128 /* Max # sects per bank */
  91. #define CFG_MAX_FLASH_BANKS 1 /* Max # of flash banks */
  92. #define CFG_FLASH_ERASE_TOUT 8000 /* Erase timeout (msec) */
  93. #define CFG_FLASH_WRITE_TOUT 100 /* Write timeout (msec) */
  94. #define CFG_FLASH_WORD_SIZE unsigned char /* flash word size */
  95. #else
  96. #error *** CFG_ERROR: you have to setup any Flash memory in NIOS CPU config
  97. #endif
  98. /*------------------------------------------------------------------------
  99. * ENVIRONMENT
  100. *----------------------------------------------------------------------*/
  101. #if (CFG_NIOS_CPU_FLASH_SIZE != 0)
  102. #define CFG_ENV_IS_IN_FLASH 1 /* Environment in flash */
  103. #if defined(CONFIG_NIOS_STANDARD_32)
  104. #define CFG_ENV_ADDR CFG_FLASH_BASE /* Mem addr of env */
  105. #elif defined(CONFIG_NIOS_MTX_LDK_20)
  106. #define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_MONITOR_LEN)
  107. #else
  108. #error *** CFG_ERROR: you have to setup the environment base address CFG_ENV_ADDR
  109. #endif
  110. #define CFG_ENV_SIZE (64 * 1024) /* 64 KByte (1 sector) */
  111. #define CONFIG_ENV_OVERWRITE /* Serial/eth change Ok */
  112. #else
  113. #define CFG_ENV_IS_NOWHERE 1 /* NO Environment */
  114. #endif
  115. /*------------------------------------------------------------------------
  116. * CONSOLE
  117. *----------------------------------------------------------------------*/
  118. #if (CFG_NIOS_CPU_UART_NUMS != 0)
  119. #define CFG_NIOS_CONSOLE CFG_NIOS_CPU_UART0 /* 1st UART is Cons. */
  120. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  121. #if (CFG_NIOS_CPU_UART0_BR != 0)
  122. #define CFG_NIOS_FIXEDBAUD 1 /* Baudrate is fixed */
  123. #define CONFIG_BAUDRATE CFG_NIOS_CPU_UART0_BR
  124. #else
  125. #undef CFG_NIOS_FIXEDBAUD
  126. #define CONFIG_BAUDRATE 115200
  127. #endif
  128. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
  129. #else
  130. #error *** CFG_ERROR: you have to setup at least one UART in NIOS CPU config
  131. #endif
  132. /*------------------------------------------------------------------------
  133. * TIMER FOR TIMEBASE -- Nios doesn't have the equivalent of ppc PIT,
  134. * so an avalon bus timer is required.
  135. *----------------------------------------------------------------------*/
  136. #if (CFG_NIOS_CPU_TIMER_NUMS != 0) && defined(CFG_NIOS_CPU_TICK_TIMER)
  137. #if (CFG_NIOS_CPU_TICK_TIMER == 0)
  138. #define CFG_NIOS_TMRBASE CFG_NIOS_CPU_TIMER0 /* TIMER0 as tick */
  139. #define CFG_NIOS_TMRIRQ CFG_NIOS_CPU_TIMER0_IRQ
  140. #if (CFG_NIOS_CPU_TIMER0_FP == 1) /* fixed period */
  141. #if (CFG_NIOS_CPU_TIMER0_PER >= CFG_HZ)
  142. #define CFG_NIOS_TMRMS (CFG_NIOS_CPU_TIMER0_PER / CFG_HZ)
  143. #else
  144. #error *** CFG_ERROR: you have to use a timer periode greater than CFG_HZ
  145. #endif
  146. #undef CFG_NIOS_TMRCNT /* no preloadable counter value */
  147. #elif (CFG_NIOS_CPU_TIMER0_FP == 0) /* variable period */
  148. #if (CFG_HZ <= 1000)
  149. #define CFG_NIOS_TMRMS (1000 / CFG_HZ)
  150. #else
  151. #error *** CFG_ERROR: sorry, CFG_HZ have to be less than 1000
  152. #endif
  153. #define CFG_NIOS_TMRCNT (CONFIG_SYS_CLK_FREQ / CFG_HZ)
  154. #else
  155. #error *** CFG_ERROR: you have to define CFG_NIOS_CPU_TIMER0_FP correct
  156. #endif
  157. #elif (CFG_NIOS_CPU_TICK_TIMER == 1)
  158. #define CFG_NIOS_TMRBASE CFG_NIOS_CPU_TIMER1 /* TIMER1 as tick */
  159. #define CFG_NIOS_TMRIRQ CFG_NIOS_CPU_TIMER1_IRQ
  160. #if (CFG_NIOS_CPU_TIMER1_FP == 1) /* fixed period */
  161. #if (CFG_NIOS_CPU_TIMER1_PER >= CFG_HZ)
  162. #define CFG_NIOS_TMRMS (CFG_NIOS_CPU_TIMER1_PER / CFG_HZ)
  163. #else
  164. #error *** CFG_ERROR: you have to use a timer periode greater than CFG_HZ
  165. #endif
  166. #undef CFG_NIOS_TMRCNT /* no preloadable counter value */
  167. #elif (CFG_NIOS_CPU_TIMER1_FP == 0) /* variable period */
  168. #if (CFG_HZ <= 1000)
  169. #define CFG_NIOS_TMRMS (1000 / CFG_HZ)
  170. #else
  171. #error *** CFG_ERROR: sorry, CFG_HZ have to be less than 1000
  172. #endif
  173. #define CFG_NIOS_TMRCNT (CONFIG_SYS_CLK_FREQ / CFG_HZ)
  174. #else
  175. #error *** CFG_ERROR: you have to define CFG_NIOS_CPU_TIMER1_FP correct
  176. #endif
  177. #endif /* CFG_NIOS_CPU_TICK_TIMER */
  178. #else
  179. #error *** CFG_ERROR: you have to setup at least one TIMER in NIOS CPU config
  180. #endif
  181. /*------------------------------------------------------------------------
  182. * Ethernet -- needs work!
  183. *----------------------------------------------------------------------*/
  184. #if (CFG_NIOS_CPU_LAN_NUMS == 1)
  185. #if (CFG_NIOS_CPU_LAN0_TYPE == 0) /* LAN91C111 */
  186. #define CONFIG_DRIVER_SMC91111 /* Using SMC91c111 */
  187. #undef CONFIG_SMC91111_EXT_PHY /* Internal PHY */
  188. #define CONFIG_SMC91111_BASE (CFG_NIOS_CPU_LAN0_BASE + CFG_NIOS_CPU_LAN0_OFFS)
  189. #if (CFG_NIOS_CPU_LAN0_BUSW == 32)
  190. #define CONFIG_SMC_USE_32_BIT 1
  191. #else /* no */
  192. #undef CONFIG_SMC_USE_32_BIT
  193. #endif
  194. #elif (CFG_NIOS_CPU_LAN0_TYPE == 1) /* CS8900A */
  195. /********************************************/
  196. /* !!! CS8900 is __not__ tested on NIOS !!! */
  197. /********************************************/
  198. #define CONFIG_DRIVER_CS8900 /* Using CS8900 */
  199. #define CS8900_BASE (CFG_NIOS_CPU_LAN0_BASE + CFG_NIOS_CPU_LAN0_OFFS)
  200. #if (CFG_NIOS_CPU_LAN0_BUSW == 32)
  201. #undef CS8900_BUS16
  202. #define CS8900_BUS32 1
  203. #else /* no */
  204. #define CS8900_BUS16 1
  205. #undef CS8900_BUS32
  206. #endif
  207. #else
  208. #error *** CFG_ERROR: invalid LAN0 chip type, check your NIOS CPU config
  209. #endif
  210. #define CONFIG_ETHADDR 08:00:3e:26:0a:5b
  211. #define CONFIG_NETMASK 255.255.255.0
  212. #define CONFIG_IPADDR 192.168.2.21
  213. #define CONFIG_SERVERIP 192.168.2.16
  214. #else
  215. #error *** CFG_ERROR: you have to setup just one LAN only or expand your config.h
  216. #endif
  217. /*------------------------------------------------------------------------
  218. * STATUS LEDs
  219. *----------------------------------------------------------------------*/
  220. #if (CFG_NIOS_CPU_PIO_NUMS != 0) && defined(CFG_NIOS_CPU_LED_PIO)
  221. #if (CFG_NIOS_CPU_LED_PIO == 0)
  222. #error *** CFG_ERROR: status LEDs at PIO0 not supported, expand your config.h
  223. #elif (CFG_NIOS_CPU_LED_PIO == 1)
  224. #error *** CFG_ERROR: status LEDs at PIO1 not supported, expand your config.h
  225. #elif (CFG_NIOS_CPU_LED_PIO == 2)
  226. #define STATUS_LED_BASE CFG_NIOS_CPU_PIO2
  227. #define STATUS_LED_BITS CFG_NIOS_CPU_PIO2_BITS
  228. #define STATUS_LED_ACTIVE 1 /* LED on for bit == 1 */
  229. #if (CFG_NIOS_CPU_PIO2_TYPE == 1)
  230. #define STATUS_LED_WRONLY 1
  231. #else
  232. #undef STATUS_LED_WRONLY
  233. #endif
  234. #elif (CFG_NIOS_CPU_LED_PIO == 3)
  235. #error *** CFG_ERROR: status LEDs at PIO3 not supported, expand your config.h
  236. #elif (CFG_NIOS_CPU_LED_PIO == 4)
  237. #error *** CFG_ERROR: status LEDs at PIO4 not supported, expand your config.h
  238. #elif (CFG_NIOS_CPU_LED_PIO == 5)
  239. #error *** CFG_ERROR: status LEDs at PIO5 not supported, expand your config.h
  240. #elif (CFG_NIOS_CPU_LED_PIO == 6)
  241. #error *** CFG_ERROR: status LEDs at PIO6 not supported, expand your config.h
  242. #elif (CFG_NIOS_CPU_LED_PIO == 7)
  243. #error *** CFG_ERROR: status LEDs at PIO7 not supported, expand your config.h
  244. #elif (CFG_NIOS_CPU_LED_PIO == 8)
  245. #error *** CFG_ERROR: status LEDs at PIO8 not supported, expand your config.h
  246. #elif (CFG_NIOS_CPU_LED_PIO == 9)
  247. #error *** CFG_ERROR: status LEDs at PIO9 not supported, expand your config.h
  248. #else
  249. #error *** CFG_ERROR: you have to set CFG_NIOS_CPU_LED_PIO in right case
  250. #endif
  251. #define CONFIG_STATUS_LED 1 /* enable status led driver */
  252. #define STATUS_LED_BIT (1 << 0) /* LED[0] */
  253. #define STATUS_LED_STATE STATUS_LED_BLINKING
  254. #define STATUS_LED_BOOT_STATE STATUS_LED_OFF
  255. #define STATUS_LED_PERIOD (CFG_HZ / 10) /* ca. 1 Hz */
  256. #define STATUS_LED_BOOT 0 /* boot LED */
  257. #if (STATUS_LED_BITS > 1)
  258. #define STATUS_LED_BIT1 (1 << 1) /* LED[1] */
  259. #define STATUS_LED_STATE1 STATUS_LED_OFF
  260. #define STATUS_LED_PERIOD1 (CFG_HZ / 50) /* ca. 5 Hz */
  261. #define STATUS_LED_RED 1 /* fail LED */
  262. #endif
  263. #if (STATUS_LED_BITS > 2)
  264. #define STATUS_LED_BIT2 (1 << 2) /* LED[2] */
  265. #define STATUS_LED_STATE2 STATUS_LED_OFF
  266. #define STATUS_LED_PERIOD2 (CFG_HZ / 10) /* ca. 1 Hz */
  267. #define STATUS_LED_YELLOW 2 /* info LED */
  268. #endif
  269. #if (STATUS_LED_BITS > 3)
  270. #define STATUS_LED_BIT3 (1 << 3) /* LED[3] */
  271. #define STATUS_LED_STATE3 STATUS_LED_OFF
  272. #define STATUS_LED_PERIOD3 (CFG_HZ / 10) /* ca. 1 Hz */
  273. #define STATUS_LED_GREEN 3 /* info LED */
  274. #endif
  275. #define STATUS_LED_PAR 1 /* makes status_led.h happy */
  276. #endif /* CFG_NIOS_CPU_PIO_NUMS */
  277. /*------------------------------------------------------------------------
  278. * SEVEN SEGMENT LED DISPLAY
  279. *----------------------------------------------------------------------*/
  280. #if (CFG_NIOS_CPU_PIO_NUMS != 0) && defined(CFG_NIOS_CPU_SEVENSEG_PIO)
  281. #if (CFG_NIOS_CPU_SEVENSEG_PIO == 0)
  282. #error *** CFG_ERROR: seven segment display at PIO0 not supported, expand your config.h
  283. #elif (CFG_NIOS_CPU_SEVENSEG_PIO == 1)
  284. #error *** CFG_ERROR: seven segment display at PIO1 not supported, expand your config.h
  285. #elif (CFG_NIOS_CPU_SEVENSEG_PIO == 2)
  286. #error *** CFG_ERROR: seven segment display at PIO2 not supported, expand your config.h
  287. #elif (CFG_NIOS_CPU_SEVENSEG_PIO == 3)
  288. #define SEVENSEG_BASE CFG_NIOS_CPU_PIO3
  289. #define SEVENSEG_BITS CFG_NIOS_CPU_PIO3_BITS
  290. #define SEVENSEG_ACTIVE 0 /* LED on for bit == 1 */
  291. #if (CFG_NIOS_CPU_PIO3_TYPE == 1)
  292. #define SEVENSEG_WRONLY 1
  293. #else
  294. #undef SEVENSEG_WRONLY
  295. #endif
  296. #elif (CFG_NIOS_CPU_SEVENSEG_PIO == 4)
  297. #error *** CFG_ERROR: seven segment display at PIO4 not supported, expand your config.h
  298. #elif (CFG_NIOS_CPU_SEVENSEG_PIO == 5)
  299. #error *** CFG_ERROR: seven segment display at PIO5 not supported, expand your config.h
  300. #elif (CFG_NIOS_CPU_SEVENSEG_PIO == 6)
  301. #error *** CFG_ERROR: seven segment display at PIO6 not supported, expand your config.h
  302. #elif (CFG_NIOS_CPU_SEVENSEG_PIO == 7)
  303. #error *** CFG_ERROR: seven segment display at PIO7 not supported, expand your config.h
  304. #elif (CFG_NIOS_CPU_SEVENSEG_PIO == 8)
  305. #error *** CFG_ERROR: seven segment display at PIO8 not supported, expand your config.h
  306. #elif (CFG_NIOS_CPU_SEVENSEG_PIO == 9)
  307. #error *** CFG_ERROR: seven segment display at PIO9 not supported, expand your config.h
  308. #else
  309. #error *** CFG_ERROR: you have to set CFG_NIOS_CPU_SEVENSEG_PIO in right case
  310. #endif
  311. #define CONFIG_SEVENSEG 1 /* enable seven segment led driver */
  312. /*
  313. * Dual 7-Segment Display pin assignment -- read more in your
  314. * "Nios Development Board Reference Manual"
  315. *
  316. *
  317. * (U8) HI:D[15..8] (U9) LO:D[7..0]
  318. * ______ ______
  319. * | D14 | | D6 |
  320. * | | | |
  321. * D9| |D13 D1| |D5
  322. * |______| |______| ___
  323. * | D8 | | D0 | | A |
  324. * | | | | F|___|B
  325. * D10| |D12 D2| |D4 | G |
  326. * |______| |______| E|___|C
  327. * D11 * D3 * D *
  328. * D15 D7 DP
  329. *
  330. */
  331. #define SEVENSEG_DIGIT_HI_LO_EQUAL 1 /* high nibble equal low nibble */
  332. #define SEVENSEG_DIGIT_A (1 << 6) /* bit 6 is segment A */
  333. #define SEVENSEG_DIGIT_B (1 << 5) /* bit 5 is segment B */
  334. #define SEVENSEG_DIGIT_C (1 << 4) /* bit 4 is segment C */
  335. #define SEVENSEG_DIGIT_D (1 << 3) /* bit 3 is segment D */
  336. #define SEVENSEG_DIGIT_E (1 << 2) /* bit 2 is segment E */
  337. #define SEVENSEG_DIGIT_F (1 << 1) /* bit 1 is segment F */
  338. #define SEVENSEG_DIGIT_G (1 << 0) /* bit 0 is segment G */
  339. #define SEVENSEG_DIGIT_DP (1 << 7) /* bit 7 is decimal point */
  340. #endif /* CFG_NIOS_CPU_PIO_NUMS */
  341. /*------------------------------------------------------------------------
  342. * COMMANDS
  343. *----------------------------------------------------------------------*/
  344. #define CONFIG_COMMANDS (CFG_CMD_ALL & ~( \
  345. CFG_CMD_ASKENV | \
  346. CFG_CMD_BEDBUG | \
  347. CFG_CMD_BMP | \
  348. CFG_CMD_BSP | \
  349. CFG_CMD_CACHE | \
  350. CFG_CMD_DATE | \
  351. CFG_CMD_DOC | \
  352. CFG_CMD_DTT | \
  353. CFG_CMD_EEPROM | \
  354. CFG_CMD_ELF | \
  355. CFG_CMD_FAT | \
  356. CFG_CMD_FDC | \
  357. CFG_CMD_FDOS | \
  358. CFG_CMD_HWFLOW | \
  359. CFG_CMD_IDE | \
  360. CFG_CMD_I2C | \
  361. CFG_CMD_JFFS2 | \
  362. CFG_CMD_KGDB | \
  363. CFG_CMD_NAND | \
  364. CFG_CMD_NFS | \
  365. CFG_CMD_MMC | \
  366. CFG_CMD_MII | \
  367. CFG_CMD_PCI | \
  368. CFG_CMD_PCMCIA | \
  369. CFG_CMD_SCSI | \
  370. CFG_CMD_SPI | \
  371. CFG_CMD_VFD | \
  372. CFG_CMD_USB | \
  373. CFG_CMD_XIMG ) )
  374. #include <cmd_confdefs.h>
  375. /*------------------------------------------------------------------------
  376. * KGDB
  377. *----------------------------------------------------------------------*/
  378. #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
  379. #define CONFIG_KGDB_BAUDRATE 9600
  380. #endif
  381. /*------------------------------------------------------------------------
  382. * MISC
  383. *----------------------------------------------------------------------*/
  384. #define CFG_LONGHELP /* undef to save memory */
  385. #define CFG_PROMPT "DK1S10 > " /* Monitor Command Prompt */
  386. #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  387. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
  388. #define CFG_MAXARGS 16 /* max number of command args*/
  389. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  390. /* Default load address */
  391. #if (CFG_SRAM_SIZE != 0)
  392. /* default in SRAM */
  393. #define CFG_LOAD_ADDR CFG_SRAM_BASE
  394. #elif (CFG_SDRAM_SIZE != 0)
  395. /* default in SDRAM */
  396. #if (CFG_SDRAM_BASE == CFG_NIOS_CPU_VEC_BASE)
  397. #define CFG_LOAD_ADDR (CFG_SDRAM_BASE + CFG_NIOS_CPU_VEC_SIZE)
  398. #else
  399. #define CFG_LOAD_ADDR CFG_SDRAM_BASE
  400. #endif
  401. #else
  402. #undef CFG_LOAD_ADDR /* force error break */
  403. #endif
  404. /* MEM test area */
  405. #if (CFG_SDRAM_SIZE != 0)
  406. /* SDRAM begin to stack area (1MB stack) */
  407. #if (CFG_SDRAM_BASE == CFG_NIOS_CPU_VEC_BASE)
  408. #define CFG_MEMTEST_START (CFG_SDRAM_BASE + CFG_NIOS_CPU_VEC_SIZE)
  409. #define CFG_MEMTEST_END (CFG_INIT_SP - (1024 * 1024))
  410. #else
  411. #define CFG_MEMTEST_START CFG_SDRAM_BASE
  412. #define CFG_MEMTEST_END (CFG_INIT_SP - (1024 * 1024))
  413. #endif
  414. #else
  415. #undef CFG_MEMTEST_START /* force error break */
  416. #undef CFG_MEMTEST_END
  417. #endif
  418. #endif /* __CONFIG_H */