Python scripts for AIS and COFF

From Texas Instruments Wiki
Jump to: navigation, search

Commandline tools written in python for reading COFF files, generating and dumping AIS images.

These allow the generation of AIS image to be integrated into a commandline or makefile build.

NOTE: These scripts come with no guarantee, though they have been used to create a bootloader and application image that do work on a C6747 DSP. Bug reports gratefully accepted.

The script sources can be viewed/downloaded/cloned at this github gist

aisgen

Generate AIS image from .out file.

Currently supports TMS320C6747/45/43 Bootloader ROM d800k002

https://gist.github.com/1073231#file_aisgen.py

Usage: aisgen.py [options] input.coff [output.ais]

Options:

 -h, --help            show this help message and exit
 -c, --enable-crc      enable per-section CRCs
 -r ROM, --rom=ROM     rom version, eg d800k002
 -s, --sequential-read
                       use SPI sequential read
 -v, --verbose         verbose log output
 -b EMIFB_CONFIG, --emifb-config=EMIFB_CONFIG
                       E.g. --emifb-config="sdcfg=0x10620, sdtim1=0x01912a08,
                       sdtim2=0x70080005, sdrfc=0x8000079e"
 -p PLL_CONFIG, --pll-config=PLL_CONFIG
                       E.g. --pll-config="pllm=29, postdiv=1, plldiv3=3,
                       plldiv5=2, plldiv7=5, clkmode=1, pll_lock_cnt=402,
                       spi_prescale=6"
 -m PINMUX_CONFIG, --pinmux-config=PINMUX_CONFIG
                       PINMUX_CONFIG=regnum,value[,optional mask]. May be
                       used more than once E.g. --pinmux-config=0,0x10011101
                       -m1,0x1001,0xFFFF

aisread

Read AIS file, showing the commands used. Useful for comparing TI aisgen output to the aisgen.py output. Also can generate C header file with AIS content.

Usage: aisread.py [options]

Options:

 -h, --help            show this help message and exit
 -g, --generate-header
                       generate full header file on stdout

ticoff

Read a TI COFF file into a python object. Currently supports section data and entry point, sufficient for generating loadable image, but doesn't support whole symbol table, or partially linked files.

Usage: ticoff.py [options]

Options:

 -h, --help       show this help message and exit
 -d, --dump_data  dump section data

References