board.h 811 B

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. * 2018-11-5 misonyo first version
  9. */
  10. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #include <stm32f4xx.h>
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #define STM32_SRAM_SIZE (128)
  17. #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
  18. #if defined(__ARMCC_VERSION)
  19. extern int Image$$RW_IRAM1$$ZI$$Limit;
  20. #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
  21. #elif __ICCARM__
  22. #pragma section="CSTACK"
  23. #define HEAP_BEGIN (__segment_end("CSTACK"))
  24. #else
  25. extern int __bss_end;
  26. #define HEAP_BEGIN (&__bss_end)
  27. #endif
  28. #define HEAP_END STM32_SRAM_END
  29. void SystemClock_Config(void);
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif