board.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. * 2017-08-25 LongfeiMa transplantation for stm32h7xx
  10. */
  11. #ifndef __BOARD_H__
  12. #define __BOARD_H__
  13. #include <stm32h7xx.h>
  14. #include "stm32h7xx_hal.h"
  15. // <<< Use Configuration Wizard in Context Menu >>>
  16. /* board configuration */
  17. #define RT_USING_UART1
  18. #define RT_USING_UART2
  19. #define RT_USING_UART3
  20. // <o> SDCard Driver <1=>SDIO sdcard <0=>SPI MMC card
  21. // <i>Default: 1
  22. #define STM32_USE_SDIO 0
  23. /* whether use board external SDRAM memory */
  24. // <e>Use external SDRAM memory on the board
  25. // <o>Begin Address of External SDRAM
  26. #define EXT_SDRAM_BEGIN 0xC0000000
  27. // <o>Size of External SDRAM
  28. #define EXT_SDRAM_SIZE (0x800000)
  29. #define EXT_SDRAM_END (EXT_SDRAM_BEGIN + EXT_SDRAM_SIZE)
  30. // </e>
  31. #ifdef __CC_ARM
  32. extern int Image$$RW_IRAM1$$ZI$$Limit;
  33. #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
  34. #elif __ICCARM__
  35. #pragma section="HEAP"
  36. #define HEAP_BEGIN (__segment_end("HEAP"))
  37. #else
  38. extern int __bss_end;
  39. #define HEAP_BEGIN (&__bss_end)
  40. #endif
  41. // <o> Internal SRAM memory size[Kbytes] <8-64>
  42. // <i>Default: 64
  43. #define STM32_SRAM_SIZE (512 * 1024)
  44. #define HEAP_END (0x24000000 + STM32_SRAM_SIZE)
  45. void rt_hw_board_init(void);
  46. #endif