cmake: Add HX1K-only builds support
Signed-off-by: David Shah <davey1576@gmail.com>
This commit is contained in:
parent
c3e0252703
commit
024ff8fa7d
@ -21,6 +21,7 @@ Building
|
|||||||
|
|
||||||
- Use CMake to generate the Makefiles (only needs to be done when `CMakeLists.txt` changes)
|
- Use CMake to generate the Makefiles (only needs to be done when `CMakeLists.txt` changes)
|
||||||
- For a debug build, run `cmake -DCMAKE_BUILD_TYPE=Debug .`
|
- For a debug build, run `cmake -DCMAKE_BUILD_TYPE=Debug .`
|
||||||
|
- For a debug build with HX1K support only, run ` cmake -DCMAKE_BUILD_TYPE=Debug -DICE40_HX1K_ONLY=1 .`
|
||||||
- For a release build, run `cmake .`
|
- For a release build, run `cmake .`
|
||||||
- Use Make to run the build itself
|
- Use Make to run the build itself
|
||||||
- For all targets, just run `make`
|
- For all targets, just run `make`
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
|
if(ICE40_HX1K_ONLY)
|
||||||
|
set(devices 1k)
|
||||||
|
foreach (target ${family_targets})
|
||||||
|
target_compile_definitions(${target} PRIVATE ICE40_HX1K_ONLY=1)
|
||||||
|
endforeach (target)
|
||||||
|
else()
|
||||||
set(devices 384 1k 5k 8k)
|
set(devices 384 1k 5k 8k)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(DB_PY ${CMAKE_CURRENT_SOURCE_DIR}/ice40/chipdb.py)
|
set(DB_PY ${CMAKE_CURRENT_SOURCE_DIR}/ice40/chipdb.py)
|
||||||
file(MAKE_DIRECTORY ice40/chipdbs/)
|
file(MAKE_DIRECTORY ice40/chipdbs/)
|
||||||
add_library(ice40_chipdb OBJECT ice40/chipdbs/)
|
add_library(ice40_chipdb OBJECT ice40/chipdbs/)
|
||||||
|
Loading…
Reference in New Issue
Block a user