Stm32 Dfu Driver For Mac

  

Description Compatible with the x86 and x64 platforms The STSW-STM32102 software package contains four installation files based on the various versions of the Microsoft ® operating system. OS versions prior to Windows ® 7 are compatible with the Windows ® 7 installations included in the package. Starting from Windows ® 10, the STSW-STM32102 driver is no more adequate and the usage of the.

  1. Stm32 Dfu Driver For Mac Os
  2. Stm32 Dfu Driver For Macbook Pro
  3. Stm32 Dfu Driver For Mac
  4. Stm32 Dfu Driver Macos
  5. Stm32 Dfu Driver For Mac Download
  6. Stm32 Dfu Driver For Mac Free

Flashing - why?#

  • If you are not familiar with DFU, I suggest that you can use ST LINK V2. However, the important point is whether, or not you put output terminals for SW pins (SWDIO, NRST, SWCLK, SWO). For the DFU, you should check Bootloader properties and bootloader configurations specifcally related to your uC.
  • Dfu-util (with USB): Note: This way is only supply STM32F105xx/107xx devices. An external clock (8 MHz, 14.7456 MHz or 25 MHz.) is required for DFU and CAN bootloader execution after the selection phase.

You can flash the microcontrollers (ATmega32u4, Pro Micro, Elite-C, etc) in your kit prior to building your keyboard to ensure that they are undamaged and functioning normally.

This might be a good practice to be sure you're starting out with gear that will perform as desired. While there are multiple methods of flashing, this guide with only address the usage of QMK Toolbox to perform flashing.

Determining Bootloader#

Before flashing, you'll need to know what bootloader is present on the microcontroller that's on your PCB. A bootloader is a program on the microcontroller that allows firmware to be uploaded to the microcontroller via USB. It's important to know what bootloader is present on your board, as the flashing procedure varies based on what you have.

Here's the different possible bootloaders in use for Keebio boards:

  • ATmega32u4 DFU Bootloader (most common)
    • This bootloader is the one present on most Keebio PCBs that already have a microcontroller pre-soldered onto it
    • Also present on Elite-C
  • STM32 DFU Bootloader
    • This bootloader is on STM32-based keyboards
    • Currently, STM32 is used on the following Keebio PCBs:
      • DSP40 Rev. 1
      • BDN9 Rev. 2
    • Also present on the Proton C
  • Caterina Bootloader
    • Found on Arduino Pro Micro controllers, so if you've built a board with a Pro Micro, you have the Caterina Bootloader

Flashing Options#

Using QMK Toolbox#

QMK Toolbox contains various flashing tools into one app, and has been designed to make the flashing process easier.

Make sure you download the latest release here. For this guide, make sure you have Version 0.0.21 or higher installed, as the most recent versions have better device detection methods for more reliable flashing.

Using QMK Environment#

One way to flash is using the command-line via a QMK environment setup. Here's a couple of links on how to do that from the QMK documentation:

Setting up the QMK build environment is beyond the scope of this guide, so if you need assistance with that, consult the QMK Introductory Tutorial and/or join the QMK Discord Server.

Flashing ATmega32u4 (DFU Bootloader)#

One-time Setup (Windows only)#

This section only applies to Windows, skip this if you are on a Mac, as there are no drivers needed for Mac.

If you open up QMK Toolbox, press the reset button on your ATmega32u4-based board, and see (NO DRIVER) on the line for Atmel DFU device connected, then you'll need to install the bootloader driver on Windows.

To install the DFU Bootloader driver, right-click anywhere in the top part of the QMK Toolbox window as shown below and click on Install Drivers.... The ATmega32u4 DFU Bootloader driver along with other bootloader drivers will be installed.

If you are having issues with driver installation, see Driver Installation with Zadig.

Flashing#

If you're on Windows or Mac, you can follow the procedure below.

For QMK#

  • Open up the QMK Toolbox application
    • Plug in your PCB
  • Open the file you downloaded.
  • For most Keebio items, the MCU field will be pre-filled with ATmega32u4.
  • With your keyboard connected to the computer hold the reset button for a second and then let go.
    • You should see a line in yellow that tells you it is connected.
  • Now that your keymap file is loaded and your PCB is connected, click Flash
  • After flashing, your PCB will disconnect and it will exit bootloader
    • This will give you another yellow line.

Mac#

Windows#

Flashing the Pro Micro (Caterina Bootloader)#

  • Download QMK Toolbox
  • Open QMK Toolbox
    • Make sure you are using QMK Toolbox version 0.0.21 or higher.
  • Open your firmware file you want in your Pro Micro
  • Plug in your Pro Micro
    • QMK will detect it but ignore that. But, if it does not, you need to verify you are on version 0.0.21.
  • Checkmark Auto-Flash
  • Double-tap the RST and GND pins with tweezers/paperclip or reset button
  • You'll know it's finished and functioning keyboard if you have seen the second yellow line indicating that the bootloader device has disconnected.
  • Small caution: If you receive the line butterfly_recv(): programmer is not responding you need to make sure that you reset your Pro Micro by double-tapping

STM32 Chip#

One-time Setup (Windows only)#

This section only applies to Windows, skip this if you are on a Mac, as there are no drivers needed for Mac.

If you open up QMK Toolbox, press the reset button on your STM32-based board, and see (NO DRIVER) as shown below, then you'll need to install the bootloader driver on Windows.

To install the STM32 Bootloader driver, right-click anywhere in the top part of the QMK Toolbox window as shown below and click on Install Drivers.... The STM32 Bootloader driver along with other bootloader drivers will be installed.

If you are having issues with driver installation, see Driver Installation with Zadig.

Flashing#

  • Open up the .bin file for your board
  • Ignore the MCU (AVR only) box
  • Hold the reset button for one second and let go
  • You should now see the yellow connected line
  • Add/open your firmware file for your device
  • Click Flash
  • You'll see many lines in gray, but then the second yellow line that has the word disconnected will confirm that your keyboard is now functioning.

Mac#

Windows#

In this tutorial, I will show you how to upload a USB Bootloader on the STM32F103C8T6 Blue Pill board. Using the STM32F103C8T6 USB Bootloader, you can easily program the Blue Pill Board just by using the on-board USB port without needing any external hardware.

Important Note: I highly recommend you to go through the “GETTING STARTED WITH STM32F103C8T6” tutorial before proceeding further as there are a lot of configurations, settings, connections and explanation that are very important.

Introduction

One thing that makes the Arduino UNO (or any Arduino board for that matter) special is its ease of programming. Just plug-in the Arduino to your PC and upload the program using Arduino IDE. It is that simple (provided you have the right drivers and selected the right USB Port).

The same cannot be said for the STM32F103C8T6 Blue Pill Board. If you remember in the “Getting Started with STM32F103C8T6” tutorial, I have shown you how to upload the program to a Generic STM32F103C8T6 board using an external USB to Serial Adapter.

It is not that a difficult process to upload the program using the FTDI Adapter, but every time you want to upload a program, you have switch to the Programming Mode and for normal operation, you have to switch back to Operating Mode (toggling the BOOT0 pins between HIGH and LOW).

It would be simpler if we can just make use of the on-board microUSB port on the Blue Pill board to upload the program. The STM32F103C8T6 USB Bootloader provides such solution, where you can simply plug-in the Blue Pill to your PC via the USB Port and upload the program. As an added benefit, you don’t have to fiddle with BOOT pins as you can leave it in the Operating Mode.

Components Required

  • STM32F103C8T6 Blue Pill Board
  • USB to Serial Converter (like FTDI Programmer)
  • Connecting Wires
  • 1.8KΩ Resistor (Optional)
  • PC

Circuit Diagram

The connections between the STM32 Blue Pill and USB to Serial converter are similar to what I described in the Getting Started Guide. The following is the reference image for the connections.

Uploading STM32F103C8T6 USB Bootloader

Stm32 Dfu Driver For Mac Os

In order to upload the program via the USB Port on the Blue Pill, you need to have a USB Bootloader installed on the MCU. Thanks to the contributions of LeafLabs (Maple Bootloader) and rogerclarkmelbourne, a repo of bootloaders is available for a series of boards. The source code available in GitHub at this link.

To make things easier, the repo consists of downloadable binary files of the bootloaders (I will explain more about this in later sections).

Making the Connections

Stm32 Dfu Driver For Macbook Pro

The first step is to connect the STM32 Blue Pill board to the USB to Serial Adapter as shown in the image above. Also, the BOOT0 pins made HIGH i.e. the board is put in Programming Mode.

Once this is done, you can connect the USB to Serial Converter to the PC and check for the COM Port.

Download the Bootloader Binary

Stm32 Dfu Driver For Mac

As mentioned earlier, this repository consists of different binary files for different types of STM32 Boards. All these binary files are categorized based on the USER LED Connection. For example, we know that the User LED on your Blue Pill is connected to pin 13 of Port C i.e. PC13.

Hence, the binary is appropriately named “generic_boot20_pc13.bin”. For all generic Blue Pill STM32F103C8T6 based boards, you can use this binary file. You can download the binary from this GitHub link.

If you have a different / custom board. Then download appropriate binary file from the list of binaries provided in the GitHub repository.

Upload USB Bootloader Binary to STM32

Once the hardware connections are made and you have downloaded the necessary binary file, then you are ready to upload the STM32F103C8T6 USB Bootloader to the MCU. For this you can make use of the STM32CubeProgrammer.

If you remember in the “Getting Started with STM32F103C8T6” guide, I have downloaded the STM32CubeProgrammer Software from the STMicroelectronics’ official website. If you have followed that tutorial, then you already have downloaded that software, which in my case, can be found at the location “C:Program FilesSTMicroelectronicsSTM32CubeSTM32CubeProgrammerbin”. Go to a similar location in your PC and open the “STM32CubeProgrammer.exe” file.

On the right side of the page, select “UART” as the communication mode and select the appropriate COM Port. In my case it is COM4. Leave every thing else to the default settings and click on connect.

Once the connection is successful, the software will read the contents of flash and display the same. Next, click on the symbol that shows a downloading arrow. This will open the “Erasing & Programming” option.

Click on browse and locate the previously downloaded binary file i.e. generic_boot20_pc13.bin file. The start address will be automatically populated with “0x08000000”. If not, enter this value. Finally, click on “Start Programming” option. The software will start uploading the USB Bootloader to Flash of the MCU and you can see the log below.

Once the binary is uploaded, a message saying “File download complete” will pop-up. Click on OK and finally click on disconnect on the top right corner. This completes uploading STM32F103C8T6 USB Bootloader to the Flash of the MCU. At this point, you can disconnect the USB to Serial Adapter from the Blue Pill Board and also toggle back the BOOT0 pin to LOW i.e. Operating Mode as you don’t need that.

Using ST Flash Loader Tool to Upload USB Bootloader

Instead of using the STM32CubeProgrammer software, you can use an alternative tool called the ST Flash Loader. This is also officially provided by STMicroelectronics and you can download it from this link.

Stm32 Dfu Driver For Mac

Driver

You have to login with ST’s website to download the tool and once you have finished downloading, extract the contents of the zip file and double click on “flash_loader_demo_v2.8.0.exe” file. This will install the Flash Loader Tool.

After installing the tool, open it from this location “C:Program Files (x86)STMicroelectronicsSoftwareFlash Loader Demo” by double clicking on “STMFlashLoader Demo.exe” file.

Before proceeding further, make sure that the STM32 Blue Pill Board is connected to the USB to Serial Programmer through USART connections and the BOOT0 pin is made HIGH.

If you have already connected your USB to Serial Adapter to your PC, then select the correct COM Port from the drop-down list and click on next. If every thing goes well, you will get a message saying “Target is readable. Please click “next” to proceed”. Click on next.

In the next page, the target related information is displayed. Click on next.

In the next page, select the option “Download to Device” and select the downloaded binary file. After that, the start address will be automatically populated as 8000000.

When you click next, the tool will start uploading the USB Bootloader Binary to the MCU.

If every thing goes well, then you get a message “Download operation finished successfully”. You can close the tool.

Make sure that the BOOT0 pin made LOW and disconnect the USB to USART Converter from STM32 Board.

Stm32 Dfu Driver For Mac

Programming STM32F103C8T6 from USB Port

Installing Necessary Drivers

Before proceeding further, you need to download some drivers. First, download the STM32 related tool for Arduino from this link. Click on Clone or download and click on Download ZIP. Extract the contents and rename the folder as “Arduino_STM32”. Copy this folder and paste it in “C:UsersTrailBlazerDocumentsArduinohardware” directory.

NOTE: In the above path, “TrailBlazer” is my username. Replace it with yours. If the directory Arduinohardware is not present, then create one.

Open command prompt with admin rights and navigate to the directory “C:UsersTrailBlazerDocumentsArduinohardwareArduino_STM32driverswin”. Run the “install_drivers.bat” file first. This will install the Maple DFU Driver and Maple Serial Driver.

Also, run the “install_STM_COM_drivers.bat” file to install the STM Serial Driver.

Stm32 Dfu Driver Macos

Configuring Arduino IDE

Stm32 Dfu Driver For Mac Download

If your Arduino IDE is already open, close it, connect the STM32 Blue Pill to the PC through a microUSB cable and restart the IDE. In the Arduino IDE, go to Tools and make the necessary changes to the board selector as mentioned in the “Getting Started to STM32F103C8T6” guide.

But you need to change the Upload Method option to “Maple DFU Bootloader 2.0”. The rest of the settings will remain the same.

Uploading the Program

As a sample program, write a simple Blinky Sketch for STM32F103C8T6 Blue Pill Board. Make sure that the LED is selected as PC13 and click on upload. The program will be uploaded through the USB port of the STM32 Board.

Conclusion

A step-by-step tutorial on uploading USB Bootloader for STM32F103C8T6 Blue Pill Board and programming it using the on-board microUSB port is demonstrated here.

Stm32 Dfu Driver For Mac Free

Related Posts: