Chip Bootloader and Downloader

Meanwhile I programmed various chip programmers and boot loaders. Here is a list of that.

PonyProg 2015

A PonyProg2000 source code, forked(?) for some improvements esp. for Windows platform.

This stalled project shows how to route wires to the chip, as Fritzing did similar much later. It can program PIC, AVR, serial EEPROMs and should program all. Using plugins it can use real chip programmers such as GALEP-III.

MSP430F5xx downloader

Easy to use command-line firmware downloader for TI MSP430F55xx microcontrollers, via USB.

As a replacement for the hard-to-use Texas Instruments loader, I wrote a smaller one that accepts .HEX files, preferrable over the strange TI TXT files.
2024: It loads ELF files too, has alternative German output, and is available as 64 bit executeable.

AVR downloader

For ElmChans parallel port + parallel high-voltage AVR programmer, I rewrote his avrpp.exe with many nice features. Enhancements:

AVR ATmega32U4 USB bootloader + downloader

There is ubaboot with only 512 byte size. That replaces the original 4 KByte boot loader. I squeezed the boot loader from a Github assembly source to deliver helpful string descriptors. Moreover, I decided to keep on USB VID+PID from Atmel as they use the same driver architecture relying on „good old“ libusb0.sys + libusb0.dll. No USB class is actually used to fit into the 512 byte (256 instructions) space; USB classes (as HID which wouldn't need user-supplied drivers on Windows) need more space for the firmware. Written in Gnu Assembler (gcc) using its local label feature.

See there for more information and download. That downloader supports ELF files at input but doesn't handle EEPROM download.

PIC16F145x USB bootloader + downloader

This 14-bit PIC controller with built-in crystal-less full-speed USB device support is well prepared for a 512x14 bit boot loader but not preprogrammed. This space is sufficient to implement a CDC based USB boot loader with some features (let's call it test monitor) that enables control of all pins and all other peripherals without actually writing and downloading firmware. Space for these features are achived by further squeezing a Github assembly source. This way, 7,5 Ki × 14 bit Flash space remains for the application. Moreover, the application can reuse USB routines of the bootloader in case it relies on CDC too. Written in gpasm having basic bank-check.

See there for more information and download. That downloader supports ELF files at input. It doesn't handle EEPROM download as there is no EEPROM but so-called 256 Byte High-Endurance-Flash (HEF) at the end of Flash space. (That area can be read as any other Flash space, e.g. at address 0xFF00 .. 0xFFFF. Only the lower 8 bits are accessible and of high-endurance.) The downloader also fully supports the test monitor of the boot loader with symbolic and bit-wise register access.

STM32F USB bootloader + downloader

2 KByte HID bootloader for STM32F103C8T6 (BluePill) and downloaders for Windows: Improved stm32flash.exe and hid-flash.exe with roughly 1/4 of original file size, available in 32 and 64 bit. hid-flash does not need a serial port anymore. Firmware and example written using arm-gcc in C++, some inline assembly, and a small linker script.

Downloads:

See there where I use it (i.e. the reason why I rewrote all the stuff from Github source).

The big CMSIS header files (Σ 780 KByte) remain. However, only the needed files are included in the archives.

All (my) source files are changed to C++ for easier maintenance.

How to use?

GALEP-III and GALEP-IV driver

No new programmer software but a signed(!) driver for Win64. So users can run their expensive programmer on newest computers with Windows 10/64. Moreover, a full schematic of GALEP-III allows for developing programmer software for including newer chips to program.

See there for more information and download.

RAM/EPROM simulator PEPS-III downloader

This chip simulator avoids chip UV erasing and re-flashing in a (nowadays old-style) target system with external EPROM. I rewrote its accessing downloader for Win32 and Linux, and made a full schematic.

See there for more information and download.

ESP8266, ESP32, and ESP32xx downloader

Developing with either Arduino or Espressif-SDK can be a nightmare of spending time in compiling (5 minutes) and flashing (3 minutes). Moreover, it requires deep knowledge in C++, Python, cmake, and ninja.

That Unofficial SDK compiles quite fast and is Makefile-based. But the esptool (flashing utility) lacks on various Python dependencies and doesn't work with ESP32.

So I decided to rewrite the esptool in C++. At first for Windows, later maybe for Linux. Command-line compatibility is not the most important thing. Easy use is more important! Some features:

Current software

Reset at ESP32CAM

Problem: One of some bought ESP32CAM was able to bring into boot mode by USB-Serial adapter. AFAIK impossible because RESET is not available on pin headers, or is there a backdoor? Possibly using long Break condition?

Two slightly different ESP32CAM

Solution: RESET is available on pin headers for newer ESP32CAM! One former GND pin is now changeable to RESET by solder jumper (0 Ω resistor SMD 0603 size), and defaults to RESET at shipping. GPIO0 (apply L to enter boot mode while RESET gets the L/H edge) was and is always available at pin headers.