upsilon/gateware/Makefile

38 lines
1.0 KiB
Makefile
Raw Normal View History

2023-06-15 12:24:35 -04:00
# Copyright 2023 (C) Peter McGoron
#
# This file is a part of Upsilon, a free and open source software project.
# For license terms, refer to the files in `doc/copying` in the Upsilon
# source distribution.
#
2023-04-06 19:28:12 -04:00
.PHONY: cpu clean rtl_codegen
2022-07-12 15:22:14 -04:00
DEVICETREE_GEN_DIR=.
2022-07-13 14:11:56 -04:00
all: build/digilent_arty/digilent_arty.bit arty.dtb mmio.py
2023-08-23 22:09:34 -04:00
mmio.py csr.json build/digilent_arty/digilent_arty.bit: soc.py
@# Litex Version Check (current version 2023.12)
@if ! pip show litex | awk '/Version:/ { split($$2, a, "\\."); if (a[1] < 2023 || a[2] < 12) exit(1)}'; then \
pip show litex; \
echo "You are using an old version of LiteX!"; \
echo "Update LiteX or remake your image."; \
exit 1; \
fi
@if [ ! -f config.py ]; then \
echo "No config file found! If you are just starting, do"; \
echo "$$ cp config.py.def config.py"; \
fi
cd rtl && make
python3 soc.py
2023-08-23 22:09:34 -04:00
2022-07-12 13:29:26 -04:00
clean:
2023-06-22 15:59:06 -04:00
rm -rf build csr.json arty.dts arty.dtb mmio.py
2023-05-30 16:01:32 -04:00
arty.dts: csr.json
2023-05-30 16:50:30 -04:00
litex_json2dts_linux csr.json > arty.dts
2023-08-23 22:09:34 -04:00
2023-05-30 16:01:32 -04:00
arty.dtb: arty.dts
dtc -O dtb -o arty.dtb arty.dts