aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam D. Jones <thor0505@comcast.net>2020-06-27 17:08:11 -0400
committergatecat <gatecat@ds0.me>2021-02-12 10:36:59 +0000
commit539651609cf82ab8e05cac636aee997e831b4d29 (patch)
treeae500ca9a6c1ac5076fb3363641288645e020447
parentc38762f91f649815ab1162dc981da84cab98dd61 (diff)
downloadnextpnr-539651609cf82ab8e05cac636aee997e831b4d29.tar.gz
nextpnr-539651609cf82ab8e05cac636aee997e831b4d29.tar.bz2
nextpnr-539651609cf82ab8e05cac636aee997e831b4d29.zip
Update machxo2 backend with minimal build system changes so nextpnr compiles again.
-rw-r--r--machxo2/facade_import.py5
-rw-r--r--machxo2/family.cmake11
2 files changed, 13 insertions, 3 deletions
diff --git a/machxo2/facade_import.py b/machxo2/facade_import.py
index dd21a698..d21557ae 100644
--- a/machxo2/facade_import.py
+++ b/machxo2/facade_import.py
@@ -70,9 +70,14 @@ def main():
pytrellis.load_database(database.get_db_root())
+ # Dummy
+ dev_name = "1200"
+
bba = BinaryBlobAssembler()
bba.pre('#include "nextpnr.h"')
+ bba.pre('#include "embed.h"')
bba.pre('NEXTPNR_NAMESPACE_BEGIN')
+ bba.post('EmbeddedFile chipdb_file_%s("machxo2/chipdb-%s.bin", chipdb_blob_%s);' % (dev_name, dev_name, dev_name))
bba.post('NEXTPNR_NAMESPACE_END')
bba.push("chipdb_blob_%s" % args.device)
bba.u8(0, None)
diff --git a/machxo2/family.cmake b/machxo2/family.cmake
index 0c829d55..f19ebc70 100644
--- a/machxo2/family.cmake
+++ b/machxo2/family.cmake
@@ -33,9 +33,14 @@ foreach(device ${MACHXO2_DEVICES})
endif()
endforeach()
if(WIN32)
- list(APPEND chipdb_sources
- ${CMAKE_CURRENT_SOURCE_DIR}/${family}/resource/embed.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/${family}/resource/chipdb.rc)
+ set(chipdb_rc ${CMAKE_CURRENT_BINARY_DIR}/${family}/resource/chipdb.rc)
+ list(APPEND chipdb_sources ${chipdb_rc})
+
+ file(WRITE ${chipdb_rc})
+ foreach(device ${MACHXO2_DEVICES})
+ file(APPEND ${chipdb_rc}
+ "${family}/chipdb-${device}.bin RCDATA \"${CMAKE_CURRENT_BINARY_DIR}/${family}/chipdb/chipdb-${device}.bin\"")
+ endforeach()
endif()
add_custom_target(chipdb-${family}-bins DEPENDS ${chipdb_sources} ${chipdb_binaries})