board.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) 2006-2025 RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2025-2-3 yekai first version
  9. */
  10. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #include <rtthread.h>
  13. #include <stm32h7xx.h>
  14. #include "drv_common.h"
  15. #include "drv_gpio.h"
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. #define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000)
  20. #define STM32_FLASH_SIZE (128 * 1024)
  21. #define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
  22. #define STM32_SRAM_SIZE (64*5)
  23. #define STM32_SRAM_END (0x24000000 + STM32_SRAM_SIZE * 1024)
  24. #if defined(__ARMCC_VERSION)
  25. // use IRAM2(RAM D1)
  26. extern int Image$$RW_IRAM2$$ZI$$Limit;
  27. #define HEAP_BEGIN (&Image$$RW_IRAM2$$ZI$$Limit)
  28. #define HEAP_END STM32_SRAM_END
  29. #elif defined(__GNUC__)
  30. extern uint8_t _heap_start[];
  31. extern uint8_t _heap_end[];
  32. #define HEAP_BEGIN _heap_start
  33. #define HEAP_END _heap_end
  34. #endif
  35. void SystemClock_Config(void);
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif