build/efinix/efinity: delays iface.py execution after project xml was written

This commit is contained in:
Gwenhael Goavec-Merou 2023-03-02 08:42:59 +01:00
parent ea2171d32b
commit b28598289e
1 changed files with 13 additions and 15 deletions

View File

@ -204,21 +204,6 @@ class EfinityToolchain(GenericToolchain):
tools.write_to_file("iface.py", header + gen + gpio + add + footer) tools.write_to_file("iface.py", header + gen + gpio + add + footer)
if tools.subprocess_call_filtered([self.efinity_path + "/bin/python3", "iface.py"], common.colors) != 0:
raise OSError("Error occurred during Efinity peri script execution.")
# Some IO blocks don't have Python API so we need to configure them
# directly in the peri.xml file
# We also need to configure the bank voltage here
if self.ifacewriter.xml_blocks or self.platform.iobank_info:
self.ifacewriter.generate_xml_blocks()
# Because the Python API is sometimes bugged, we need to tweak the generated xml
if self.ifacewriter.fix_xml:
self.ifacewriter.fix_xml_values()
# Project configuration (.xml) ----------------------------------------------------------------- # Project configuration (.xml) -----------------------------------------------------------------
def build_project(self): def build_project(self):
@ -268,6 +253,19 @@ class EfinityToolchain(GenericToolchain):
xml_str = xml_str.toprettyxml(indent=" ") xml_str = xml_str.toprettyxml(indent=" ")
tools.write_to_file("{}.xml".format(self._build_name), xml_str) tools.write_to_file("{}.xml".format(self._build_name), xml_str)
if tools.subprocess_call_filtered([self.efinity_path + "/bin/python3", "iface.py"], common.colors) != 0:
raise OSError("Error occurred during Efinity peri script execution.")
# Some IO blocks don't have Python API so we need to configure them
# directly in the peri.xml file
# We also need to configure the bank voltage here
if self.ifacewriter.xml_blocks or self.platform.iobank_info:
self.ifacewriter.generate_xml_blocks()
# Because the Python API is sometimes bugged, we need to tweak the generated xml
if self.ifacewriter.fix_xml:
self.ifacewriter.fix_xml_values()
def build_script(self): def build_script(self):
return "" # not used return "" # not used