File tree 7 files changed +31
-262
lines changed
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
6
6
EXPORTED_FUNCS := _main,_indirect_rv_halt
7
7
DEMO_DIR := demo
8
8
WEB_FILES := $(BIN ) .js \
9
- $(BIN ) .wasm \
10
- $(BIN ) .worker.js \
9
+ $(BIN ) .wasm \
10
+ $(BIN ) .worker.js \
11
11
$(OUT ) /elf_list.js
12
12
13
13
ifeq ("$(CC_IS_EMCC ) ", "1")
Original file line number Diff line number Diff line change @@ -1175,6 +1175,7 @@ void rv_step(void *arg)
1175
1175
if (rv_has_halted (rv )) {
1176
1176
emscripten_cancel_main_loop ();
1177
1177
rv_delete (rv ); /* clean up and reuse memory */
1178
+ rv_log_info ("RISC-V emulator is destroyed" );
1178
1179
}
1179
1180
#endif
1180
1181
}
Original file line number Diff line number Diff line change @@ -615,7 +615,6 @@ void rv_run(riscv_t *rv)
615
615
attr -> data .user .elf_program
616
616
#endif
617
617
);
618
- attr -> cycle_per_step = 100000000 ;
619
618
620
619
if (!(attr -> run_flag & (RV_RUN_TRACE | RV_RUN_GDBSTUB ))) {
621
620
#ifdef __EMSCRIPTEN__
Original file line number Diff line number Diff line change 2
2
3
3
import os
4
4
5
- def list_files (d ):
5
+
6
+ def list_files (d , ignore_list = None ):
7
+ if ignore_list is None :
8
+ ignore_list = []
6
9
try :
7
10
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
+ ]
9
18
else :
10
19
parent_dir = os .path .dirname (d )
11
20
files = [
12
21
os .path .relpath (os .path .join (d , f ), start = parent_dir )
13
22
for f in os .listdir (d )
14
23
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
+ )
15
28
]
16
29
return files
17
30
except FileNotFoundError :
18
- print (f"Directory { directory } not found." )
31
+ print (f"Directory { d } not found." )
19
32
return []
20
33
34
+
21
35
elf_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
22
44
elf_exec_list = []
23
45
24
46
for d in elf_exec_dirs :
25
- files = list_files (d )
47
+ files = list_files (d , ignore_list = msg_less_ignore_files )
26
48
elf_exec_list .extend (files )
27
- #print(elf_exec_list)
49
+
28
50
29
51
def gen_elf_list_js ():
30
52
js_code = f"const elfFiles = { elf_exec_list } ;\n "
31
53
print (js_code )
32
54
55
+
33
56
gen_elf_list_js ()
You can’t perform that action at this time.
0 commit comments