openXC7 / xc7k325t-blinky-nextpnr

BSD 3-Clause "New" or "Revised" License
42 stars 9 forks source link

Multi-project support in same or separate repo? #21

Open jrrk2 opened 2 years ago

jrrk2 commented 2 years ago

xc7k325-blinky-nextpnr only supports one project at the moment. Opened a new branch: project_select in git@github.com:jrrk2/xc7k325t-blinky-nextpnr.git to allow picosoc to be built using the same Makefile. This invalidates the name of the project, so this is just a placeholder to discuss what should be done to make it scalable.

This new project builds fine and flashes on an Apple OSX M1 machine.

unbtorsten commented 2 years ago

I suggest waiting for @rwhitby to finish refactoring the make procedure, cf. #18. Either way, it may be reasonable to create a separate repo for the picosoc process (and other designs in the future)?

rwhitby commented 2 years ago

https://github.com/rwhitby/xc7k325t-blinky-nextpnr/pull/1 has files distinguished by ${PROJECT_NAME} and ${BOARD}, so multiple projects in the same directory should be possible. Whether or not that is a good idea is a separate question :-)

unbtorsten commented 2 years ago

Looks good. :) At minimum, this makes the Makefile flexible enough to be used for other projects. Can you change its first line from

PROJECT_NAME = blinky

to

PROJECT_NAME ?= blinky

That way, the project name can be set when calling make.

jrrk2 commented 2 years ago

OK done, but I think command line variable overrides take priority over =, = takes priority over the environment, and environment takes priority over ?=

rwhitby commented 2 years ago

Looks good. :) At minimum, this makes the Makefile flexible enough to be used for other projects. Can you change its first line from

PROJECT_NAME = blinky

to

PROJECT_NAME ?= blinky

That way, the project name can be set when calling make.

Done

rwhitby commented 1 year ago

See https://github.com/kintex-chatter/xc7k325t-blinky-nextpnr/pull/33 for how this can be done in the same repo.