board.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. /* board configuration */
  15. // <o> SDCard Driver <1=>SDIO sdcard <0=>SPI MMC card
  16. // <i>Default: 1
  17. #define STM32_USE_SDIO 0
  18. /* whether use board external SRAM memory */
  19. // <e>Use external SRAM memory on the board
  20. // <i>Enable External SRAM memory
  21. #define STM32_EXT_SRAM 0
  22. // <o>Begin Address of External SRAM
  23. // <i>Default: 0x68000000
  24. #define STM32_EXT_SRAM_BEGIN 0x68000000 /* the begining address of external SRAM */
  25. // <o>End Address of External SRAM
  26. // <i>Default: 0x68080000
  27. #define STM32_EXT_SRAM_END 0x68080000 /* the end address of external SRAM */
  28. // </e>
  29. // <o> Internal SRAM memory size[Kbytes] <8-64>
  30. // <i>Default: 64
  31. #ifdef __ICCARM__
  32. // Use *.icf ram symbal, to avoid hardcode.
  33. extern char __ICFEDIT_region_RAM_end__;
  34. #define STM32_SRAM_END &__ICFEDIT_region_RAM_end__
  35. #else
  36. #define STM32_SRAM_SIZE 128
  37. #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
  38. #endif
  39. #if defined(__CC_ARM) || defined(__CLANG_ARM)
  40. extern int Image$$RW_IRAM1$$ZI$$Limit;
  41. #define STM32_SRAM_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
  42. #elif __ICCARM__
  43. #pragma section="HEAP"
  44. #define STM32_SRAM_BEGIN (__segment_end("HEAP"))
  45. #else
  46. extern int __bss_end;
  47. #define STM32_SRAM_BEGIN (&__bss_end)
  48. #endif
  49. void rt_hw_board_init(void);
  50. #endif
  51. // <<< Use Configuration Wizard in Context Menu >>>