From: Tim 'mithro' Ansell Date: Thu, 15 Dec 2016 15:33:08 +0000 (+0100) Subject: Make the csv directory if it doesn't exist. X-Git-Tag: 24jan2021_ls180~1921 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9d716def9d23954262c7c87a77ddfb64f47d35c5;p=litex.git Make the csv directory if it doesn't exist. --- diff --git a/litex/soc/integration/builder.py b/litex/soc/integration/builder.py index 06bdbb58..866a4fcd 100644 --- a/litex/soc/integration/builder.py +++ b/litex/soc/integration/builder.py @@ -95,6 +95,8 @@ class Builder: csr_regions = self.soc.get_csr_regions() constants = self.soc.get_constants() + csr_dir = os.path.dirname(self.csr_csv) + os.makedirs(csr_dir, exist_ok=True) with open(self.csr_csv, "w") as f: f.write(cpu_interface.get_csr_csv(csr_regions, constants, memory_regions))