board.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #ifndef __BOARD_H__
  15. #define __BOARD_H__
  16. #include "stm32f7xx_hal.h"
  17. /* whether use board external SDRAM memory */
  18. #define EXT_SDRAM_BEGIN (0xC0000000)
  19. #define EXT_SDRAM_SIZE (0x800000)
  20. #define EXT_SDRAM_END (EXT_SDRAM_BEGIN + EXT_SDRAM_SIZE)
  21. #ifdef __CC_ARM
  22. extern int Image$$RW_IRAM1$$ZI$$Limit;
  23. #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
  24. #elif __ICCARM__
  25. #pragma section="HEAP"
  26. #define HEAP_BEGIN (__segment_end("HEAP"))
  27. #else
  28. extern int __bss_end;
  29. #define HEAP_BEGIN (&__bss_end)
  30. #endif
  31. #define STM32_SRAM_SIZE (512)
  32. #define HEAP_END (0x20000000 + STM32_SRAM_SIZE * 1024)
  33. #define HEAP_SIZE (HEAP_END - (rt_uint32_t)HEAP_BEGIN)
  34. extern void rt_hw_board_init(void);
  35. #endif