From ed0144b2ce0902b23f1b22895180fb26c4bc3fe0 Mon Sep 17 00:00:00 2001 From: andy <1414772332@qq.com> Date: Thu, 17 Apr 2025 00:12:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=85=A8=E5=B1=80=E5=8F=98?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cpu/riscv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cpu/riscv.c b/cpu/riscv.c index b527091..a4035ad 100644 --- a/cpu/riscv.c +++ b/cpu/riscv.c @@ -1,6 +1,6 @@ #include "riscv.h" - +#include "debug.h" @@ -694,6 +694,7 @@ int riscv_run(riscv_t* riscv) { #include "stdio.h" #include "stdlib.h" #include "errno.h" +#include "string.h" long get_file_size(FILE *stream) { @@ -718,9 +719,10 @@ long get_file_size(FILE *stream) return file_size; } +riscv_t riscv={0}; int thread_fun(void* t) { - riscv_t riscv={0}; + printf("riscv start\n"); FILE *file=fopen("riscv.bin", "rb" ); if(file==NULL) { @@ -733,4 +735,6 @@ int thread_fun(void* t) fclose(file); riscv_init(&riscv,riscv.rom,0x80000000,riscv.rom_size); + + return 0; }