Add COPY_TO_MAIN_RAM generated Makefile variable to distinguish systems with/without...
authorWilliam D. Jones <thor0505@comcast.net>
Sat, 8 Sep 2018 01:49:24 +0000 (21:49 -0400)
committerWilliam D. Jones <thor0505@comcast.net>
Sat, 8 Sep 2018 01:49:24 +0000 (21:49 -0400)
litex/soc/integration/builder.py

index 45bfd4ae6f80f30221bbe05b51bc63259ead77d5..2fe1667b9f1bd5c58a9689da749b7417e2ed1f9a 100644 (file)
@@ -71,6 +71,12 @@ class Builder:
             variables_contents.append("{}={}\n".format(k, _makefile_escape(v)))
         for k, v in cpu_interface.get_cpu_mak(cpu_type, cpu_variant):
             define(k, v)
+        # Distinguish between applications running from main RAM and
+        # flash for user-provided software packages.
+        if "main_ram" in (m[0] for m in memory_regions):
+            define("COPY_TO_MAIN_RAM", "1")
+        else:
+            define("COPY_TO_MAIN_RAM", "0")
         define("SOC_DIRECTORY", soc_directory)
         variables_contents.append("export BUILDINC_DIRECTORY\n")
         define("BUILDINC_DIRECTORY", buildinc_dir)