Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 2.85 KB

README.MD

File metadata and controls

46 lines (35 loc) · 2.85 KB

RTD-2660-Programmer(for)Python

This is a python port of ghent360's RTD-2660-Programmer utilizing the Adafruit FT232H for i2c communication with your Realtek RTD2660-based lcd controller. If this project helps you out, send your beers to [ghent360] first, he/she did all the heavy lifting.

Notes - General:

  • This was done quick and very dirty
  • Writing to the flash is not currently supported. The c methods ProgramFlash and ReadFile are copied into my source, but commented out and not yet translated to python.
  • I've never touched python before this so I'm sure some things are very wrong from a style perspective
  • I used python 2.7.11
  • I may not ever update this as I've already got what I needed out of the project, which was to read out the firmware from one of my controllers and then clone it to another board with this tool from matt millman (his rovatool, didn't support dumping firmware at the time).

Notes - Reading firmware

  • Reading is painfully slow, taking upwards of 9 mins for a 512 Kb dump. The faster Adafruit GPIO method readList kept failing for me with ACK errors, so I had to fall back to reading a single byte at a time.
  • The firmware images compatible with my LCDs are 256K, but the flash is (supposedly) 512K so my test dumps yielded extra stuff. I'm not sure whether this data is relevant at all (runtime variables maybe) or what rules I need to follow for ending the read operation earlier. Just keep in mind that you might pull more info than needed and will likely have to truncate it manually.

Setup

Usage

$ python prog.py -h
usage: Adafruit_I2C_test.py [-h] [--flash-filename FLASHFILE]
                            [--dump-filename READFILE]

RTD2660 Flash Reader.

optional arguments:
  -h, --help            show this help message and exit
  --flash-filename FLASHFILE
                        Flash this file to the controller
  --dump-filename READFILE
                        Read into this file from the controller

dump firmware

$ python prog.py --dump-filename path/to/save/file.bin

load firmware (method commented out and untested, in all likelyhood, it's broken)

$ python prog.py --flash-filename path/to/load/file.bin