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.

TMS570LC4357: TI ARM CGT linker: how to include cmd file in other cmd file

Part Number: TMS570LC4357

I was told to ask my question here, therefore I repeat it (TMS570LC4357: TI ARM CGT linker: how to include cmd file in other cmd file - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums).

Hello,

how can one include a cmd file in another cmd file?

e.g., one has a file "some/path/a.cmd" and a file "other/path/b.cmd".

I want to write in "b.cmd":

#include "a.cmd"
// or something similar to achieve the same

How to achieve this?

  • Use #include just like you do in your example above.  Invoke the linker ...

    armcl --include_path=some/path --run_linker same as before

    Note how --include_path (or -I for short) comes before --run_linker (or -z for short).

    For details, please search the TI ARM assembly tools manual for the sub-chapter titled Linker Command File Preprocessing.  Unfortunately, there is an error in the document.  The description of how to specify the path to the include file is wrong.  Do it as I describe in this post.  I filed the entry EXT_EP-10757 to have the documentation corrected.

    Thanks and regards,

    -George