board.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 SummerGift first version
  9. */
  10. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #include <stm32f1xx.h>
  13. #define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000)
  14. #define STM32_FLASH_SIZE (64 * 1024)
  15. #define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE))
  16. /* Internal SRAM memory size[Kbytes] <8-64>, Default: 64*/
  17. #define STM32_SRAM_SIZE 20
  18. #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
  19. #if defined(__ARMCC_VERSION)
  20. extern int Image$$RW_IRAM1$$ZI$$Limit;
  21. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  22. #elif __ICCARM__
  23. #pragma section="CSTACK"
  24. #define HEAP_BEGIN (__segment_end("CSTACK"))
  25. #else
  26. extern int __bss_end;
  27. #define HEAP_BEGIN ((void *)&__bss_end)
  28. #endif
  29. #define HEAP_END STM32_SRAM_END
  30. void SystemClock_Config(void);
  31. #endif /* __BOARD_H__ */