board.h 978 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /**************************************************************************//**
  2. *
  3. * @copyright (C) 2020 Nuvoton Technology Corp. All rights reserved.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0
  6. *
  7. * Change Logs:
  8. * Date Author Notes
  9. * 2020-1-16 Wayne First version
  10. *
  11. ******************************************************************************/
  12. #ifndef __BOARD_H__
  13. #define __BOARD_H__
  14. // <o> Internal SRAM memory size[Kbytes] <8-64>
  15. #define SRAM_SIZE (160)
  16. #define SRAM_END (0x20000000 + SRAM_SIZE * 1024)
  17. #if defined(__ARMCC_VERSION)
  18. extern int Image$$RW_IRAM1$$ZI$$Limit;
  19. #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
  20. #elif __ICCARM__
  21. #pragma section="CSTACK"
  22. #define HEAP_BEGIN (__segment_end("CSTACK"))
  23. #else
  24. extern int __bss_end;
  25. #define HEAP_BEGIN ((void *)&__bss_end)
  26. #endif
  27. #define HEAP_END (void *)SRAM_END
  28. void rt_hw_board_init(void);
  29. void rt_hw_cpu_reset(void);
  30. #endif /* BOARD_H_ */