board.c 785 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
/*
 * Copyright (c) 2021, Shenzhen Academy of Aerospace Technology
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-11-16     Dystopia     the first version
 */

#include "board.h"
#include "interrupt.h"
#include "drv_timer.h"
#include "KeyStone_common.h"

#include <rtthread.h>

/**
 * This function will initial board.
 */
void rt_hw_board_init(void)
{
	// initial CPU core
	KeyStone_common_CPU_init();

	// initial interrupt controller
	rt_hw_interrupt_init();

	// initial system timer
H
Huang bo 已提交
30
    rt_hw_system_timer_init();
31

H
Huang bo 已提交
32 33 34
    /* initialize memory system */
    rt_kprintf("heap: 0x%08x - 0x%08x\n", RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
    rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
35

H
Huang bo 已提交
36
    rt_hw_system_timer_start();
37
}