board.h 1.5 KB

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