From 3d9ce8836c4c82fdb7f74ef3def1c4c85a0e1a1c Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Sun, 15 Sep 2019 12:30:03 +0200 Subject: bba: Require explicit endianness flag, and supply it Signed-off-by: Marcus Comstedt --- ice40/family.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ice40') diff --git a/ice40/family.cmake b/ice40/family.cmake index 6c46f459..3679a72e 100644 --- a/ice40/family.cmake +++ b/ice40/family.cmake @@ -44,7 +44,7 @@ if (NOT EXTERNAL_CHIPDB) DEPENDS ${DEV_CONSTIDS_INC} ${DEV_GFXH} ${DEV_TXT_DB} ${DB_PY} ${PREV_DEV_CC_BBA_DB} ) add_custom_command(OUTPUT ${DEV_CC_DB} - COMMAND bbasm ${DEV_CC_BBA_DB} ${DEV_CC_DB} + COMMAND bbasm ${BBASM_ENDIAN_FLAG} ${DEV_CC_BBA_DB} ${DEV_CC_DB} DEPENDS bbasm ${DEV_CC_BBA_DB} ) if (SERIALIZE_CHIPDB) @@ -84,7 +84,7 @@ if (NOT EXTERNAL_CHIPDB) DEPENDS ${DEV_CONSTIDS_INC} ${DEV_GFXH} ${DEV_TXT_DB} ${DB_PY} ${PREV_DEV_CC_BBA_DB} ) add_custom_command(OUTPUT ${DEV_CC_DB} - COMMAND bbasm --c ${DEV_CC_BBA_DB} ${DEV_CC_DB}.new + COMMAND bbasm --c ${BBASM_ENDIAN_FLAG} ${DEV_CC_BBA_DB} ${DEV_CC_DB}.new COMMAND mv ${DEV_CC_DB}.new ${DEV_CC_DB} DEPENDS bbasm ${DEV_CC_BBA_DB} ) -- cgit v1.2.3 From 2f9b04fd5642fcb1346b51d3a63367c09fc61486 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Sun, 15 Sep 2019 13:27:41 +0200 Subject: CMake: Generate chipdbs in build tree when building out-of-tree Signed-off-by: Marcus Comstedt --- ice40/family.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ice40') diff --git a/ice40/family.cmake b/ice40/family.cmake index 3679a72e..8b2c4385 100644 --- a/ice40/family.cmake +++ b/ice40/family.cmake @@ -12,7 +12,8 @@ if (NOT EXTERNAL_CHIPDB) set(ICEBOX_ROOT "/usr/local/share/icebox" CACHE STRING "icebox location root") file(MAKE_DIRECTORY ice40/chipdbs/) - add_library(ice40_chipdb OBJECT ice40/chipdbs/) + file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ice40/chipdbs/) + add_library(ice40_chipdb OBJECT ${CMAKE_CURRENT_BINARY_DIR}/ice40/chipdbs/) target_compile_definitions(ice40_chipdb PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family}) target_include_directories(ice40_chipdb PRIVATE ${family}/) @@ -36,7 +37,7 @@ if (NOT EXTERNAL_CHIPDB) endif() set(DEV_TXT_DB ${ICEBOX_ROOT}/chipdb-${dev}.txt) set(DEV_CC_BBA_DB ${CMAKE_CURRENT_SOURCE_DIR}/ice40/chipdbs/chipdb-${dev}.bba) - set(DEV_CC_DB ${CMAKE_CURRENT_SOURCE_DIR}/ice40/chipdbs/chipdb-${dev}.bin) + set(DEV_CC_DB ${CMAKE_CURRENT_BINARY_DIR}/ice40/chipdbs/chipdb-${dev}.bin) set(DEV_CONSTIDS_INC ${CMAKE_CURRENT_SOURCE_DIR}/ice40/constids.inc) set(DEV_GFXH ${CMAKE_CURRENT_SOURCE_DIR}/ice40/gfx.h) add_custom_command(OUTPUT ${DEV_CC_BBA_DB} @@ -75,7 +76,7 @@ if (NOT EXTERNAL_CHIPDB) endif() set(DEV_TXT_DB ${ICEBOX_ROOT}/chipdb-${dev}.txt) set(DEV_CC_BBA_DB ${CMAKE_CURRENT_SOURCE_DIR}/ice40/chipdbs/chipdb-${dev}.bba) - set(DEV_CC_DB ${CMAKE_CURRENT_SOURCE_DIR}/ice40/chipdbs/chipdb-${dev}.cc) + set(DEV_CC_DB ${CMAKE_CURRENT_BINARY_DIR}/ice40/chipdbs/chipdb-${dev}.cc) set(DEV_CONSTIDS_INC ${CMAKE_CURRENT_SOURCE_DIR}/ice40/constids.inc) set(DEV_GFXH ${CMAKE_CURRENT_SOURCE_DIR}/ice40/gfx.h) add_custom_command(OUTPUT ${DEV_CC_BBA_DB} -- cgit v1.2.3