This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

COFF Format

Other Parts Discussed in Thread: TMS320F2809

Hello Texas Instruments:

I am writing in regard to the Texas Instruments Common Object File Format document SPRAA08-2009 (Signal Processing Resource, Application Report, Revision A) of April 2009.

Section 2 (File Header Structure) on page 4 of that document indicates that the Time and Date Stamp is given in bytes 4-7 as an integer and is described as: “Time and date stamp; indicates when the file was created” However, there is no indication of how to determine the time and date from that 4-byte value.

I would like to know how to determine the time and date from that 4-byte value.

Thank you,

Tim Ball

TDB Consulting

  • This flaw in the documentation is the subject of (unpublished) defect SDSCM00037606.

    The format is a 32 bit number of number of seconds since 00:00:00 UTC, January 1, 1970.

  • Texas Instruments (i.e. Archaeologist):

     Thank you very much for your swift and accurate response.

    For those interested, 'C' computer language code follows for converting that 32 bit Time and date stamp, which indicates when the COFF file was created as the number of seconds since 00:00:00 UTC, January 1, 1970, into the date and time:

     #include <time.h>

     int Date_and_Time_from_January_1_1970_seconds(long COFF_32_bit_Time_and_date_stamp_value, char *string)

    {

       time_t time;

       struct tm tmdata;

        time = COFF_32_bit_Time_and_date_stamp_value;

       tmdata = *localtime(&time);

       sprintf(string, "DATE: %d/%d/%d TIME: %d:%d:%d",

               tmdata.tm_mon+1, tmdata.tm_mday, tmdata.tm_year+1900,

               tmdata.tm_hour, tmdata.tm_min, tmdata.tm_sec);

        return strlen(string);

    }

    Have a nice weekend,

    Tim Ball

    TDB Consulting

    Web: http://TDBConsulting.org/

     

  • Hello Texas Instruments:

     I am writing in regard to the Texas Instruments Common Object File Format document SPRAA08-2009 (Signal Processing Resource, Application Report, Revision A) of April 2009.

     Section 6.6 (Section Number) on page 13 in Table 19 Section Numbers describes Section Numbers “4-32 767” (note that a space is given erroneously after 32 instead of a comma for 32,767) as follows:

    “Section number of a named section, in the order in which the named sections are encountered”

     However, for software compiled with Texas Instruments (TI) Code Composer Studio for the TMS320F2809 Digital Signal Processor (DSP), I have observed that the Section Numbers assigned are not always assigned contiguously for sections of memory that reside and are defined immediately after one another.

     QUESTION #1: Are Section Numbers of named sections supposed to be assigned numbers contiguously and in the order in which the named sections are encountered?

     QUESTION #2: Is it possible to assign Section Numbers in the software source code?

     Thank you,

    Tim Ball

    TDB Consulting

    1. I don't believe so.  I don't think there is any restriction on how the assembler and linker might number named sections for COFF.
    2. No.