AnsweredAssumed Answered

CodeWarrior v6.4 Post-Compile TDT

Question asked by Marshall Peterson on Aug 7, 2017
Latest reply on Aug 15, 2017 by Carlos_Mendoza


   I am working on implementing a feature into one of our projects, and I am running into a bit of a conundrum. I am generating a generic text file (using python) in which it deconstructs one of my Structures (and all sub-Structures) into a list of generic types


for example, if I had a structure like this:


typedef struct{
uint_32   checksum;
uint_16   sig1;
uint_16   sig2;
MyStruct2 SubStruct;

typedef struct{
uchar   X;
uchar   Y;
uint_16 Z[MAX_ARRAY_SIZE];

The output would look like this:

uint_32 Checksum
uint_16 sig1
uint_16 sig2
uchar x
uchar y
uint_16 Z[100]


The problem I have is that the MAX_ARRAY_SIZE is not easily readable (and not as simple as it is defined in the code above), so there is no way for me to parse that part out.


I was looking through the TDT files, and ELF files to see if I could determine the array size based on those files, but I cannot get what i need from the ELF file (that i know of, been using Objdump a whole bunch but can't discern the information i need from it). So I was wondering if the TDT files held an encoded definition of the array size? 

"Z" is actually a much more detailed and unique name, so i can find it exactly as-is.