ghdl-yosys-plugin
ghdl-yosys-plugin copied to clipboard
update examples build system
This PR aims to improve the makefiles of the example projects. The goal is to make the examples easier to understand, use and maintain.
Changes:
- Created a
tools.mk
file to specify either local or docker tools - Created a
common.mk
file which includes all targets for ICE and ECP5 - Gave all examples makefiles which include the aforementioned files
- Added a
README
to /examples
Every project has it's own makefile.
There it can define its own properties (which source files, what package, etc.) and it implements its own targets if required.
The common makefile includes all different targets to call yosys, nextpnr and others.
The source of the tools can either be the local tools (default behaviour) or the docker tools by specifying make USE=DOCKER=1
.
Adding a new example can usually rely on the common.mk makefile.
All projects successfully generate a bitstream.
Current Issues:
- As I don't have the hardware I couldn't test any generated bitstream
- Docker is untested (Docker image is only available as arm64, i'm on aarch64)
- I don't know where or if
icetime
andiceprog
can be accessed in the docker image. For now I've left their defintion intools.mk
blank -
common.mk
may be overwhelming to new users making the build process seem more complicated. Perhaps splitting these up into a makefile for Ice and one for ecp5?