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.

F28M36P63C2: Hex file ROM size and alignment

Part Number: F28M36P63C2


i am parsing HEX files and cannot get the alignment correct. When it attempts to write to a odd address it is still FFFF in the memory browser.

Data record: Bytes: 06 Address: 00139AE0 CRC: 82 Data: 76 1A FF 69 00 06
Data record: Bytes: 20 Address: 00139AE3 CRC: 61 Data: 00 73 00 77 00 7A 00 7E 00 82 00 86 00 8A 00 8E 00 92 00 96 00 9A 00 9E 00 A2 00 A6 00 AA 00 AE
Data record: Bytes: 20 Address: 00139AF3 CRC: 4A Data: 00 B3 00 B7 00 BB 00 BF 00 C3 00 C7 00 CB 00 CF 00 D3 00 D7 00 DA 00 DE 00 E2 00 E6 00 EA 00 ED
Data record: Bytes: 20 Address: 00139B03 CRC: 9B Data: 00 F1 00 F4 00 F8 00 FB 00 FF 01 02 01 06 01 09 01 0C 01 0F 01 12 01 15 01 18 01 1B 01 1E 01 21
Data record: Bytes: 20 Address: 00139B13 CRC: BC Data: 01 24 01 27 01 29 01 2C 01 2E 01 31 01 33 01 36 01 38 01 3A 01 3D 01 3F 01 41 01 43 01 45 01 47

I have the following flags set in the hex utility:

--romwidth=16 --intel

i am using ALIGN(4) in my linker.

This code gets placed correctly when used with the debugger but the hex does not work. Are there any additional flags I can set when generating the hex to force the correct alignment?

I appreciate any help. Thanks!

  • I need a test case which allows me to reproduce the problem.  Please supply the following.

    • The version of the hex utility.  Note this is the same as the version of the compiler, but different from the version of CCS.
    • Show exactly how the hex utility is invoked
    • All the input files the hex utility sees.  Put them in a zip file and attach it to your next post.  Even if it is just one file.

    In addition, show a few lines of the hex utility output starting just before address 0x00139AE0.  Describe how this is different from what you expect, what problem this causes, and why.

    Thanks and regards,

    -George

  • I have been out for the holidays but thank you for the reply.

    I am using a custom hex parsing program but the issue is how CCS is creating it. I dont believe it should be starting the line with an odd address.

    When this is done the micro controller tries to write to and odd address and fails. Is this the correct thinking?

  • I found that there were additional libraries that had respective linker files. Once I hunted these down and aligned them everything was placed correctly. I appreciate your attention.