Read and Write the EEPROM of an FX2 chip with the help of the Cypress vend_ax.hex firmware.
vend_ax.hex is property of Cypress.
- Install libusb-1.0-0-dev on your system, e.g.
apt install libusb-1.0-0-devfor debian. - Run
make
- Read SIZE bytes starting at EEPROM_ADDRESS from USB device with VID:PID
./fx2eeprom r VID PID [SIZE [EEPROM_ADDRESS]] > eeprom.raw- Write SIZE bytes starting at EEPROM_ADDRESS to USB device with VID:PID
./fx2eeprom w VID PID [SIZE [EEPROM_ADDRESS]] < eeprom.rawSIZE must not be greater than 65536. You can omit the SIZE parameter, in which case 65536 is used by default.
In read mode, the tool then outputs 65536 EEPROM bytes to stdout;
in write mode, it stores up to 65536 bytes from stdin (until EOF) on the EEPROM.
Also the EEPROM_ADDRESS parameter is optional and defaults to 0.
If you want to work more intensively with the FX2 on your Linux system, the Cypress GUI CyUSB Suite for Linux offers further possibilities.