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.

CCS/TMS570LC4357: HEX format

Part Number: TMS570LC4357

Tool/software: Code Composer Studio

I have selected the HEX generator to create Motorola S record format.

It generates 4 files with the following suffixes: .HEX, .m1, .m2, .m3

They all contain S records for the same address , but different data.

How do I interpret them (what's the difference)?

  • John,

    Please see the chapter titled Hex Conversion Utility Description in the ARM assembly language tools manual.

    Regards, Sunil

  • Thanks, I have already found that resource. It explains the format of the Motorola records and suggests that:
    -M1 uses a 16 bit address width,
    -M2 uses a 24 bit address
    -M3 uses a 32 bit address.

    However in examining the records they all use 16 bit addresses. The documentation also states that the data width is 8 bits for each, however the data is different for each format.

    from .HEX
    S10B0000E9FEFEFEFE5CB0B057 address 0 E9FE
    S1228100001CB8040010BA00B877FA010C4C0DBA300CFA0D0C3904FA0C00070000B862BE address 8100 001C
    S122817C000000E3FA0D0401BA0C010400FA10F3041C000EB80400040010B80A0D00015B address 817C 0000

    from .M1
    S10B000060FFFFFFFF63F1F153 address 0
    S122810040D0201000C0C0001042C0C0C8C800C0C0C0C0C0C00000C00010101000104278 address 8100
    S122817C00C000FFC01000C0C010C0C010C000FF00D08040201000C00000C00000C00072 address 817C

    from .M2
    S10B000000FFFFFFFF001F1FBA address 0
    S12281002D4DCD8D8DA0CD9DDD00DD4CA0A08CCD81C0DD8CDC5C00DD8DDC81CC9DDD0063 address 8100
    S122817C8D9D5CFFDD8C9D8CCDD1808DC0DD5CFF9D8DBD2DCD8D8D9D5C00DD5C009D8CD0 address 817C

    from .M3
    S10B0000EAEAEAEAEAEAE5E5AE address 0
    S1228100E9E2E1E5E5E3E1E5E1EBE1E2E1E1E0E1E2E5E1E0E5E3DAE1E2E7E2E7E5E1EBDD address 8100
    S122817CE5E5E31AE1E0E5E2E1E5E2E5E5E1E3BAE5E2E8E9E1E5E5E5E35AE1E31AE5E297 address 817C


    How do you interpret the data in each format? Is the address really the same in each format?

  • The --romwidth parameter needs to be setup to be 32. You can do this in the "General Options" for the armhex utility within CCS.

    This will make it generate a single .hex file. This is also described in section 12.3 of SPNU118U titled "Understanding Memory Widths".