Skip to content

Repository files navigation

EZP2019 USB Programmer Utility Ask DeepWiki

EZP2019 USB Programmer

A Linux-based driver and command-line utility for the EZP2019 High-Speed USB Programmer. This project provides an open-source alternative to the proprietary Windows software, allowing users to interact with various memory chips (EEPROM, SPI Flash) directly from the Linux terminal.

Features

  • Direct USB Communication: Interacts with the programmer using libusb-1.0.
  • Hardware Detection: Verify connection to the EZP2019 programmer.
  • IC Identification: Retrieve information about the connected memory chip.
  • Cross-Platform Potential: Built using C and standard libraries for portability.

Supported Hardware

  • Device: EZP2019 USB Programmer
  • USB VID: 0x1fc8
  • USB PID: 0x310b

Dependencies

Ensure the following dependencies are installed on your system:

  • libusb-1.0
  • pkg-config
  • cmake (3.10 or higher)
  • A C23 compatible compiler (e.g., GCC 14+)

On Ubuntu/Debian:

sudo apt update
sudo apt install libusb-1.0-0-dev pkg-config cmake gcc

Build Instructions

Use the provided build.sh script to configure and build the project:

./build.sh

This will create a build directory containing the ezp2019 executable and a libezp2019.so shared library.

USB Permissions (Linux)

By default, most Linux distributions restrict access to USB devices for non-root users. To allow all users to access the EZP2019 programmer without sudo, you can install a udev rule:

  1. Create the rule file:

    sudo bash -c 'echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"1fc8\", ATTR{idProduct}==\"310b\", MODE=\"0666\"" > /etc/udev/rules.d/99-ezp2019.rules'
  2. Reload and apply the rules:

    sudo udevadm control --reload-rules && sudo udevadm trigger
  3. Replug the device: Unplug and replug your EZP2019 programmer for the changes to take effect.

Usage

Run the utility from the build directory:

./build/ezp2019 <command>

Available Commands

  • is_connected: Checks if the EZP2019 programmer is connected.
  • connected_ic: Retrieves ID/data from the connected IC.
  • read_ic: Reads the entire contents of the connected IC.
  • write_ic: Writes data from stdin to the connected IC.
  • verify_ic: Verifies the contents of the connected IC against stdin.
  • erase_ic: Erases the connected IC.

Example

Checking if the programmer is connected:

./build/ezp2019 is_connected

Checking connected IC info:

./build/ezp2019 connected_ic

Reading contents of the connected IC and saving to a file:

./build/ezp2019 read_ic > output.bin

Writing contents of a file to the connected IC:

./build/ezp2019 write_ic < input.bin

Verifying the contents of a file against the connected IC:

./build/ezp2019 verify_ic < input.bin

Erasing the connected IC:

./build/ezp2019 erase_ic

EZP2019 in Docker

Pre-built Docker images are available on Docker Hub at bokic78/ezp2019.

Running from Docker Hub

You can pull the pre-built image and run it directly.

1. Pull the image:

sudo docker pull bokic78/ezp2019:latest

2. Run the interactive shell inside the container:

# Privileged mode is required to access USB devices
sudo docker run -it --rm --privileged bokic78/ezp2019:latest sh

3. Run utility commands directly:

The container's entrypoint automatically forwards subcommand arguments directly to ezp2019. For example:

  • Check connection:

    sudo docker run --rm --privileged bokic78/ezp2019:latest is_connected
  • Read chip content to a file:

    sudo docker run --rm --privileged bokic78/ezp2019:latest read_ic > output.bin
  • Write chip content from a local file:

    sudo docker run --rm -i --privileged bokic78/ezp2019:latest write_ic < input.bin

Building a local image

If you prefer to build the image locally and automatically tag the binary with the current git version, run:

sudo docker build . -t ezp2019 --build-arg VERSION=$(git describe --tags --abbrev=0)

(If you run without --build-arg VERSION, it will default to version 0.0.0-unknown)

Usage (Local Image):

sudo docker run -it --privileged ezp2019 sh

Development Tools

Chip Database Generator

The project includes a Python script to convert the binary ezp2019.dat chip database into a C header file (ezp2019_chips.h). This is useful for updating the list of supported devices.

Usage:

python3 ezp2019_gen_header.py ezp2019.dat -o ezp2019_chips.h

License

This project is licensed under the MIT License. See the LICENSE file for details.


Copyright (c) 2025 Boris Barbulovski

About

A Linux-based driver and command-line utility for the EZP2019 High-Speed USB Programmer. This project provides an open-source alternative to the proprietary Windows software, allowing users to interact with various memory chips (EEPROM, SPI Flash) directly from the Linux terminal.

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages