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.

TMS320F28388D: Discrepancy Between ARM Map File and Code

Part Number: TMS320F28388D

Greetings,

I have written some assembly code for the ARM core, and when I look at the address in the map file, it is always 1 more than what CCS burns into the flash.  Do you know what causes this?

Thank you,

Ed

  • Hello Ed,

    Are you keeping in mind that ARM is byte addressable and while the C28x core is word addressable (16-bits per word)? This is the main reason for the difference between the ARM and C28 memory addresses.

  • Hi Omer,

    Yes I am.  I am comparing the addresses in the map file which was generated by the ARM linker with the addresses which are burned in the flash by the CCS debugger.  Specifically, I'm looking at one of the labels I created in an assembly file and where the map file says it should be vs where the debugger put it.  I suspect that the debugger is correct because the linker has placed the instruction where the cmd file has specified.

    Thanks,

    Ed

  • Hello Ed,

    Can you show what this difference is with actual screenshots? It's difficult for me to understand your question purely through description.

  • Hi Omer,

    Here is a screen shot.  I have erased our IP.  In the spots where it says, "$C:/", you can substitute "_codeStart".  The disassembly and memory windows show the correct address.  The map file shows an address which is 1 higher.  I don't know if it matters, but the file in which _codeStart and its associated code resides is an assembly file.

    Thanks,

    Ed

  • When the Arm CPU calls a function (usually with the BLX instruction) , the LSB (least significant bit) of the address is used to know whether to change between Arm and Thumb.  When the LSB is 1, it is a Thumb function.  When the LSB is 0, it is an Arm function.  Thus, if the LSB of the address for the label _codeStart is 1, then it is a Thumb function.  This distinction between states is not reflected in the Disassembly or Memory Browser.

    Thanks and regards,

    -George

  • Hi George,

    That makes sense.  The assembly file which contains that routine has a .thumb directive in it.

    When the BLX instruction is executed, does it need to use the address with bit 0 set to 1?

    Thank you,

    Ed

  • When the BLX instruction is executed, does it need to use the address with bit 0 set to 1?

    Yes.  -George

  • I made that change, and that solved the other issue I've been having with the ARM core locking up.  I need to do some more testing, and then I can close that one too.

    Thank you for your help,

    Ed