]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - docs/newbs_flashing.md
[Keyboard] Snagpad Configurator bugfix and readme refactor (#6381)
[qmk_firmware.git] / docs / newbs_flashing.md
index 4cd7c5c44a1f311785ca8249cee68a97832fc4fa..fa0a5e2ba5b0c2293823e8f8113fa1eb1c5f5f0c 100644 (file)
@@ -12,17 +12,15 @@ However, the QMK Toolbox is only available for Windows and macOS currently.  If
 
 Begin by opening the QMK Toolbox application. You'll want to locate the firmware file in Finder or Explorer. Your keyboard firmware may be in one of two formats- `.hex` or `.bin`. QMK tries to copy the appropriate one for your keyboard into the root `qmk_firmware` directory.
 
-{% hint style='info' %}
-If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder.
+?> If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder.
 
-Windows:
+?> Windows:
 
     start .
 
-macOS:
+?> macOS:
 
     open .
-{% endhint %}
 
 The firmware file always follows this naming format:
 
@@ -88,7 +86,7 @@ If you know what bootloader that you're using, then when compiling the firmware,
 
 ### DFU
 
-For the DFU bootloader, when you're ready to compile and flash your firmware, open up your terminal window and run the built command: 
+For the DFU bootloader, when you're ready to compile and flash your firmware, open up your terminal window and run the build command: 
 
     make <my_keyboard>:<my_keymap>:dfu
 
@@ -129,13 +127,21 @@ Once it does this, you'll want to reset the controller.  It should then show out
 >>> dfu-programmer atmega32u4 reset
 ```
 
-If you have any issues with this, you may need to this: 
+?> If you have any issues with this - such as `dfu-programmer: no device present` - please see the [Frequently Asked Build Questions](faq_build.md).
+
+#### DFU commands
+
+There are a number of DFU commands that you can use to flash firmware to a DFU device:
+
+* `:dfu` - This is the normal option and waits until a DFU device is available, and then flashes the firmware. This will check every 5 seconds, to see if a DFU device has appeared.
+* `:dfu-ee` - This flashes an `eep` file instead of the normal hex.  This is uncommon. 
+* `:dfu-split-left` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._
+* `:dfu-split-right` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._
 
-    sudo make <my_keyboard>:<my_keymap>:dfu
 
 ### Caterina 
 
-For Arduino boards and their close (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the built command: 
+For Arduino boards and their clones (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: 
 
     make <my_keyboard>:<my_keymap>:avrdude
 
@@ -201,9 +207,17 @@ If you have any issues with this, you may need to this:
 
     sudo make <my_keyboard>:<my_keymap>:avrdude
 
+
+Additionally, if you want to flash multiple boards, use the following command:
+
+    make <keyboard>:<keymap>:avrdude-loop
+
+When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop.
+
+
 ## HalfKay
 
-For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the built command: 
+For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: 
 
     make <my_keyboard>:<my_keymap>:teensy
 
@@ -228,12 +242,61 @@ Waiting for Teensy device...
 
  ```
  Found HalfKay Bootloader
-Read "./.build/ergodox_ez_drashna.hex": 28532 bytes, 88.5% usage
+Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage
 Programming............................................................................................................................................................................
 ...................................................
 Booting
 ```
 
+## STM32 (ARM)
+
+For a majority of ARM boards (including the Proton C, Planck Rev 6, and Preonic Rev 3), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: 
+
+    make <my_keyboard>:<my_keymap>:dfu-util
+
+For example, if your keymap is named "xyverz" and you're building a keymap for the Planck Revision 6 keyboard, you'll use this command and then reboot the keyboard to the bootloader (before it finishes compiling):
+
+    make planck/rev6:xyverz:dfu-util
+
+Once the firmware finishes compiling, it will output something like this: 
+
+```
+Linking: .build/planck_rev6_xyverz.elf                                                             [OK]
+Creating binary load file for flashing: .build/planck_rev6_xyverz.bin                               [OK]
+Creating load file for flashing: .build/planck_rev6_xyverz.hex                                     [OK]
+
+Size after:
+   text    data     bss     dec     hex filename
+      0   41820       0   41820    a35c .build/planck_rev6_xyverz.hex
+
+Copying planck_rev6_xyverz.bin to qmk_firmware folder                                              [OK]
+dfu-util 0.9
+
+Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
+Copyright 2010-2016 Tormod Volden and Stefan Schmidt
+This program is Free Software and has ABSOLUTELY NO WARRANTY
+Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
+
+Invalid DFU suffix signature
+A valid DFU suffix will be required in a future dfu-util release!!!
+Opening DFU capable USB device...
+ID 0483:df11
+Run-time device DFU version 011a
+Claiming USB DFU Interface...
+Setting Alternate Setting #0 ...
+Determining device status: state = dfuERROR, status = 10
+dfuERROR, clearing status
+Determining device status: state = dfuIDLE, status = 0
+dfuIDLE, continuing
+DFU mode device DFU version 011a
+Device returned transfer size 2048
+DfuSe interface name: "Internal Flash  "
+Downloading to address = 0x08000000, size = 41824
+Download        [=========================] 100%        41824 bytes
+Download done.
+File downloaded successfully
+Transitioning to dfuMANIFEST state
+```
 
 ## Test It Out!