board.c 917 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. * 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. /**
  21. * This function will initial smartl-evb(e906) board.
  22. */
  23. void rt_hw_board_init(void)
  24. {
  25. #ifdef RT_USING_COMPONENTS_INIT
  26. rt_components_board_init();
  27. #endif
  28. /* initialize hardware usart */
  29. rt_hw_usart_init();
  30. #ifdef RT_USING_CONSOLE
  31. rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
  32. #endif
  33. #ifdef RT_USING_HEAP
  34. rt_system_heap_init((void *)SYS_HEAP_BEGIN, (void *)E906FD_IRAM_END);
  35. #endif
  36. }
  37. /*@}*/