board.h 708 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2006-2025, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. */
  7. #ifndef __BOARD_H__
  8. #define __BOARD_H__
  9. #include "gd32e23x.h"
  10. #include "drv_gpio.h"
  11. #include "gd32e23x_exti.h"
  12. #define GD32_SRAM_SIZE 8
  13. #define GD32_SRAM_BEGIN (0x20000000)
  14. #define GD32_SRAM_END (GD32_SRAM_BEGIN + GD32_SRAM_SIZE * 1024)
  15. #ifdef __ARMCC_VERSION
  16. extern int Image$$RW_IRAM1$$ZI$$Limit;
  17. #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
  18. #elif __ICCARM__
  19. #pragma section="CSTACK"
  20. #define HEAP_BEGIN (__segment_end("CSTACK"))
  21. #else /* GCC */
  22. extern int __bss_end;
  23. #define HEAP_BEGIN (&__bss_end)
  24. #endif
  25. #define HEAP_END GD32_SRAM_END
  26. #endif