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.

Hex6x -b option ignoring paddr?

Hi,

I'm using CCS3.3 targeting a C6455, and have got two versions of hex6x.exe - 6.0.8 and 6.1.22. Both are giving the same issues converting an .out to a flat binary. My .out has five code sections, namely .switch, .vectors, .kernel, .fasttext and .text. I'm trying to place these sections at known locations in my binary image so that I can blow it into flash. None of the sections are full, so there should be gaps between them. My hex6x command file is as follows.

MyProg.out

-b

-byte

-memwidth 8

-romwidth 8

-order L

-map MyProg.map

ROMS { EPROM: org=0x0, length = 0x040000, files = {MyProg.bin} }

SECTIONS { .switch  : paddr=0x00000 .vectors : paddr=0x00700 .kernel  : paddr=0x00AA0 .fasttext: paddr=0x00DA0 .text    : paddr=0x08700 }

The .map file says hex6x has placed the sections where I want them, but the binary is incorrect and doesn't look like what the map file says it does. it seems that hex6x just concatonates all the sections together into one long binary file, ignoring the paddr statements for each section.  If I include the -image parameter, then the correct binatry is produced, with gaps, but, I end up with a file the size of my ROMS declaration (0x40000 bytes long). This is no good for me - I need the binary to end at the end of my .text section.

If I change the -b parameter to -i, and output an intel hex, and then use an intel hex to flat binary converter, I do get what I want. Infact that's what I've been doing for the past 5 years.

I know CCS3.3 is old, and the -b option is undocumented, but is there a way to get hex6x to do what I want?

Cheers

Malcolm