I am using this programmer, it has worked perfectly for me. http://www.ebay.com/itm/STM32F4-DISCOVERY-USB-STM32F407VGT6-STM32-ARM-Cortex-M4-Development-Board-/161564201263?pt=LH_DefaultDomain_0&hash=item259dfa112f
This is how to wire it for uploading the firmware
Buy a premade jst 6 pin 2.0mm cable like this one http://www.ebay.com/itm/JST-2-0mm-PH-6-Pin-Connector-with-Wire-x-10-Sets-/171361716283?pt=LH_DefaultDomain_0&hash=item27e5f4483b
Cut the wiring so it is about 4" long, if it is too long there will be low voltage errors for some reason and it will not program the firmware.
Connect them like this(solder the wiring to the programmer then sheild the pins)
I have just ordered some much cheaper usb st-link v2's, if they work well I will post how to connect them also http://www.ebay.com/itm/ST-Link-V2-STM8-STM32-Emulator-Download-Programmer-Debugger-Unit-Metal-Shell-New-/281657212132?pt=LH_DefaultDomain_2&hash=item419413fce4
More info at vedders site http://vedder.se/2014/12/connecting-a-programmerdebugger-my-custom-stm32-pcbs/
This is how to wire it for uploading the firmware
Buy a premade jst 6 pin 2.0mm cable like this one http://www.ebay.com/itm/JST-2-0mm-PH-6-Pin-Connector-with-Wire-x-10-Sets-/171361716283?pt=LH_DefaultDomain_0&hash=item27e5f4483b
Cut the wiring so it is about 4" long, if it is too long there will be low voltage errors for some reason and it will not program the firmware.
Connect them like this(solder the wiring to the programmer then sheild the pins)
I have just ordered some much cheaper usb st-link v2's, if they work well I will post how to connect them also http://www.ebay.com/itm/ST-Link-V2-STM8-STM32-Emulator-Download-Programmer-Debugger-Unit-Metal-Shell-New-/281657212132?pt=LH_DefaultDomain_2&hash=item419413fce4
More info at vedders site http://vedder.se/2014/12/connecting-a-programmerdebugger-my-custom-stm32-pcbs/