board.c 978 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. * 2020-08-20 zx.chen add T-HEAD header file csi_core.h
  9. */
  10. #include <rthw.h>
  11. #include <rtthread.h>
  12. #include "board.h"
  13. #include "csi_core.h"
  14. #include "drv_usart.h"
  15. extern int __bss_end__;
  16. #define SYS_HEAP_BEGIN (&__bss_end__)
  17. #include "core_rv32.h"
  18. extern usart_handle_t console_handle;
  19. extern void ioreuse_initial(void);
  20. extern int rt_hw_usart_init(void);
  21. /**
  22. * This function will initial smart-evb board.
  23. */
  24. void rt_hw_board_init(void)
  25. {
  26. #ifdef RT_USING_COMPONENTS_INIT
  27. rt_components_board_init();
  28. #endif
  29. /* initialize hardware usart */
  30. rt_hw_usart_init();
  31. #if defined(RT_USING_CONSOLE) && defined(RT_USING_DEVICE)
  32. rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
  33. #endif
  34. #ifdef RT_USING_HEAP
  35. rt_system_heap_init((void *)SYS_HEAP_BEGIN, (void *)E906FD_IRAM_END);
  36. #endif
  37. }
  38. /*@}*/