Code Generation Tools XML Processing Scripts

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

Introduction

This is a package of Perl scripts used to process the XML files that come from the TI code generation tools. Use it to do things like build a spreadsheet that details the size of all the sections, or figure out how much of the memory map is taken up by specific libraries.

These scripts are now post-processed as part of the release to create executables on Windows & Linux - so you don't need to have Perl installed as a prerequisite.

Also note that these scripts now work with COFF or ELF object file formats. They can also work with other vendor Codegen outputs - for example the scripts were tested against ELF libraries built by the MontaVista GCC ARM compiler. This is true for utilities like sectti which only depend on the (COFF or ELF) Object File information - however scripts like call_graph require detailed Dwarf debug information to obtain the call tree and stack size hence will only work with TI based CGT ELF output.

Download

Sample Outputs

C:\dir>ofd6x -x app.out | sectti
Reading from stdin ...

************************************************************
REPORT FOR FILE: app.out
************************************************************
                Name : Size (dec)  Size (hex)  Type   Load Addr
-------------------- : ----------  ----------  ----   ----------
                .clk :         12  0x0000000c  UDATA  0x0000f0b4
            .hwi_vec :        512  0x00000200  CODE   0x00000000
                .swi :        220  0x000000dc  UDATA  0x0000ecd0
                .idl :         32  0x00000020  UDATA  0x0000dee0
                .bss :        896  0x00000380  UDATA  0x0000d800
                .far :       2124  0x0000084c  UDATA  0x0000c340                                        
<snip ...>

------------------------------------------------------------
Totals by section type
------------------------------------------------------------
  Uninitialized Data :       7604  0x00001db4
    Initialized Data :       9478  0x00002506
                Code :      48800  0x0000bea0
C:\dir> call_graph arm_hello.xml | more
Call Graph for arm_hello.out
**********************************************************************
_c_int00 : wcs = 668
|  __args_main : wcs = 668
|  |  _main : wcs = 668
|  |  |  _printf : wcs = 664
|  |  |  |  __printfi : wcs = 632
|  |  |  |  |  __pproc_fflags : wcs = 0
|  |  |  |  |  __pproc_fwp : wcs = 36
|  |  |  |  |  |  _atoi : wcs = 4
|  |  |  |  |  |  _memset : wcs = 8
|  |  |  |  |  __pproc_str : wcs = 56
|  |  |  |  |  |  _free : wcs = 20
|  |  |  |  |  |  |  _minit : wcs = 8
|  |  |  |  |  |  |  _minsert : wcs = 8
|  |  |  |  |  |  |  _mremove : wcs = 0
|  |  |  |  |  |  _malloc : wcs = 20
|  |  |  |  |  |  |  _minit : wcs = 8
|  |  |  |  |  |  |  _minsert : wcs = 8
|  |  |  |  |  |  |  _mremove : wcs = 0
...

More details on Stack usage in this context can be found on this wiki page.

Prerequisites

Instructions

E2e.jpg For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Code Generation Tools XML Processing Scripts here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment

Comments

Comments on Code Generation Tools XML Processing Scripts


Niallp said ...

Had a few issues with running the tiobj2bin.bat with the hex6x tools and linux, checkout http://e2e.ti.com/support/development_tools/compiler/f/343/t/158543.aspx#576356

--Niallp 19:21, 17 January 2012 (CST)

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox