mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-22 04:47:25 -04:00
Write instr-gen build output to a log file, rather than stdout
This commit is contained in:
parent
9dfdc800b7
commit
3e42d128cd
1 changed files with 8 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
|
@ -21,12 +22,16 @@ def main() -> int:
|
|||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Delete the output directory if it existed to ensure a clear build
|
||||
# Delete the output directory if it existed to ensure a clean build, then
|
||||
# create it. (The creation step is needed so that we can write our log file
|
||||
# in the directory from the outset).
|
||||
try:
|
||||
shutil.rmtree(args.output)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
os.makedirs(args.output, exist_ok=True)
|
||||
|
||||
cmd = (start_riscv_dv_run_cmd(args.verbose) +
|
||||
['--co', '--steps=gen',
|
||||
'--simulator', args.simulator,
|
||||
|
@ -34,7 +39,8 @@ def main() -> int:
|
|||
'--isa', args.isa,
|
||||
'--end_signature_addr', args.end_signature_addr])
|
||||
|
||||
return run_one(args.verbose, cmd)
|
||||
log_path = os.path.join(args.output, 'build.log')
|
||||
return run_one(args.verbose, cmd, redirect_stdstreams=log_path)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue