File tree Expand file tree Collapse file tree 7 files changed +31
-262
lines changed Expand file tree Collapse file tree 7 files changed +31
-262
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ WEB_JS_RESOURCES := $(ASSETS)/js
66EXPORTED_FUNCS := _main,_indirect_rv_halt
77DEMO_DIR := demo
88WEB_FILES := $(BIN ) .js \
9- $(BIN ) .wasm \
10- $(BIN ) .worker.js \
9+ $(BIN ) .wasm \
10+ $(BIN ) .worker.js \
1111 $(OUT ) /elf_list.js
1212
1313ifeq ("$(CC_IS_EMCC ) ", "1")
Original file line number Diff line number Diff line change @@ -1175,6 +1175,7 @@ void rv_step(void *arg)
11751175 if (rv_has_halted (rv )) {
11761176 emscripten_cancel_main_loop ();
11771177 rv_delete (rv ); /* clean up and reuse memory */
1178+ rv_log_info ("RISC-V emulator is destroyed" );
11781179 }
11791180#endif
11801181}
Original file line number Diff line number Diff line change @@ -615,7 +615,6 @@ void rv_run(riscv_t *rv)
615615 attr -> data .user .elf_program
616616#endif
617617 );
618- attr -> cycle_per_step = 100000000 ;
619618
620619 if (!(attr -> run_flag & (RV_RUN_TRACE | RV_RUN_GDBSTUB ))) {
621620#ifdef __EMSCRIPTEN__
Original file line number Diff line number Diff line change 22
33import os
44
5- def list_files (d ):
5+
6+ def list_files (d , ignore_list = None ):
7+ if ignore_list is None :
8+ ignore_list = []
69 try :
710 if d == "build" :
8- files = [f for f in os .listdir (d ) if (os .path .isfile (os .path .join (d , f )) and f .endswith ('.elf' ))]
11+ files = [
12+ f
13+ for f in os .listdir (d )
14+ if os .path .isfile (os .path .join (d , f ))
15+ and f .endswith (".elf" )
16+ and not any (f .endswith (ign ) or f .startswith (ign ) for ign in ignore_list )
17+ ]
918 else :
1019 parent_dir = os .path .dirname (d )
1120 files = [
1221 os .path .relpath (os .path .join (d , f ), start = parent_dir )
1322 for f in os .listdir (d )
1423 if os .path .isfile (os .path .join (d , f ))
24+ and not any (
25+ f .endswith (ign ) or os .path .join (d , f ).endswith (ign )
26+ for ign in ignore_list
27+ )
1528 ]
1629 return files
1730 except FileNotFoundError :
18- print (f"Directory { directory } not found." )
31+ print (f"Directory { d } not found." )
1932 return []
2033
34+
2135elf_exec_dirs = ["build" , "build/riscv32" ]
36+ msg_less_ignore_files = [
37+ "cc.elf" ,
38+ "chacha20.elf" ,
39+ "riscv32/lena" ,
40+ "riscv32/puzzle" ,
41+ "riscv32/line" ,
42+ "riscv32/captcha" ,
43+ ] # List of files to ignore
2244elf_exec_list = []
2345
2446for d in elf_exec_dirs :
25- files = list_files (d )
47+ files = list_files (d , ignore_list = msg_less_ignore_files )
2648 elf_exec_list .extend (files )
27- #print(elf_exec_list)
49+
2850
2951def gen_elf_list_js ():
3052 js_code = f"const elfFiles = { elf_exec_list } ;\n "
3153 print (js_code )
3254
55+
3356gen_elf_list_js ()
You can’t perform that action at this time.
0 commit comments