board.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-02-11 supperthomas first version
  9. *
  10. */
  11. #ifndef _BOARD_H_
  12. #define _BOARD_H_
  13. #include <rtthread.h>
  14. #include <rthw.h>
  15. #include "mxc_config.h"
  16. #include "mxc_assert.h"
  17. #define MCU_FLASH_START_ADRESS ((uint32_t)0x0)
  18. #define MCU_FLASH_SIZE_KB (256)
  19. #define MCU_FLASH_END_ADDRESS ((uint32_t)(MCU_FLASH_START_ADRESS + MCU_FLASH_SIZE*1024))
  20. #define MCU_SRAM_SIZE_KB (96)
  21. #define MCU_SRAM_START (0x20000000)
  22. #define MCU_SRAM_END (MCU_SRAM_START + MCU_SRAM_SIZE_KB * 1024)
  23. #if defined(__ARMCC_VERSION)
  24. extern int Image$$RW_IRAM1$$ZI$$Limit;
  25. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  26. #elif __ICCARM__
  27. #pragma section="CSTACK"
  28. #define HEAP_BEGIN (__segment_end("CSTACK"))
  29. #else
  30. extern int _ebss;
  31. #define HEAP_BEGIN ((void *)&_ebss)
  32. #endif
  33. #define HEAP_END MCU_SRAM_END
  34. void rt_hw_board_init(void);
  35. #endif