board.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) 2006-2021, 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. */
  10. // <<< Use Configuration Wizard in Context Menu >>>
  11. #ifndef __BOARD_H__
  12. #define __BOARD_H__
  13. #include <gd32f30x.h>
  14. // <o> Internal SRAM memory size[Kbytes] <8-64>
  15. // <i>Default: 64
  16. #ifdef __ICCARM__
  17. // Use *.icf ram symbal, to avoid hardcode.
  18. extern char __ICFEDIT_region_RAM_end__;
  19. #define GD32_SRAM_END &__ICFEDIT_region_RAM_end__
  20. #else
  21. #define GD32_SRAM_SIZE 64
  22. #define GD32_SRAM_END (0x20000000 + GD32_SRAM_SIZE * 1024)
  23. #endif
  24. #ifdef __CC_ARM
  25. extern int Image$$RW_IRAM1$$ZI$$Limit;
  26. #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
  27. #elif __ICCARM__
  28. #pragma section="HEAP"
  29. #define HEAP_BEGIN (__segment_end("HEAP"))
  30. #else
  31. extern int __bss_end;
  32. #define HEAP_BEGIN (&__bss_end)
  33. #endif
  34. #define HEAP_END GD32_SRAM_END
  35. #endif
  36. //*** <<< end of configuration section >>> ***