board.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * File : board.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2009, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2009-09-22 Bernard add board.h to this bsp
  13. */
  14. // <<< Use Configuration Wizard in Context Menu >>>
  15. #ifndef __BOARD_H__
  16. #define __BOARD_H__
  17. #include <stm32f4xx.h>
  18. #include <drv_sdram.h>
  19. #include <drv_nand.h>
  20. /* board configuration */
  21. // <o> SDCard Driver <1=>SDIO sdcard <0=>SPI MMC card
  22. // <i>Default: 1
  23. #define STM32_USE_SDIO 0
  24. #define IS42S16400J_SIZE 0x400000
  25. #define W9825G6KH_SIZE (32*1024*1024)
  26. // <o>Begin Address of External SDRAM
  27. // <i>Default: 0xD0000000
  28. #define EXT_SDRAM_BEGIN SDRAM_BANK_ADDR /* the begining address of external SDRAM */
  29. // <o>End Address of External SRAM
  30. // <i>Default: 0xD0800000
  31. #define EXT_SDRAM_END (SDRAM_BANK_ADDR + W9825G6KH_SIZE) /* the end address of external SDRAM */
  32. // <o> Internal SRAM memory size[Kbytes] <8-64>
  33. // <i>Default: 64
  34. #ifdef __ICCARM__
  35. // Use *.icf ram symbal, to avoid hardcode.
  36. extern char __ICFEDIT_region_RAM_end__;
  37. #define STM32_SRAM_END &__ICFEDIT_region_RAM_end__
  38. #else
  39. #define STM32_SRAM_SIZE 128
  40. #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
  41. #endif
  42. #ifdef __CC_ARM
  43. extern int Image$$RW_IRAM1$$ZI$$Limit;
  44. #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
  45. #elif __ICCARM__
  46. #pragma section="HEAP"
  47. #define HEAP_BEGIN (__segment_end("HEAP"))
  48. #else
  49. extern int __bss_end;
  50. #define HEAP_BEGIN (&__bss_end)
  51. #endif
  52. #define HEAP_END STM32_SRAM_END
  53. void rt_hw_board_init(void);
  54. #define STM32F4xx_PIN_NUMBERS 176
  55. void Error_Handler(void);
  56. #endif
  57. //*** <<< end of configuration section >>> ***