From e3f6d8349be6257449c1bd31dde9ceabd80e7043 Mon Sep 17 00:00:00 2001 From: developandplay <34752929+developandplay@users.noreply.github.com> Date: Sat, 26 Jun 2021 16:30:54 +0200 Subject: [PATCH] Use os methods to expand env vars --- litex/soc/cores/cpu/blackparrot/core.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/litex/soc/cores/cpu/blackparrot/core.py b/litex/soc/cores/cpu/blackparrot/core.py index 8f5498de0..52bbc3930 100644 --- a/litex/soc/cores/cpu/blackparrot/core.py +++ b/litex/soc/cores/cpu/blackparrot/core.py @@ -147,18 +147,10 @@ class BlackParrotRV64(CPU): continue elif ("+incdir+" in temp) : s1 = line.find('$') - s2 = line.find('/') - dir_ = line[s1:s2] - a = os.popen('echo '+ str(dir_)) - dir_start = a.read() - vdir = dir_start[:-1] + line[s2:-1] + vdir = os.path.expandvars(line[s1:]).strip() platform.add_verilog_include_path(vdir) elif (temp[0]=='$') : - s2 = line.find('/') - dir_ = line[0:s2] - a = os.popen('echo '+ str(dir_)) - dir_start = a.read() - vdir = dir_start[:-1]+ line[s2:-1] + vdir = os.path.expandvars(line).strip() platform.add_source(vdir, "systemverilog") elif (temp[0] == '/'): assert("No support for absolute path for now")