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/F28M35H52C: C28 Hex Utility generating strange hex format output

Part Number: F28M35H52C
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi Guys,

I am trying to generate a .hex file out of a simple blinky_c28 application. The generated hex file outputs a strange format as below:

:0C806000761F01381E24761AFF69000606
:20806600FFFFA00000000001FFFEA002000000000000FFFEA004000000000000FFFEA00678

Now i program data from first line above starting from address 0x138060 it until 0x138065 and when i go to next line to start programming the data from address 0x138066 its throws an error called "Fapi_Error_AsyncIncorrectEccBufferLength".

Now how could i solve this problem ? 

Below is a code snippet of how i deal with record length from .hex file.

if(reclength == 0x0C)
{
oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)flashsectoraddress,
data_buffer,
6,
0,
0,
Fapi_AutoEccGeneration);
}
else if (reclength == 0x04)
{
oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)flashsectoraddress,
data_buffer,
2,
0,
0,
Fapi_AutoEccGeneration);
}
else
{
oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)flashsectoraddress,
data_buffer,
8,
0,
0,
Fapi_AutoEccGeneration);
}

Thanks!

  • Preetham,

    Here is a wiki page that explains how to use the hex utility tool in CCS. processors.wiki.ti.com/.../Hex_Utility_in_CCS

    Regards,
    Ozino
  • Hi Ozino,

    I do know how to generate a Hex file using the utility provided on CCS.

    To generate a hex file for C28 blinky i am using I am using these flags : "--memwidth=16 --romwidth=16 --intel".

    Have a look at the hex file generated for me:

    blinky_c28.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    :020000040013E7
    :200000008F24021EC5C49A033E6776228F240214C5C49A019B08FF693E67520060F88F24B0
    :200010000214C5C49A0228A880003E67520060F8761F01C41A008000761F01C61A0080000C
    :20002000770077008F240220FF69C5C43E678F240216C5C49A019B083E67520060F98F24D2
    :200030000216C5C49A0228A880003E67520060F8761AFF697653003D00067622761F01C0E2
    :2000400056BF021B761A8F24021E9A03FF69C5C43E6776228F240214C5C49A019B08FF6948
    :200050003E67520060F88F240214C5C49A0228A8803F3E67520060F88F240218C5C49A0283
    :200060003E67761F01C01A1D01001A1D02001A1D04001A1D08001A1D10001A1D20001A1DC5
    :2000700040001A1D80001A1901001A1D00011A1D00021A1D00041A1D00081A1D00101A1DDC
    :2000800000201A1D00401A1D00801A1900011A2008001A2001001A2002001A2004001A1CB1
    :2000900004001A1C01001A1C00101A1C10001A1C00011A1C0004761AFF690006761F4FFF37
    :2000A000063A28ABFFFF28AAFFFFCE38CF39CE3CCF3DCE3ECF3F0FAB611176220200761FC6
    :2000B000002B19011E20020019011E22020019011E24020019011E26761AFF690006761F00
    :2000C0004FFF28ABFFFF28AAFFFF0636CE34CF350FAB610B76220200761F002B19011E3007
    :2000D000020019011E32761AFF6900067622761F002B1A2F8000761AFF690006FE049641AE
    :2000E000761F4FFF06321E44761F002B2D419235FF629001520160039A016F029A00FE84BE
    :2000F0000006761F002B462F6C07442F6D03452F6C039A006F029A010006761F002B4A2F97
    :200100006C07482F6D03492F6C039A006F029A01000628AD0050FF69561F5616561AE6101E
    :2001100002002940761F00002902761B7653026352006142762228A9806628A800130901B4
    :20012000611B76D3806629046F0F9B0024A9DF016C04290424A8DF011EA6F7A1248606A725
    :2001300081A109011EA724A96303FF5C3B0459A9DF010009FFEC28A9FFFF28A8FFFF090174
    :2001400061058F3FFFFF7653015F761A7653026528A9FFFF28A8FFFF0901610E76FFFFFFFB
    :200150006F06DF01C3BD1EA73E67C5BE24A9DF0124A8FF5860F776530241765301E2B2BD7F
    :20016000AABDFE0486A4D10088CA6F392901560303A107A209028AA992C460039A006F024F
    :200170009A0293CCB60056B001A794A7611F520161155202610B5203602106E41E4206F4B2
    :200180001E4406D4765302276F1806E41E4206F41E4406D4765302276F1006E41E4206F475
    :200190001E4406D4765302276F0806E41E4206F41E4406D47653022788CAD90192A654A1DF
    :2001A00066C6FE8486BE8BBE0006FE02765300007622761F017E1A2A0040761A761F017F60
    :2001B0001A10004028A9006628A80000FF698F5380008F00900076530209764090008F0F1D
    :2001C0004240761F017F1810FFBF02001E42A8A90F426907020107421E42A8A90F4266FB7F
    :2001D000761F017F1A10004002001E42A8A90F4269E9020107421E42A8A90F4266FB6FE23A
    :2001E00077006F00B2BD761F028059A99200610D28ABFFFF28AAFFFF28A9FFFF28A8FFFF53
    :2001F0000FAB6103767FFFFF761F0280C5063E67761F0280060461041EA792A13E67761F9F
    :200200000280060261031EA73E67765301E08BBE00065200A8AB8EA4610880A9DF8188A795
    :2002100080857F80000EFFFE88A90FA6610F5300610D9DFF5CA876BFFFFE92859680000E9B
    :20022000FFFE92859680000CFFF8A9A400061EA78A440646520061049CFFF7A92484530072
    :20023000611027462BAA565700A7A9A72484DF0128A9FFFEF7A9248408AA0001FFD0EDF654
    :20024000000628ABFFFF28AAFFFF28A9FFFF28A8FFFF0FAB6004BE00D4006F0928ABFFFF61
    :2002500028AAFFFFA9A488C409028AA992A6765301A50006761F0280A8080006761F028056
    :0C026000A806000600069A010006000631
    :208000007622761F01001A2400011A200003761F01061800FFFD1800FFFE761F0100CC008F
    :20801000F0FF1AA903009600761F01061A0000021A000001761F010CCC00FFF0500A9600E5
    :20802000761AF6077700FF690006FE0296417622761F01001A2400011A200003761F0106B1
    :208030001800FFFD1800FFFE900F761F0100FF87CD00F0FFCAA89600761F01061A000002D0
    :208040001A000001761F010CCC00FFF0500A9600761AF6077700FF69FE8200067622761F99
    :208050000138062460FD28A9395128A84CE71E24761AFF690006762228A9395028A84CE7BD
    :0C806000761F01381E24761AFF69000606
    :20806600FFFFA00000000001FFFEA002000000000000FFFEA004000000000000FFFEA00678
    :14807600000002620013FFFEA0080000026200130000000063
    :04A0000000530109FF
    :00000001FF
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Now almost at the end of this file there are two simultaneous hex records which totally disobey with the ECC  check TI FLASH PROGRAM API does.

    :0C 8060 00 761F 0138 1E24 761A FF69 0006 06
    :20806600FFFFA00000000001FFFEA002000000000000FFFEA004000000000000FFFEA00678

    Here the address generated for the first records above will be 0x138060 and holds records worth up to a address 0x138065.

    ex :  0x138060 programs 761F

            0x138061 programs 0138

            0x138062 programs 1E24

            0x138063 programs 761A

            0x138064 programs FF69

            0x138065 programs 0006


    Now when my software moves to program next hex records which starts from address 0x138066 i get an ecc error. Because the flash api would have calculated the ecc for 0x138066 and 0x138067 in the previous instance and would restrict the user to program the same address again. 

    Hope now you get an idea regarding the issue i am facing. How could i solve this problem now ? 

    Thanks

  • Preetham,

    Do you align the sections in your linker command file on a 64-bit boundary?

    Please search for "Why do you use align directive (ALIGN(x)) in the linker cmd files provided in the C2000Ware examples" in Flash API wiki at http://processors.wiki.ti.com/index.php/C2000_Flash_FAQ 

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

    Thanks for your reply using ALIGN(4) in linker file resolved the problem.

    Regards
    preetham
  • Preetham,

    Glad it helped. I am closing this thread.

    Thanks and regards,
    Vamsi