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.

Problem in the utility hex55.exe

I am using CCS 3.3 for a long time. But one day I ran into a problem: the utility hex55.exe, until that time, worked flawlessly, has formed a bin file, which was not operational. Deep analysis has shown that such a situation has arisen because compiler made section with odd length. I took a new version of a file from SSS55, but the problem remained. Here is a report with the problem:

1) Location of erroneous sections

seg_addr = 01bf60 seg_len = 330c
seg_addr = 00d49c seg_len = 074d
fake detected one

seg_addr = 023dd0 seg_len = 1c1c
seg_addr = 009c2a seg_len = 0006
seg_addr = 00dbe9 seg_len = 072c
fake detected two

seg_addr = 00eec0 seg_len = 0042
seg_addr = 0050c0 seg_len = 4b6a
seg_addr = a00000 seg_len = cf80
seg_addr = a0cf80 seg_len = 0350
seg_addr = a0d2d0 seg_len = 000c
seg_addr = 027b00 seg_len = 0100
seg_addr = 021968 seg_len = 2462
seg_addr = 027d80 seg_len = 0124
seg_addr = 026fd4 seg_len = 0816
seg_addr = 0259ec seg_len = 15e8
seg_addr = 0277ea seg_len = 02bc
seg_addr = 01f270 seg_len = 26f6
seg_addr = a10100 seg_len = 3c12

1) Section 00d49c

/ / Disassembler (end of the section)
...
00DBE2 4e01 AADD # 1, SP
00DBE4 46a2 BCLR ST1_M40
00DBE6 4804 RET
00DBE8 20 NOP

/ / MAP-file
daram_sect * 0000d49c 0000074d
0000d49c 000002d3
0000d76f 00000086
0000d7f5 00000360
0000db55 00000013
0000db68 00000080
0000dbe8 00000001 * - HOLE - [fill = 20]

/ / BIN-file
003a6a: 4E 01 46 48 04 A2
003a70: 20 20

The problem in the last two bytes filling 0x20, although by the MAP-file should be one. Section length is indicated with the only one byte filling.
Solution: Change the size of the section on 0000074e

2) Section 00dbe9

/ / Disassembler
00DBE8 20 NOP

00DBE9 3ca9 MOV # 10, AR1
00DBEB 4608 EALLOW
00DBED 76004b08 MOV # 75, AC0
...

/ / MAP-file
. Rtdx_text * 0000dbe9 0000072c
0000dbe9 000003d3
0000dfbc 000002cb
0000e287 00000045
0000e2cc 00000048
0000e314 00000001 * - HOLE - [fill = 20]

/ / BIN-file
0056a4: 00 00 07 2C / / length
0056a8: 00 00 DB E9 / / address
0056as 20 3C A9 46 08 76 00 4B 08 ... / / Data

The problem in the first byte 0x20, which really should be located at 00dbe8. At the end of the section added the two filling bytes 0x20, although the length of the section is taken into account only one byte.
Solution: Change the address of the start of the section on 00dbe8, two bytes at the end of the filling removed.

After my patch code work properly.
This is a problem Texas Instruments?

  • So, to summarize, your complaint is that, near address 0x0000e314, the .bin file has two NOP (byte value 0x20) instructions where there should be only one.  Is that correct?  We have to be able to reproduce this ourselves before we can do anything else.  Please indicate which version of tools you are using, and send everything used as an input to the hex utility, i.e. the exact options, .out file, any command files.  

    Thanks and regards,

    -George