2019-07-24 17:03:26 +08:00
|
|
|
//See LICENSE for license details.
|
|
|
|
#include <gd32vf103.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include "riscv_encoding.h"
|
|
|
|
#include "n22_func.h"
|
|
|
|
|
|
|
|
void _init() {
|
2019-10-21 17:12:00 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void _fini() {
|
|
|
|
}
|
|
|
|
|
|
|
|
void riscv_clock_init(void) {
|
2019-07-24 17:03:26 +08:00
|
|
|
SystemInit();
|
|
|
|
|
|
|
|
//ECLIC init
|
|
|
|
eclic_init(ECLIC_NUM_INTERRUPTS);
|
|
|
|
eclic_mode_enable();
|
|
|
|
set_csr(mstatus, MSTATUS_MIE);
|
|
|
|
|
|
|
|
}
|