Artifact b5022e2e06845d2e09b5f45b6e9bc5ec4aa60d4b:

Wiki page [binconvert] by erikj 2017-11-29 01:29:20.
D 2017-11-29T01:29:20.782
L binconvert
N text/x-markdown
P 4876d20202e4acfa81642452379025c2264a17c9
U erikj
W 2051
# binconvert

This package is in the late stages of development testing, and is available for general use.  As of version 0.2.1, Intel Hex, SREC, & TI Text formats are all tested and appear to be working.  Rawbin has not yet been verified.  

Your feedback and bug reports are appreciated.

### 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

NOTE: I have not released this package in teacup format yet.  To use, download all files into a directory in your TCLLIBPATH.  I plan to generate an initial teacup file once I've tested the final format.

### 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 3cc8a8562254b0cdcbf22970e5327ef1