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.

TMS320F2808: Intex hex file generated through C2000 hex utility is not aligned

Part Number: TMS320F2808
Other Parts Discussed in Thread: C2000WARE

I generated hex file from C2000 hex utility from CCS Version: 6.1.0.00104 IDE.The hex file is not aligned properly.I am sharing the file.Kindly,support on this.

Thanks,

Srinivas

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
:20855200000000000000000000000000000000000000000000000000000000000000000009
:208572000000000000000000000000000000000000000000000000000000000000000000E9
:208592000000000000000000000000000000000000000000000000000000000000000000C9
:1685B20000000000000000000000000000000000000000000000B3
:0885C800FFFFFFFFFFFFFFFFB3
:02000004003EBC
:2080000008040201003E0000003E0000003F0000003F0000124644425640CF4D0003EF9D38
:208020004DE742460148423E00A9A60D483FFFA9A607420F7D4A4E16423D00A9A60E483DA6
:20804000FFA9A608420BAF4A4E10030C6F40062203A98D1A015046505C4E4A407D4B515168
:208060002D291F4B3800A6033867444BA9FFC4044D1F1844C44B14444B5EC44C4E4C4A40B5
:20808000BA4E4A407D4B51512DD944C44B1B4DE7034D1E564BDC44C456D44E07564A1F7D8E
:2080A000C413564A1BAFC40D4401444A014A5001504650A640F94DE7024D4D920606444187
:2080C0004440CF460003EF9746E7410F410414EF8E40062203A98D1A454503164500043153
:2080E00001A444C48040D4460004461805454503EC465D4545035945000094414D450004E0
:2081000040063101A4453101A5C4C544406946001345000440063101A4453101A5C4C5440A
:20812000407946001445000440063101A4453101A5C4C54440D4461245000440063101A40D
:20814000453101A5C4C54440D44605454503A9460A4500043101A4C444C440F94686060853
:208160004342400F4740284642404A4503A9910AA98C0002401B43A90BA9902099401B43C5
:20818000A90BA9902F01401B45009C944443A90BA9900001401BA90FA9902099401B1A46BD
:2081A000402C477744880608444342400F4740284642404A04A99106A98B0BA98903A98CF5
:2081C000438A0002401B44A90BA990454345090002401B454345F944A90BA9902F18401B78
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Srinivas, 

    Can you share what command you used to generate this file? What is your expected output?

    Thanks,

    Anu

  • Hi Anu,

        The expected output is as mentioned below.

    1.In line no.1 record type should be extended linear address record, whereas in the above file it is data record.

    2.In line no.1 should be shifted to line no.50 as it is the continuation address of the previous line no.49 

    3.If you observe line no.152 and line no.153.In line no.152 there are 32 bytes but in line no.153 it is 6 byes.So,I want line no.153 also to contain 20 bytes.

    There are similar non-aligned lines in the above if you observe.

    4.I also want to include checksum table for the whole image in the above file.

    5.How to get size of the hex image from the above file ?

    Note: Sector A and Sector B is used for custom bootloader application

    The command used to generate the intel hex file is below.

    The linker command file is below

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    MEMORY
    {
    PAGE 0: /* Program Memory */
    /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */
    RAML0 : origin = 0x008000, length = 0x001000 /* on-chip RAM block L0 */
    OTP : origin = 0x3D7800, length = 0x000400 /* on-chip OTP */
    FLASHD : origin = 0x3E8000, length = 0x003FF0 /* on-chip FLASH */
    FLASHC : origin = 0x3EC002, length = 0x003FFE /* on-chip FLASH */
    //FLASHA : origin = 0x3F4000, length = 0x003F7D /* on-chip FLASH */
    //SWTAIL : origin = 0x3F7F7D, length = 0x000003 /* on-chip FLASH */
    //CSM_RSVD : origin = 0x3F7F80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
    //BEGIN : origin = 0x3F7FF6, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */
    BEGIN : origin = 0x3EC000, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */
    //CSM_PWL : origin = 0x3EC002, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
    ROM : origin = 0x3FF000, length = 0x000FC0 /* Boot ROM */
    RESET : origin = 0x3FFFC0, length = 0x000002 /* part of boot ROM */
    VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Thanks,

    Srinivas

  • Hi Srinivas, 

    I will notify the hex utility expert to help you further. Please expect a response in a day or two. 

    Thanks, 

    Anu

  • In line no.1 record type should be extended linear address record, whereas in the above file it is data record.

    If the address of the first section converted is 0x8552, then no address record is required.

    As for some lines having less than 32 bytes ...  The hex utility works through the executable file one section at a time.  When one section completes processing, the current line is ended.  A new section always opens with a new line.  This occurs even if the two sections happen to be contiguous in memory.  This is not a violation of the specification for Intel hex format.

    I also want to include checksum table for the whole image in the above file.

    The hex utility has no feature that solves this problem.  The closest thing is in the linker.  Please search the C28x compiler manual for the sub-chapter titled Linker-Generated CRC Tables and CRC Over Memory Ranges.

    How to get size of the hex image from the above file ?

    Unfortunately, the hex utility has no feature which reports the size of the image.

    Thanks and regards,

    -George

  • Hi George,

             Thanks for the response.

             All points above except point no.4 is not clear.As you mentioned I refereed chapter Linker-Generated CRC Tables and CRC Over Memory Ranges in spru513w  document.Now,I am able to generate Linker-Generated CRC Tables.

          For you kind information.

          Custom bootloader is running in Sectors A&B,which receives the application image over RS232 which should be flashed in Sectors C & D.

          1.How to verify the CRC of the received application which is flashed in Sectors C&D inside bootloader application?

          2.How to access linker generated CRC table of application inside bootloader?

      Thanks,

      SRINIVAS

  • Hi Srinivas,

    For computing CRC at run time using VCRC module, you can refer to the C2000ware example.

    C2000Ware_3_04_00_00\libraries\dsp\VCU\c28\examples\crc

    The following thread also might be useful:

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1027144/tms320f280025-hw-crc-programming-or-code/3816452#3816452

    Regards,

    Veena

  • Hi Veena Kamath,

            Thanks for quick response,

            The above two issues got resolved.

    1.How to verify the CRC of the received application which is flashed in Sectors C&D inside bootloader application?

        In the above document spru513w refered Example C-3. Checking CRC Values for CRC verify function.

    2.How to access linker generated CRC table of application inside bootloader?

       The linker generated CRC table which is available in the hex file is received from the host on the custom bootloader application.

    Thanks,

    Srinivas