Closed fredizzimo closed 8 years ago
I'm a fan of that! I'm working on the avrdude programming one right now, too.
The blanket one could be make pgm
, and something like PROGRAMMER = dfu
in the Makefile. It would have the same overriding capabilities (from command line and subprojects) via something like make pgm=dfu
.
Renaming program
to avrdude
makes sense, I think
You can even have all of these, as is, no PROGRAMMER
needed, and have a pgm
target depend on the appropriate program target. So the ErgoDox EZ Makefile
would have something like this:
pgm: teensy
And then have a .PHONY: pgm
in the main makefile, for good measures.
Pros: minimal changes, and allows the real target to be as complex as need be. Cons: all keyboard makefiles need to be modified (but that's the case anyway)
The suggestion @algernon, proposed is close to what I had in mind. That would allow you to write make pgm for the keyboard default programmer, and make dfu-util for example if you want to override the programmer.
All keyboards would not necessarily have to be modified, but in that case they would just not support the pgm target, you would have to use the specific one instead.
That's perfect! I'm not sure why I suggested the make pgm=dfu
- it's obvious to just keep the make dfu
functionality :)
Mmmmm.. why was this closed? AFAIK, it's not done yet, or is it?
Currently you have to run different make commands for different keyboards, in order to upload the firmware.
I think we have at least the following
All of these are of course needed, but we could have the keyboard makefile specify which one to use, and have a single command to be run for all of them. We could even leave the original commands in place and add a new one for that common command.