build/sim/Verilator: Skip .hex in sources.
Useful to use platform.add_source to add/copy .hex files.
This commit is contained in:
parent
af445e93dd
commit
611b84ccee
|
@ -8,6 +8,7 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from pathlib import Path
|
||||||
from shutil import which
|
from shutil import which
|
||||||
|
|
||||||
from migen.fhdl.structure import _Fragment
|
from migen.fhdl.structure import _Fragment
|
||||||
|
@ -132,9 +133,12 @@ def _generate_sim_config(config):
|
||||||
|
|
||||||
def _build_sim(build_name, sources, jobs, threads, coverage, opt_level="O3", trace_fst=False):
|
def _build_sim(build_name, sources, jobs, threads, coverage, opt_level="O3", trace_fst=False):
|
||||||
makefile = os.path.join(core_directory, 'Makefile')
|
makefile = os.path.join(core_directory, 'Makefile')
|
||||||
|
|
||||||
cc_srcs = []
|
cc_srcs = []
|
||||||
for filename, language, library, *copy in sources:
|
for filename, language, library, *copy in sources:
|
||||||
|
if Path(filename).suffix not in [".hex"]:
|
||||||
cc_srcs.append("--cc " + filename + " ")
|
cc_srcs.append("--cc " + filename + " ")
|
||||||
|
|
||||||
build_script_contents = """\
|
build_script_contents = """\
|
||||||
rm -rf obj_dir/
|
rm -rf obj_dir/
|
||||||
make -C . -f {} {} {} {} {} {} {}
|
make -C . -f {} {} {} {} {} {} {}
|
||||||
|
|
Loading…
Reference in New Issue