Artifact a626bd391b054ec7f38bf72767d5ef9a41613be1:

Wiki page [binconvert] by erikj 2017-11-09 23:22:43.
D 2017-11-09T23:22:43.735
L binconvert
N text/x-markdown
P dd4707524b61aa4b96296773ef1a842f37567ca2
U erikj
W 1695
# binconvert

This package is in the process of being enhanced and re-hosted at Chisel.  The process is expected to complete in November 2017.

### About

Binconvert is a Tcl package that reads & writes EEPROM memory files in multiple formats (Motorola S-REC, Intel Hex, TI Txt, raw binary).  Within Tcl, the information in the files is available for use as a Segment List, i.e. a list of segments in address/datablock pairs.

### Documentation

Binconvert is written for use with the [pycco](https://pycco-docs.github.io/pycco/) documentation generator in a literate programming style.  Generated documentation can be found [here](https://chiselapp.com/user/erikj/repository/binconvert/doc/tip/docs/binconvert.html) and [here](https://chiselapp.com/user/erikj/repository/binconvert/doc/tip/docs/index.html).

### Installation

Download the teacup file to your local system.  From a command line in that directory:

    teacup install binconvert.tm

### Example usage

    set segmentlist [binconvert readFile srec inputFile.S28]
    set newsegmentlist [process_bin_data $segmentlist]
    binconvert writeFile i16hex $newsegmentlist outputFile.hex

### Extending to New Formats

Binconvert is written in a modular way that allows easy extension to new formats.  If you create a format driver for a publicly-documented format, I encourage you to submit it to be added to the base package.  But even if your format is proprietary, you can easily extend binconvert to read and write that format in exactly the same way as any supported format, using [the provided interface](https://chiselapp.com/user/erikj/repository/binconvert/doc/tip/docs/binconvert.html#addparser).  
Z c06b9eca85391bc5387173da94d9b891