qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.28k stars 39.38k forks source link

Makefile support arguments to specify device #787

Closed rpbaltazar closed 6 years ago

rpbaltazar commented 8 years ago

Recently trying to flash my ergodox infinity, I ran into a problem with this step:

sudo make infinity-keymapname-dfu-util from the instructions

This was caused by dfu-util finding multiple devices and not knowing which one to install to. I've walked around the problem by installing it manually as described here

  1. build
  2. go to build folder
  3. run the dfu-util with the params to specify the device.

It would be a nice to have a way to pass these arguments to the makefile.

fredizzimo commented 8 years ago

I dont think its possible to do in a general way. We could possibly support a known subset of options, like specifying the device, but supporting arbitrary command line arguments is not possible, because make would try to parse them. So it would have to be implemented differently for each type of flashing command that we support.

Make doesn't even support variables containing strings with spaces from within makefiles, so thats not an option either.

drashna commented 6 years ago

I believe that better handling was added to this, but I'm not sure.

However, for now, I'm closing this. If it's still an issue, please reopen.