board.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. * 2018-11-5 SummerGift first version
  9. * 2019-04-09 WillianChan add stm32f469-st-disco bsp
  10. */
  11. #ifndef __BOARD_H__
  12. #define __BOARD_H__
  13. #include <rtthread.h>
  14. #include "stm32mp1xx.h"
  15. #include "stm32mp1xx_hal.h"
  16. #include "drv_common.h"
  17. #include "drv_gpio.h"
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #define STM32_FLASH_START_ADRESS ((uint32_t)0x10000000)
  22. #define STM32_FLASH_SIZE (256 * 1024)
  23. #define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
  24. #define STM32_SRAM_SIZE (128)
  25. #define STM32_SRAM_END ((uint32_t)0x10040000 + (STM32_SRAM_SIZE * 1024))
  26. #if defined(__ARMCC_VERSION)
  27. extern int Image$$RW_IRAM1$$ZI$$Limit;
  28. #define HEAP_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
  29. #elif __ICCARM__
  30. #pragma section="CSTACK"
  31. #define HEAP_BEGIN (__segment_end("CSTACK"))
  32. #else
  33. extern int __bss_end__;
  34. #define HEAP_BEGIN (0x10040000 + 64 * 1024)
  35. #endif
  36. #define HEAP_END STM32_SRAM_END
  37. void SystemClock_Config(void);
  38. extern void _Error_Handler(char *s, int num);
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif