do not attempt to build SDRAM PHY header when SDRAM is not present
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Sun, 24 Nov 2013 22:51:29 +0000 (23:51 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Sun, 24 Nov 2013 22:51:29 +0000 (23:51 +0100)
make.py

diff --git a/make.py b/make.py
index aa73dc141e36ec5f20ee4d5e1fd825f109e63e2d..403d6b5100b03b31aa367c68f0c17f154b27dc2d 100755 (executable)
--- a/make.py
+++ b/make.py
@@ -64,8 +64,9 @@ def main():
                write_to_file("software/include/generated/regions.ld", boilerplate + linker_header)
                csr_header = cpuif.get_csr_header(soc.csr_base, soc.csrbankarray, soc.interrupt_map)
                write_to_file("software/include/generated/csr.h", boilerplate + csr_header)
-               sdram_phy_header = initsequence.get_sdram_phy_header(soc.ddrphy)
-               write_to_file("software/include/generated/sdram_phy.h", boilerplate + sdram_phy_header)
+               if hasattr(soc, "ddrphy"):
+                       sdram_phy_header = initsequence.get_sdram_phy_header(soc.ddrphy)
+                       write_to_file("software/include/generated/sdram_phy.h", boilerplate + sdram_phy_header)
        if args.csr_csv:
                csr_csv = cpuif.get_csr_csv(soc.csr_base, soc.csrbankarray)
                write_to_file(args.csr_csv, csr_csv)