aboutsummaryrefslogtreecommitdiffstats
path: root/ecp5/family.cmake
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-07-12 19:59:18 +0200
committerDavid Shah <davey1576@gmail.com>2018-07-12 19:59:18 +0200
commitd16d34736f6565e67b5ad3563ed69552abefd305 (patch)
treef236d09c375ffae0754dbaf38690d6cf3f24ba0c /ecp5/family.cmake
parent7b9b2bef3c622bd54225c1c44ee63a211e0e1d3e (diff)
downloadnextpnr-d16d34736f6565e67b5ad3563ed69552abefd305.tar.gz
nextpnr-d16d34736f6565e67b5ad3563ed69552abefd305.tar.bz2
nextpnr-d16d34736f6565e67b5ad3563ed69552abefd305.zip
ecp5/cmake: Improve error message when trellis/pytrellis not found
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ecp5/family.cmake')
-rw-r--r--ecp5/family.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/ecp5/family.cmake b/ecp5/family.cmake
index f58cdbb2..f4d0bf87 100644
--- a/ecp5/family.cmake
+++ b/ecp5/family.cmake
@@ -1,6 +1,17 @@
set(devices 45k)
+if (NOT DEFINED TRELLIS_ROOT)
+ message(FATAL_ERROR "you must define TRELLIS_ROOT using -DTRELLIS_ROOT=/path/to/prjtrellis for ECP5 support")
+endif()
+
+
+file( GLOB found_pytrellis ${TRELLIS_ROOT}/libtrellis/pytrellis.*)
+
+if ("${found_pytrellis}" STREQUAL "")
+ message(FATAL_ERROR "failed to find pytrellis library in ${TRELLIS_ROOT}/libtrellis/")
+endif()
+
set(DB_PY ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/trellis_import.py)
file(MAKE_DIRECTORY ecp5/chipdbs/)