添加while(1) timer中断测试
This commit is contained in:
@@ -46,6 +46,9 @@ int main()
|
|||||||
int b=2;
|
int b=2;
|
||||||
typedef void (*fun_t)(void);
|
typedef void (*fun_t)(void);
|
||||||
fun_t fun = (fun_t)0;
|
fun_t fun = (fun_t)0;
|
||||||
|
set_csr(mstatus, 0x00000008);
|
||||||
|
set_csr(mie, (1 << 3) | (1 << 7));
|
||||||
|
set_csr(mip, (1 << 3));
|
||||||
fun();
|
fun();
|
||||||
int c = add(a, b);
|
int c = add(a, b);
|
||||||
my_printf("Hello World! %s\n", "Andy");
|
my_printf("Hello World! %s\n", "Andy");
|
||||||
@@ -55,10 +58,10 @@ int main()
|
|||||||
fun();
|
fun();
|
||||||
my_printf("mul(%d, %d)=%d\n", a, b, a * b);
|
my_printf("mul(%d, %d)=%d\n", a, b, a * b);
|
||||||
my_printf("ram_val test: %s\n", g_string);
|
my_printf("ram_val test: %s\n", g_string);
|
||||||
set_csr(mstatus, 0x00000008);
|
|
||||||
set_csr(mie, (1 << 3));
|
|
||||||
set_csr(mip, (1 << 3));
|
|
||||||
cpu_test();
|
cpu_test();
|
||||||
|
|
||||||
|
my_printf("enter while 1\n");
|
||||||
|
while (1) {
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Reference in New Issue
Block a user