forked from f4pga/f4pga-arch-defs
-
Notifications
You must be signed in to change notification settings - Fork 2
/
boards.cmake
93 lines (79 loc) · 1.96 KB
/
boards.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
function(define_ice40_board)
set(options)
set(oneValueArgs BOARD DEVICE PACKAGE PROG_TOOL PROG_CMD)
set(multiValueArgs)
cmake_parse_arguments(
DEFINE_ICE40_BOARD
"${options}"
"${oneValueArgs}"
"${multiValueArgs}"
${ARGN}
)
define_board(
BOARD ${DEFINE_ICE40_BOARD_BOARD}
DEVICE ${DEFINE_ICE40_BOARD_DEVICE}
PACKAGE ${DEFINE_ICE40_BOARD_PACKAGE}
PROG_TOOL ${DEFINE_ICE40_BOARD_PROG_TOOL}
PROG_CMD ${DEFINE_ICE40_BOARD_PROG_PROG_CMD}
)
get_target_property_required(PACKAGE_PINMAP ${DEFINE_ICE40_BOARD_DEVICE} ${DEFINE_ICE40_BOARD_PACKAGE}_PINMAP)
set_target_properties(
${DEFINE_ICE40_BOARD_BOARD}
PROPERTIES
PINMAP ${PACKAGE_PINMAP}
)
endfunction()
# Lattice iCEstick
# http://www.latticesemi.com/icestick
# ---------------------------------------------
define_ice40_board(
BOARD icestick
DEVICE hx1k
PACKAGE tq144
)
# Lattice iCEblink40-LP1K Evaluation Kit
# **HX** version is different!
# ---------------------------------------------
define_ice40_board(
BOARD iceblink40-lp1k
DEVICE lp1k
PACKAGE qn84
)
if (NOT LIGHT_BUILD)
# iCE40-HX8K Breakout Board Evaluation Kit
# iCE40-HX8K-CT256
# ---------------------------------------------
define_ice40_board(
BOARD hx8k-b-evn
DEVICE hx8k
PACKAGE ct256
)
# DPControl icevision board
# iCE40UP5K-SG48
# ---------------------------------------------
define_ice40_board(
BOARD icevision
DEVICE up5k
PACKAGE sg48
)
get_target_property_required(TINYFPGAB env TINYFPGAB)
# TinyFPGA B2
# iCE40-LP8K-CM81
# ---------------------------------------------
define_ice40_board(
BOARD tinyfpga-b2
DEVICE lp8k
PACKAGE cm81
PROG_CMD "${TINYFPGAB} --program \${OUT_BIN}"
)
get_target_property_required(TINYPROG env TINYPROG)
# TinyFPGA BX
# iCE40-LP8K-CM81
# ---------------------------------------------
define_ice40_board(
BOARD tinyfpga-bx
DEVICE lp8k
PACKAGE cm81
PROG_CMD "${TINYPROG} -p \${OUT_BIN}"
)
endif (NOT LIGHT_BUILD)