board.h 899 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. * 2020-01-15 shelton first version
  9. */
  10. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #include <at32f4xx.h>
  13. #include "at32_msp.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. /* Internal SRAM memory size[Kbytes] <96>, Default: 96*/
  18. #define AT32_SRAM_SIZE 96
  19. #define AT32_SRAM_END (0x20000000 + AT32_SRAM_SIZE * 1024)
  20. #if defined(__CC_ARM) || defined(__CLANG_ARM)
  21. extern int Image$$RW_IRAM1$$ZI$$Limit;
  22. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  23. #elif __ICCARM__
  24. #pragma section="CSTACK"
  25. #define HEAP_BEGIN (__segment_end("CSTACK"))
  26. #else
  27. extern int __bss_end;
  28. #define HEAP_BEGIN ((void *)&__bss_end)
  29. #endif
  30. #define HEAP_END AT32_SRAM_END
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif /* __BOARD_H__ */