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.

SM320LF2407A-EP: Hex2000 converter only converts half of the code

Part Number: SM320LF2407A-EP

Hello,
I am setting up a DSP with a dual page scheme (2 x 64k) for program space. The build allocates a boot section and constants to two page and the rest of program space to the other page. I am working with CCS3.3 tools for a 2407a DSP.
The build and link compiles the code with sections specified for each page into one .out file. I run hex2000 to convert the section to two binary files, one for each page and combine the two into one file later.
The problem is that when I examine either bin file I find the code origin in the right place ( word * 2 = binary byte addressing), but the length has NOT been multiplied by two so only half of the code shows up in the binary file. Teh code that is there is correct (hi and low bytes are good).


From the .map file; .cinit section starts at 44 with a length of 349.
From the .bin file; .cinit section starts at 88 with a length of 349. The address or origin is correct by the length is half of what it should be for binary in bytes.


This is true for all the sections going into the flash/binaries regardless of which pages it would be on. I am contemplating making each page a project with separate .out files. However I am not confident this will change the outcome.

Calling the hex2000 converter:
if exist .\debug\_STC.out hex2000 STC_DSP2bin_FP0.cmd .\debug\_STC.out
if exist .\debug\_STC.out hex2000 STC_DSP2bin_FP1.cmd .\debug\_STC.out

STC_DSP2bin_FP0.cmd file:
-binary        /*binary option*/
--image
-fill 0xFFFF

ROMS
{
    PAGE 0:
        FLASH0: origin = 00000h , length = 01FC00h, files = {.\debug\_STC_FP0.bin}      /*PAGE 0 */
        /* NOTE: With "-binary" option "romWidth" is ignored and assumed to the be 8.
          In addition the origin and Length are specified in bytes (word length * 2 = byte length)!!! */
}

SECTIONS
{
    .vectors .boot .GoToApp .cinit .const
}

  • I am working with CCS3.3 tools for a 2407a DSP.

    This means you are using the compiler tools for the TMS320C24xx CPU family.  Support for those tools (the compiler is called dspcl) ended a long time ago.  Using hex2000 on files generated by these old compiler tools is not tested or documented.   That said ...

    I'm not certain, but I suspect you are being affected by the problem discussed in this forum post.

    Please let me know if this suggestion resolves the problem.

    Thanks and regards,

    -George

  • I had already found this forum post that you are referring. It is not the same problem. As I am programming a binary file, I am expecting the file to be byte formatted. The binary file contains the code at the expected location byte wise (double the word origin). Verified against the .map file. Also correct is the LSB and MSB both are present and in the right order confirmed against the .lst files. However, only half of the code is there. It appears the the length was not doubled for bytes. I need a binary format and need to be able to fill unused locations with 0xFFs. The hex2000 will do this. I have and XP box for building.

    Kevin

  • To understand what is happening, I need to reproduce it.  What version of hex2000 do you use?  Please put all the inputs to hex2000 in a zip file and attach it to your next post.  This includes the .out files and the hex2000 command files.

    Thanks and regards,

    -George

  • George,

    I condensed the project down to basically boot and vectors. Since the problem occurs on all program sections.

    The target is a 2407a. The code is compiled under CCS3.3.82.13 with code generation tools 7.04. I have tried a couple of versions of the hex2000. I am currently using hex2000 utility from code tools 7.2.0

    I have included the debug folder for reference.

    Once the project is built; run “do_bin.bat” to convert the sections needed in the .out file into the binary file. I have the “fill” option commented out so I can confirm the fill is not the problem.

    From the map file you can see that “.boot” (_cinit) sections starts at 0x044 and has a length of 0x0F0.When you examine the .bin file you can see the code starts at 88 which is double of 44 which makes sense as the binary is in bytes (coming from words).

    From the map file you can see the section length is 0x0F0 (words). However, in the binary file the length is also 0x0F0 (it should be double for bytes). The origin is converted for bytes correctly, but the length is not converted (doubled). Consequently, only half of the code is in the binary file. The vectors section is also half the length it should be.

    With the file list (.lst) option on I could see the code compiled successfully and is complete.

    The assumption is that the issue is with the hex2000 tool as it handles the origin correctly but on the length, until proven otherwise.

    Also: is there an .out/coff file viewer available?

    ControlGenericSmallPoject.zip

  • Hi Kevin,

    George is currently away hence we will not be able to reply until his return early next week

    Also: is there an .out/coff file viewer available?

    You can try using the ofd2000 utility that is in the same location hex2000

    I attached the output when I ran ofd2000 on your out file:

    OBJECT FILE:  _STR.out
    
     Object File Information
    
        File Name:                 _STR.out                                  
        Format:                    TI-COFF Version 1                         
        File Type:                 executable file                           
        Time Stamp:                Wed Apr 13 18:57:00 2022                  
        Machine:                   unknown machine                           
        Machine Endian:            little endian                             
        Entry Point:               0x00000044                                
        Vendor:                    Texas Instruments, Inc.                   
        Tool Version:              0.0.0                                     
        Number of Sections:        15                                        
        File Length:               5427                                      
        Symbol Table File Offset:  0x00000d96                                
        String Table File Offset:  0x000014c2                                
        TI-COFF f_flags:           0x00001183                                
        TI-COFF f_flag:            F_RELFLG (relocation info stripped)       
        TI-COFF f_flag:            F_SYMMERGE (debug type information merged)
        CPU Generation:            0x8                                       
        Control Data Endian:       little endian                             
        Start of .text Section:    0x00000134                                
        Start of .data Section:    0x00000000                                
        Size of .text Section:     250                                       
        Size of .data Section:     0                                         
        Size of .bss Section:      1                                         
    
     Section Information
    
        id name                      page load addr  run addr   size align alloc
        -- ----                      ---- ---------  --------   ---- ----- -----
         1 .vectors                     0 0x00000000 0x00000000 0x2a     1   Y  
         2 .boot                        0 0x00000044 0x00000044 0xf0     1   Y  
         3 .cinit                       0 0x00000000 0x00000000  0x0     1   Y  
         4 .b2                          1 0x00000060 0x00000060  0x0     1   Y  
         5 .ramb2                       1 0x0000007b 0x0000007b  0x5     1   Y  
         6 .stack                       1 0x00000300 0x00000300 0x80     1   Y  
         7 .b1                          1 0x00000300 0x00000300  0x0     1   Y  
         8 .b0                          1 0x00000200 0x00000200  0x2     1   Y  
         9 .por                         1 0x000003fc 0x000003fc  0x4     1   Y  
        10 .DSsaram                     1 0x00000800 0x00000800  0x0     1   Y  
        11 .bss                         1 0x0000a000 0x0000a000  0x1     1   Y  
        12 .extRAM                      1 0x0000a000 0x0000a000  0x0     1   Y  
        13 .text                        0 0x00000134 0x00000134 0xfa     1   Y  
        14 .data                        1 0x00000000 0x00000000  0x0     1   Y  
        15 .c_mark                      1 0x00000000 0x00000000  0x0     1   Y  
    
     Line Number Table for Section 1 (".vectors")
    
        file   function  address     line
        ----   --------  -------     ----
        .file  $ASM$     0x00000000    61
        .file  $ASM$     0x00000002    62
        .file  $ASM$     0x00000004    63
        .file  $ASM$     0x00000006    64
        .file  $ASM$     0x00000008    65
        .file  $ASM$     0x0000000a    66
        .file  $ASM$     0x0000000c    67
        .file  $ASM$     0x00000022    69
        .file  $ASM$     0x00000024    70
        .file  $ASM$     0x00000026    71
        .file  $ASM$     0x00000027    72
        .file  $ASM$     0x00000028    74
    
     Line Number Table for Section 2 (".boot")
    
        file   function  address     line
        ----   --------  -------     ----
        .file  $ASM$     0x00000044   121
        .file  $ASM$     0x00000045   122
        .file  $ASM$     0x00000046   123
        .file  $ASM$     0x00000047   124
        .file  $ASM$     0x00000048   125
        .file  $ASM$     0x00000049   127
        .file  $ASM$     0x0000004a   128
        .file  $ASM$     0x0000004b   129
        .file  $ASM$     0x0000004c   131
        .file  $ASM$     0x0000004d   132
        .file  $ASM$     0x0000004e   134
        .file  $ASM$     0x0000004f   135
        .file  $ASM$     0x00000051   136
        .file  $ASM$     0x00000053   138
        .file  $ASM$     0x00000055   139
        .file  $ASM$     0x00000057   140
        .file  $ASM$     0x00000059   142
        .file  $ASM$     0x0000005b   144
        .file  $ASM$     0x0000005d   145
        .file  $ASM$     0x0000005f   148
        .file  $ASM$     0x00000060   149
        .file  $ASM$     0x00000062   150
        .file  $ASM$     0x00000064   161
        .file  $ASM$     0x00000065   162
        .file  $ASM$     0x00000066   163
        .file  $ASM$     0x00000067   164
        .file  $ASM$     0x00000069   167
        .file  $ASM$     0x0000006a   168
        .file  $ASM$     0x0000006c   175
        .file  $ASM$     0x0000006d   176
        .file  $ASM$     0x0000006f   177
        .file  $ASM$     0x00000070   178
        .file  $ASM$     0x00000072   181
        .file  $ASM$     0x00000073   182
        .file  $ASM$     0x00000075   186
        .file  $ASM$     0x00000076   187
        .file  $ASM$     0x00000078   188
        .file  $ASM$     0x00000079   189
        .file  $ASM$     0x0000007b   192
        .file  $ASM$     0x0000007c   193
        .file  $ASM$     0x0000007e   197
        .file  $ASM$     0x0000007f   198
        .file  $ASM$     0x00000081   199
        .file  $ASM$     0x00000082   200
        .file  $ASM$     0x00000084   203
        .file  $ASM$     0x00000085   204
        .file  $ASM$     0x00000087   210
        .file  $ASM$     0x00000088   211
        .file  $ASM$     0x00000089   212
        .file  $ASM$     0x0000008b   213
        .file  $ASM$     0x0000008d   215
        .file  $ASM$     0x0000008e   216
        .file  $ASM$     0x00000090   217
        .file  $ASM$     0x00000092   219
        .file  $ASM$     0x00000093   220
        .file  $ASM$     0x00000095   221
        .file  $ASM$     0x00000097   225
        .file  $ASM$     0x00000098   226
        .file  $ASM$     0x00000099   231
        .file  $ASM$     0x0000009a   232
        .file  $ASM$     0x0000009b   233
        .file  $ASM$     0x0000009d   234
        .file  $ASM$     0x0000009f   239
        .file  $ASM$     0x000000a0   240
        .file  $ASM$     0x000000a1   241
        .file  $ASM$     0x000000a3   242
        .file  $ASM$     0x000000a4   244
        .file  $ASM$     0x000000a5   245
        .file  $ASM$     0x000000a7   246
        .file  $ASM$     0x000000a8   248
        .file  $ASM$     0x000000a9   249
        .file  $ASM$     0x000000ab   250
        .file  $ASM$     0x000000ac   252
        .file  $ASM$     0x000000ad   253
        .file  $ASM$     0x000000af   254
        .file  $ASM$     0x000000b0   256
        .file  $ASM$     0x000000b1   257
        .file  $ASM$     0x000000b3   258
        .file  $ASM$     0x000000b5   260
        .file  $ASM$     0x000000b7   263
        .file  $ASM$     0x000000b8   264
        .file  $ASM$     0x000000b9   265
        .file  $ASM$     0x000000bb   266
        .file  $ASM$     0x000000bc   268
        .file  $ASM$     0x000000bd   269
        .file  $ASM$     0x000000bf   270
        .file  $ASM$     0x000000c0   272
        .file  $ASM$     0x000000c1   273
        .file  $ASM$     0x000000c3   274
        .file  $ASM$     0x000000c4   276
        .file  $ASM$     0x000000c5   277
        .file  $ASM$     0x000000c7   278
        .file  $ASM$     0x000000c8   280
        .file  $ASM$     0x000000c9   281
        .file  $ASM$     0x000000cb   282
        .file  $ASM$     0x000000cd   284
        .file  $ASM$     0x000000cf   286
        .file  $ASM$     0x000000d1   290
        .file  $ASM$     0x000000d2   291
        .file  $ASM$     0x000000d3   293
        .file  $ASM$     0x000000d5   294
        .file  $ASM$     0x000000d6   296
        .file  $ASM$     0x000000d8   297
        .file  $ASM$     0x000000d9   299
        .file  $ASM$     0x000000db   300
        .file  $ASM$     0x000000dc   308
        .file  $ASM$     0x000000de   309
        .file  $ASM$     0x000000e0   315
        .file  $ASM$     0x000000e1   316
        .file  $ASM$     0x000000e2   318
        .file  $ASM$     0x000000e3   321
        .file  $ASM$     0x000000e4   327
        .file  $ASM$     0x000000e6   328
        .file  $ASM$     0x000000e7   329
        .file  $ASM$     0x000000e9   331
        .file  $ASM$     0x000000eb   339
        .file  $ASM$     0x000000ec   340
        .file  $ASM$     0x000000ee   366
        .file  $ASM$     0x000000ef   367
        .file  $ASM$     0x000000f1   368
        .file  $ASM$     0x000000f2   375
        .file  $ASM$     0x000000f3   376
        .file  $ASM$     0x000000f4   377
        .file  $ASM$     0x000000f5   379
        .file  $ASM$     0x000000f6   380
        .file  $ASM$     0x000000f7   381
        .file  $ASM$     0x000000f9   386
        .file  $ASM$     0x000000fa   387
        .file  $ASM$     0x000000fb   388
        .file  $ASM$     0x000000fc   394
        .file  $ASM$     0x000000fd   395
        .file  $ASM$     0x000000fe   396
        .file  $ASM$     0x00000100   398
        .file  $ASM$     0x00000101   399
        .file  $ASM$     0x00000103   405
        .file  $ASM$     0x00000104   427
        .file  $ASM$     0x00000105   428
        .file  $ASM$     0x00000107   429
        .file  $ASM$     0x00000109   430
        .file  $ASM$     0x0000010b   432
        .file  $ASM$     0x0000010d   433
        .file  $ASM$     0x0000010f   434
        .file  $ASM$     0x00000111   435
        .file  $ASM$     0x00000113   436
        .file  $ASM$     0x00000115   437
        .file  $ASM$     0x00000117   438
        .file  $ASM$     0x00000118   133
        .file  $ASM$     0x00000119   134
        .file  $ASM$     0x0000011b   136
        .file  $ASM$     0x0000011c   137
        .file  $ASM$     0x0000011e   140
        .file  $ASM$     0x0000011f   141
        .file  $ASM$     0x00000120   142
        .file  $ASM$     0x00000121   144
        .file  $ASM$     0x00000122   145
        .file  $ASM$     0x00000123   146
        .file  $ASM$     0x00000124   147
        .file  $ASM$     0x00000126   150
        .file  $ASM$     0x00000127   151
        .file  $ASM$     0x00000128   159
        .file  $ASM$     0x00000129   160
        .file  $ASM$     0x0000012b   161
        .file  $ASM$     0x0000012c   162
        .file  $ASM$     0x0000012e   165
        .file  $ASM$     0x0000012f   166
        .file  $ASM$     0x00000131   167
        .file  $ASM$     0x00000132   164
    
     Line Number Table for Section 13 (".text")
    
        file   function  address     line
        ----   --------  -------     ----
        .file  $ASM$     0x00000134   182
        .file  $ASM$     0x00000136   183
        .file  $ASM$     0x00000137   184
        .file  $ASM$     0x00000139   185
        .file  $ASM$     0x0000013b   189
        .file  $ASM$     0x0000013d   190
        .file  $ASM$     0x0000013e   191
        .file  $ASM$     0x00000140   192
        .file  $ASM$     0x00000142   196
        .file  $ASM$     0x00000144   197
        .file  $ASM$     0x00000145   198
        .file  $ASM$     0x00000147   199
        .file  $ASM$     0x00000149   203
        .file  $ASM$     0x0000014b   204
        .file  $ASM$     0x0000014c   205
        .file  $ASM$     0x0000014e   206
        .file  $ASM$     0x00000150   210
        .file  $ASM$     0x00000152   211
        .file  $ASM$     0x00000153   212
        .file  $ASM$     0x00000155   213
        .file  $ASM$     0x00000157   217
        .file  $ASM$     0x00000159   218
        .file  $ASM$     0x0000015a   219
        .file  $ASM$     0x0000015c   220
        .file  $ASM$     0x0000015e   224
        .file  $ASM$     0x00000160   225
        .file  $ASM$     0x00000161   226
        .file  $ASM$     0x00000163   227
        .file  $ASM$     0x00000164   228
        .file  $ASM$     0x00000166   229
        .file  $ASM$     0x00000168   233
        .file  $ASM$     0x0000016a   234
        .file  $ASM$     0x0000016b   235
        .file  $ASM$     0x0000016d   236
        .file  $ASM$     0x0000016e   237
        .file  $ASM$     0x00000170   238
        .file  $ASM$     0x00000172   243
        .file  $ASM$     0x00000173   244
        .file  $ASM$     0x00000174   245
        .file  $ASM$     0x00000175   246
        .file  $ASM$     0x00000176   247
        .file  $ASM$     0x00000177   248
        .file  $ASM$     0x00000179   249
        .file  $ASM$     0x0000017a   256
        .file  $ASM$     0x0000017c   257
        .file  $ASM$     0x0000017e   258
        .file  $ASM$     0x00000180   259
        .file  $ASM$     0x00000182   260
        .file  $ASM$     0x00000184   261
        .file  $ASM$     0x00000186   262
        .file  $ASM$     0x00000188   263
        .file  $ASM$     0x0000018a   264
        .file  $ASM$     0x0000018c   265
        .file  $ASM$     0x0000018e   266
        .file  $ASM$     0x00000190   267
        .file  $ASM$     0x00000192   268
        .file  $ASM$     0x00000194   269
        .file  $ASM$     0x00000196   270
        .file  $ASM$     0x00000198   271
        .file  $ASM$     0x0000019a   272
        .file  $ASM$     0x0000019c   273
        .file  $ASM$     0x0000019e   274
        .file  $ASM$     0x000001a0   275
        .file  $ASM$     0x000001a2   276
        .file  $ASM$     0x000001a4   277
        .file  $ASM$     0x000001a6   278
        .file  $ASM$     0x000001a8   279
        .file  $ASM$     0x000001aa   280
        .file  $ASM$     0x000001ac   281
        .file  $ASM$     0x000001ae   282
        .file  $ASM$     0x000001b0   283
        .file  $ASM$     0x000001b2   284
        .file  $ASM$     0x000001b4   285
        .file  $ASM$     0x000001b6   286
        .file  $ASM$     0x000001b8   287
        .file  $ASM$     0x000001ba   288
        .file  $ASM$     0x000001bc   289
        .file  $ASM$     0x000001be   290
        .file  $ASM$     0x000001c0   291
        .file  $ASM$     0x000001c2   292
        .file  $ASM$     0x000001c4   293
        .file  $ASM$     0x000001c6   294
        .file  $ASM$     0x000001c8   295
        .file  $ASM$     0x000001ca   296
        .file  $ASM$     0x000001cc   297
        .file  $ASM$     0x000001ce   298
        .file  $ASM$     0x000001d0   299
        .file  $ASM$     0x000001d2   300
        .file  $ASM$     0x000001d4   301
        .file  $ASM$     0x000001d6   302
        .file  $ASM$     0x000001d8   303
        .file  $ASM$     0x000001da   304
        .file  $ASM$     0x000001dc   305
        .file  $ASM$     0x000001de   306
        .file  $ASM$     0x000001e0   307
        .file  $ASM$     0x000001e2   308
        .file  $ASM$     0x000001e4   309
        .file  $ASM$     0x000001e6   310
        .file  $ASM$     0x000001e8   311
        .file  $ASM$     0x000001ea   312
        .file  $ASM$     0x000001ec   313
        .file  $ASM$     0x000001ee   314
        .file  $ASM$     0x000001f0   315
        .file  $ASM$     0x000001f2   316
        .file  $ASM$     0x000001f4   317
        .file  $ASM$     0x000001f6   318
        .file  $ASM$     0x000001f8   319
        .file  $ASM$     0x000001fa   320
        .file  $ASM$     0x000001fc   321
        .file  $ASM$     0x000001fe   352
    
     Symbol Table
    
         id name            value      kind     section         binding type   
         -- ----            -----      ----     -------         ------- ----   
          0 .file           0x00000017 debug    N/A             local   file   
          2 __const_load    0x00000000 defined  .c_mark         local   object 
          3 $ASM$           0x00000044 defined  .boot           local   object 
          5 .bf             0x00000044 defined  .boot           local   object 
          7 .ef             0x00000118 defined  .boot           local   object 
          9 .text           0x00000134 defined  .text           local   section
         11 .data           0x00000000 defined  .data           local   section
         13 .bss            0x0000a000 defined  .bss            local   section
         15 .por            0x000003fc defined  .por            local   section
         17 .c_mark         0x00000000 defined  .c_mark         local   section
         19 .stack          0x00000300 defined  .stack          local   section
         21 .boot           0x00000044 defined  .boot           local   section
         23 .file           0x00000029 debug    N/A             local   file   
         25 $ASM$           0x00000118 defined  .boot           local   object 
         27 .bf             0x00000118 defined  .boot           local   object 
         29 .ef             0x00000132 defined  .boot           local   object 
         31 .text           0x00000134 defined  .text           local   section
         33 .data           0x00000000 defined  .data           local   section
         35 .bss            0x0000a001 defined  .bss            local   section
         37 .ramb2          0x0000007b defined  .ramb2          local   section
         39 .boot           0x00000118 defined  .boot           local   section
         41 .file           0x00000049 debug    N/A             local   file   
         43 $ASM$           0x00000134 defined  .text           local   object 
         45 .bf             0x00000134 defined  .text           local   object 
         47 .ef             0x00000200 defined  .text           local   object 
         49 $ASM$           0x00000000 defined  .vectors        local   object 
         51 .bf             0x00000000 defined  .vectors        local   object 
         53 .ef             0x0000002a defined  .vectors        local   object 
         55 $ASM$           0x00000132 defined  .boot           local   object 
         57 .bf             0x00000132 defined  .boot           local   object 
         59 .ef             0x00000134 defined  .boot           local   object 
         61 .text           0x00000134 defined  .text           local   section
         63 .data           0x00000000 defined  .data           local   section
         65 .bss            0x0000a001 defined  .bss            local   section
         67 .b0             0x00000200 defined  .b0             local   section
         69 .vectors        0x00000000 defined  .vectors        local   section
         71 .boot           0x00000132 defined  .boot           local   section
         73 .file           0x00000051 debug    N/A             local   file   
         75 .text           0x00000200 defined  .text           local   section
         77 .data           0x00000000 defined  .data           local   section
         79 .bss            0x0000a001 defined  .bss            local   section
         81 _c_int0         0x00000044 defined  .boot           global  object 
         82 _Boot_InitDigio 0x00000104 defined  .boot           global  object 
         83 _GoodReset      0x000003ff defined  .por            global  object 
         84 cinit           0xffffffff absolute N/A             global  none   
         85 _mS_DELAY       0x00000118 defined  .boot           global  object 
         86 _RamOK          0x0000007d defined  .ramb2          global  object 
         87 RamFailAt       0x0000007e defined  .ramb2          global  object 
         88 _ClearNovram    0x00000128 defined  .boot           global  object 
         89 TestWord        0x0000007f defined  .ramb2          global  object 
         90 _IntSource      0x00000201 defined  .b0             global  object 
         91 _IntChannel     0x00000200 defined  .b0             global  object 
         92 I$$SAVE         0x00000200 defined  .text           global  object 
         93 I$$REST         0x00000218 defined  .text           global  object 
         94 __STACK_SIZE    0x00000080 absolute N/A             global  none   
         95 .bss            0x0000a000 defined  .bss            global  object 
         96 end             0x0000a001 defined  .bss            global  object 
         97 .text           0x00000134 defined  .text           global  object 
         98 etext           0x0000022e defined  .text           global  object 
         99 .data           0x00000000 defined  .data           global  object 
        100 edata           0x00000000 defined  .data           global  object 
        101 pinit           0xffffffff absolute N/A             global  none   
    
     String Table
    
        offset  string           
        ------  ------           
             4  "__const_load"   
            17  "_Boot_InitDigio"
            33  "_GoodReset"     
            44  "_mS_DELAY"      
            54  "RamFailAt"      
            64  "_ClearNovram"   
            77  "_IntSource"     
            88  "_IntChannel"    
           100  "__STACK_SIZE"   
    

    Thanks

    ki

  • Using the utility to examine the coff file from this project and another project where the we are converter to binary for a different DSP and 7_2_0 CGTs (as opposed the the 7_04 CGT for the 2407A). They only glaring difference is the coff version is 1 for the 2407A project and 2 for the working project. Note the size of .boot is 0x349 which agrees with the .map file.

    BTW: Using the newer hex2000 (7_2_0) produces the same results in the bin file (half the code is missing). So this seems to be pointing to the hex2000 utility not handling this right.

  • George,

    With CCS3.3 build options I changed the Coff output version from V1 to V2 hoping this might fix the issue. It did not. I still only see half of the code in the binary file. The issue still seems to be with the hex2000 utility.

    George,  Were you able to reproduce the issue with the code I sent? Any ideas?

    In the upper right it shows a status of Resolved. Wondering why this has been marked as resolved as the problem is still there. This issue is not resolved.

  • I cannot test it to be certain, but I suspect removing these lines from STR_DSP2bin_FP0.CMD ...

    SECTIONS
    {
            .vectors .boot .cinit
    }

    ... fixes the problem.  That SECTIONS directive tells the hex utility to only convert those sections.  But you need the .text section too.  Actually, you need all the initialized sections.  By removing the SECTIONS directive, that's what happens.

    Please let me know if this suggestion resolves the problem.

    Thanks and regards,

    -George

  • I only want these sections to be put in one binary and other sections into another binary (part of a dual page scheme).

    If you look at the .boot section you will see its origin as 44 (cinit) and a length of 0xf0 (in the map file or the output of the coff reading tool ofd2000). When the binary is created it puts the section at 88 (x2 for bytes, good) but the length is still 0xf0 (the number was NOT multiplied by 2 for bytes, bad). You can see this in the files I sent you. The result is half of the code is missing. The vectors section also has the same problem (all the sections). 

  • Hi George, Were you able to reproduce the issue with the files I sent?

  • This thread is now being discussed in private messages.  Once it is complete, I'll post a summary here.  For now, I'll mark it resolved, even though that isn't really the case.

    Thanks and regards,

    -George

  • We found a solution.  It involves using the hex utility that comes with the old C24x toolset.  I do not plan to put the details here, because that toolset has not been supported for a very long time, and I do not want anyone else to consider using it.

    Thanks and regards,

    -George