Skip to content

Commit d2d7bb5

Browse files
djmdjmvk2seb
andauthored
Makefile and pin definitions for Icesugar (#64)
Icesugar is another cheap iCE40UP5K-SG48 board like Icebreaker, but with a slightly different pinout. It also loads bitstreams via a USB mass-storage interface rather than using iceprog. https://github.com/wuxx/icesugar has more details on the board. Co-authored-by: Seb Holzapfel <[email protected]>
1 parent b4de8c5 commit d2d7bb5

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

gateware/boards/icesugar/Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
PROJ = top
2+
3+
DEVICE = up5k
4+
PACKAGE = sg48
5+
PIN_DEF = ./boards/icesugar/pinmap.pcf
6+
# UART: 1Mbaud
7+
ADD_DEFINES = -DSELECTED_DSP_CORE=$(CORE) -DINVERT_BUTTON=1 -DDEBUG_UART_CLKDIV=12
8+
9+
# IceSugar devices load firmware via an exposed USB Mass Storage device.
10+
# Assume the OS has mounted it here.
11+
ICELINK_DIRECTORY=/media/$(USER)/iCELink
12+
13+
include ./mk/common.mk
14+
include ./mk/ice40.mk
15+
16+
ADD_SRC = boards/icebreaker/sysmgr.v \
17+
$(SRC_COMMON)
18+
19+
prog: $(BUILD)/$(PROJ).bin
20+
@if [ ! -d $(ICELINK_DIRECTORY) ] ; then \
21+
echo "Can't find iCELink storage device" 1>&2 ; \
22+
exit 1 ; \
23+
fi ; \
24+
if ! cp $(BUILD)/$(PROJ).bin $(ICELINK_DIRECTORY) ; then \
25+
echo "failed to install bitstream" 1>&2 ; \
26+
exit 1 ; \
27+
fi ; \
28+
echo "Bitstream installed to $(ICELINK_DIRECTORY)" 1>&2
29+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# 12 MHz clock
2+
set_io -nowarn CLK 35
3+
set_frequency CLK 12
4+
5+
# UART should be attached though the iCELink STM32 processor, showing up
6+
# as /dev/ttyACM* on Linux. Otherwise it's on PMOD1 pin 2.
7+
set_io -nowarn UART_TX 6
8+
9+
# There's no momentary button hooked up to a pin on the IceSugar (the one
10+
# tactile switch drops SPI_VCCIO1 as a hard reset), so hook the soft reset
11+
# signal up to one of the onboard switches (S1/1, active low). It's not
12+
# useful, but it satisfies the design.
13+
set_io -nowarn RESET_BUTTON 18
14+
15+
# PMOD 2, assuming horizontal flip (ribbon cable between eurorack-pmod
16+
# and PMOD connector IS in place).
17+
set_io -nowarn PMOD_SDIN1 46 # P2_1
18+
set_io -nowarn PMOD_SDOUT1 44 # P2_2
19+
set_io -nowarn PMOD_LRCK 42 # P2_3
20+
set_io -nowarn PMOD_BICK 37 # P2_4
21+
set_io -nowarn PMOD_MCLK 36 # P2_9
22+
set_io -nowarn PMOD_PDN 38 # P2_10
23+
set_io -nowarn PMOD_I2C_SDA 43 # P2_11
24+
set_io -nowarn PMOD_I2C_SCL 45 # P2_12

0 commit comments

Comments
 (0)