Close
0%
0%

Gazelle

Universal MCU-based programmer (today AVR, SPI, I2c flash, DS1990 keys), (STM32, CH32, NRF51/52, cc2640 later).

Similar projects worth following
STM32-based programmer for popular IC's, interface between PC old IC world. The project is unfinished, so here are the IC list with degree of readiness on them:
*SPI flash - tested on only one w25q64, TODO: copy full list of SPI flash from flashrom app.
*I2C flash - tested on only one m24c64, TODO: copy full list of I2C flash from flashrom app.
*DS1990 - key reader tested, writing of RW1990 works in half of the cases. TODO: find full command system of RW1990.
*AVR - tested for atmega8. TODO: add full list of AVRS (today mega8/328, tiny13 only).
*STM32 - flash page written successfully. TODO: add flash command to the interface, for all STM32s.
*NRF51 - flash access registers added. TODO: try to write flash using ADI from previous point, add to the interface.
*CH32V003 - functions for writing flash through 1 wire written, not tested. TODO: test, add to the interface.
*CC2640 - my dream to try them.

To use this programmator connect the STMF103 board and run the application in result folder

The almost all application is in toolbar.

  • connect button - try target. For atmega it is register read and connect command.
  • erase - full erase of target. For flash write erase before write runs automatically.
  • read - read flash or eeprom or re-read fuse bits (reads the dump for current tab).
  • write - write and verify flash or eeprom from the opened file.
  • open hex - open file to write. For every tab there are separate files. So, if you change the tab, open file again.
  • save as - saves current readen data by read button to binary file.
  • family choice - choosing the type of IC, today atmega only.
  • chip choice - list to choose the IC from current family.
  • speed choice - connect to the target interface speed in kHz.
  • progress bar - read/write current percentage.

On the center here are usually the current dump. Or fuse bits for atmega. In the bottom left corner the status bar with status message. If operation or connect to the programmator device is success you can detect it by statusbar message.

Hardware usage:

For hardware, you need any board on stm32f103, then you can flash gazelle_fw file with flasher firmware to you board from the same result folder. For AVR pinout is: PA3-RST, PA5-SCK, PA6-MISO, PA7-MOSI. Connect target to STM and STM to PC through USB, run the app on PC, wait for "portName" connected message on stBar. 

  • 1 × STM32F103

  • AVR programmer is working!

    Mikhail Belkin02/10/2026 at 09:07 0 comments

    Separate tabs for flash dump, eeprom dump and fuse bits. ISP interface speed set in kHz availability. Programmator auto detect function, if programmator not found, just re run the app.

    As I mentioned, my refactored app made it easier to add new IC's to the interface. It is based on three basic classes and four secondary plus widgets. Every IC overloads for itself classes:

    • icWorker class - contains read/write/verify (rwv) functions, running in separate thread. This is for the interface continues working while programmator is wrting.
    • icFlasher class - this opject in my app is IC itself. This launches rwv functions from icWorker class in separate thread, while itself is remains in the main thread. Qt Qthread and signal-slots mechanic is used or this.
    • gazelleIcWidget - every IC have it own fulfillment of main application screen. While the toolBar with read/write/open file buttons and status bar are common for all IC's.

    To not dump all the code into a common heap, some functions are in addictive classes:

    • usbFunction - leads the all connectivity with USB programmator to call() and return() functions. Using them (usb function call and return) you can run any function on your usb device from your PC app. 
    • gazelleUsbCom - finds and connects to the USB programmator. For this it uses the password phrase check. Also disconnects in destructor. So, this is usb com port handler class.
    • gaselleErrorsMsg - read write success and fail messages. For programmator status messages are very important. Because you do not know what happens after pushing write button. Every rwv function returns the error code or 0 if success. In order to not chek the error code and not to write the success message in every rvw function, the errorMsg functions do it instead. The name of operation is class function name, the error is parameter, returns string with success or fail message.
    • gazelleInterfaceSpeed - fills the QComboBox interface speed choosing list.

    Also there is a dumpViewer widget, which views the binary file in hex format. 

    As for Atmel AVR there was some additional classes. They are:

    • atmelList - class with all information for every atmega. There are signature bytes, flash/eeprom page and total sizes, also names of every fuse bit. As for fuse bits, they are the same on all AVR's, but the bit locations are differs. So, I add an constant (static constexpr) strings for every fuse bit name, and set the pointers to this bit names for every atmega fuse byte bit. While the class returns not the pointer list, the string list instead.
    • avrFuse - the widget with avr fuse bit. Have a separate checkbox for every bit and field for setting byte from the keyboard. The invertive nature of the fuse bits is taken into account. A byte is in the same format as it is in the microcontroller, while checkoxes (separate bits) are inverted (1 is unset, 0 is set).

  • Creation workflow

    Mikhail Belkin01/29/2026 at 13:36 0 comments

    At first i written a programmator for two flash IC's in order to switch off cartridge control function on the printer. As a way for connecting device with PC I choose the virtual COM port through USB instead of just libusb. Because we do not need a driver installation even on windows in this case. At the same time, there is no so much difference between transmitting data throught the USB bulk endpoint in USB-COM abstracion and without it. Another advantage of the first attempt was HEX viewer, which was able to open large files.

    Later I learned an ARM SWD interface and ADI debug module by ARM official pdf's for a long time. At the end I was able to access to the registers of my STM32. And I was so much glad to write the flash page and read signature register through my register access functions. And i dropped the project at this point.

    Then I was need a key in order to get home. In the case of key, there was a datasheet for original key, which helped to write key reader. But for writing still there isn't any documentation. Because keys for Russian home entrance doors made by Chinese nonames for left-handed resellers. So, you can buy rewritable version of DS1990 key, but there isn't any information about its protocol. I copied three versions of protocol from the github, some of they are works in the half of cases.

    Subsequently I was sad, that BlackMagick project made the universal programmator first.

    This strengthened my idea of increasing the quantity of types of supported IC's. I read about way of flashing NRF51 and filled the appropriate registers. And written the support of unique parody of STM8 SWIM interface, used in CH32V003 RISCV chinese microcontrollers. All of this except the key and two flash IC's is still waiting for adding to the PC interface, written in QT.

    Today I need to upload a firmware into my transistortester clone. So, I added the Atmega support. At hat moment the interface is refactored for easier addition of new IC's. 

    And at programmator side I came up with the usbfunction library. This library help to just simply call the functon on the microcontroller through the USB on the interface side. This function also increase the speed of adding of new types of microcontrollers.

    For today, I need to try and debug my Atmega module of programmer. Then I have to finish the full AVR list. 

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates