1
0

board.h 1.7 KB

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