board.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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-10-20 ZYH emmm...setup for HAL Libraries
  14. */
  15. // <<< Use Configuration Wizard in Context Menu >>>
  16. #ifndef __BOARD_H__
  17. #define __BOARD_H__
  18. #include "stm32f1xx_hal.h"
  19. /* board configuration */
  20. /* whether use board external SRAM memory */
  21. // <e>Use external SRAM memory on the board
  22. // <i>Enable External SRAM memory
  23. #define STM32_EXT_SRAM 0
  24. // <o>Begin Address of External SRAM
  25. // <i>Default: 0x68000000
  26. #define STM32_EXT_SRAM_BEGIN 0x68000000 /* the begining address of external SRAM */
  27. // <o>End Address of External SRAM
  28. // <i>Default: 0x68080000
  29. #define STM32_EXT_SRAM_END 0x68080000 /* the end address of external SRAM */
  30. // </e>
  31. // <o> Internal SRAM memory size[Kbytes] <8-64>
  32. // <i>Default: 64
  33. #define STM32_SRAM_SIZE 20
  34. #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
  35. #ifdef __CC_ARM
  36. extern int Image$$RW_IRAM1$$ZI$$Limit;
  37. #define HEAP_BEGIN ((void *)&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 ((void *)&__bss_end)
  44. #endif
  45. #define HEAP_END STM32_SRAM_END
  46. void rt_hw_board_init(void);
  47. #endif /* __BOARD_H__ */