update examples build system#186
Conversation
|
Ok for me. |
| OPENOCD = $(DOCKER) $(DOCKERARGS) --device /dev/bus/usb ghdl/synth:prog openocd | ||
|
|
||
| ICEPORG = # ? | ||
| ICETIME = # ? |
There was a problem hiding this comment.
Before merging, could someone check if iceprog and icetime exist in the docker image?
And if they do, how would they be included and would they need any flags like openocd does?
|
Overall, the proposal is correct and adequate. Thanks for the PR! There are at least two similar solutions which I am aware of (because I did implement them either partially or totally):
You can see that those solutions "split common.mk into multiple makefiles", as @playduck commented above. Hence, please let me have the weekend to have a better look at it and hopefully catch some simple envvar renames that can make this more consistent with those implementations. Eventually, we might download and reuse the makefiles in this repo (e.g. https://github.com/stnolting/neorv32-setups/blob/main/osflow/tools.mk), instead of duplicating them. Nevertheless, I will try to review this PR to have it merged ASAP, we don't want to overcomplicate it now, because it does look good enough already. |
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:
tools.mkfile to specify either local or docker toolscommon.mkfile which includes all targets for ICE and ECP5READMEto /examplesEvery 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:
icetimeandiceprogcan be accessed in the docker image. For now I've left their defintion intools.mkblankcommon.mkmay 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?