添加异常信息打印

This commit is contained in:
2025-04-19 00:42:20 +08:00
parent 38d433558d
commit fe515858e5
4 changed files with 81 additions and 13 deletions

View File

@@ -44,13 +44,15 @@ int main()
{
int a=1;
int b=2;
// typedef void (*fun_t)(void);
// fun_t fun = (fun_t)0xffffffff;
// fun();
typedef void (*fun_t)(void);
fun_t fun = (fun_t)0;
fun();
int c = add(a, b);
my_printf("Hello World! %s\n", "Andy");
my_printf("add(%d, %d)=%d\n", a, b, c);
a = 67;b = -78;
fun=(fun_t)0xff000000;
fun();
my_printf("mul(%d, %d)=%d\n", a, b, a * b);
my_printf("ram_val test: %s\n", g_string);
set_csr(mstatus, 0x00000008);