From: William D. Jones Date: Sat, 8 Sep 2018 01:49:24 +0000 (-0400) Subject: Add COPY_TO_MAIN_RAM generated Makefile variable to distinguish systems with/without... X-Git-Tag: 24jan2021_ls180~1618^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bd70ba278bd33b9ecfa5dafbcd21943775de2754;p=litex.git Add COPY_TO_MAIN_RAM generated Makefile variable to distinguish systems with/without main_ram region. --- diff --git a/litex/soc/integration/builder.py b/litex/soc/integration/builder.py index 45bfd4ae..2fe1667b 100644 --- a/litex/soc/integration/builder.py +++ b/litex/soc/integration/builder.py @@ -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)