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

I found ubaboot on Github with only 512 byte size. It replaces the original 4 KByte Atmel boot loader or the 2 KByte Caterina boot loader on Arduino boards. I further squeezed that Github source to make room for 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 and simply would not fit. Written in Gnu Assembler (gcc) using its local label feature. Suitable for at90usb82, at90usb162, atmega8u2, atmega16u2, atmega32u2, atmega16u4, atmega32u4.

To install ubaboot, i.e. to overwrite any boot loader, you need an ISP programmer once. Most boards have a 6-pin header for doing this.

Moreover, I rewrote the Python download tool to a true Windows executable.

See there for more information and 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. Suitable for pic16f1454, pic16f1455, pic16f1459.

To install this boot loader, you need any regular PIC programmer once.

The download tool for Windows can read and dissect ELF files. 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 download tool is also a simple test monitor: You can read and write any peripheral with symbolic and bit-wise register access. It “knows” and auto-detects controller-specific names and differences. The boot loader itself includes peripheral access, so you won't need any stub firmware.

See there for more information and download.

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.