MSP430F5359: Where can I find the specific Linker Command files (.cmd files) for the MSP-CGT development environment?

Part Number: MSP430F5359
Other Parts Discussed in Thread: MSP-CGT,

Tool/software:

We usually develop using the IAR toolchain.

But for a side project, I want to use TI's MSP-CGT environment.

I've successfully downloaded the tools and now have a directory with a ./bin subdirectory full of executables, a ./include subdirectory full of headers, and a ./lib subdirectory that contains:

-rw-r--r-- 1 7440 Sep 23 2022 lib/libc.a
-rw-r--r-- 1 3597 Sep 23 2022 lib/lnk.cmd
-rw-r--r-- 1 3735 Sep 23 2022 lib/lnkx.cmd
-rw-r--r-- 1 3936 Sep 23 2022 lib/lnkxl.cmd
-rw-r--r-- 1 1720012 Sep 23 2022 lib/mklib
-rw-r--r-- 1 68839 Sep 23 2022 lib/mklib.c
-rwxr-xr-x 1 382064 Sep 23 2022 lib/mklib.exe
-rw-r--r-- 1 29387168 Sep 23 2022 lib/rts430_eabi.lib
-rw-r--r-- 1 29246898 Sep 23 2022 lib/rts430x_lc_rd_eabi.lib
-rw-r--r-- 1 29235266 Sep 23 2022 lib/rts430x_lc_sd_eabi.lib
drwxr-xr-x 1 0 Jan 28 14:45 lib/src

And with these, I've successfully compiled my hello.c “Hello World!” program and converted the elf image to a TI .txt file. But it's linked for some default MSP430 described by one of those three link.cmd files contained in the ./lib subdirectory.

Apparently, I need a linker command file (.cmd file) that describes the memory layout of my particular MSP430F5359. From whence do these linker command files come? Do I need to download another installer from somewhere?

  • On my system, they're in "c:\ti\ccs1240\ccs\ccs_base\msp430\include\*.cmd".

    You would tell the linker about "lnk_msp430f5359.cmd", and at the end that branches off to "msp430f5359.cmd".

    When you create a new project, CCS normally adds a copy of the "lnk_<mumble>.cmd" to it.

  • Ahh! I didn't download Code Composer Studio; I guess I will; thanks!

    (Time passes)

    And now, having done that, I have:

    -rw-r--r-- 1  14697 Jan 22 17:01 ./ccs2002/ccs/ccs_base/msp430/include/lnk_msp430f5359.cmd
    -rw-r--r-- 1  30582 Jan 22 17:01 ./ccs2002/ccs/ccs_base/msp430/include/msp430f5359.cmd

    So lnk_msp430f5359.cmd defines the memory regions, the Interrupt Vectors, and the Reset Vector. Then it invokes msp430f5359.cmd which defines all the peripherals.

    So at the end of my compile / link / convert_to_TI_hex process, I've now got an image that looks correct for my MSP430F5359!

    Thanks again; I think I'm all set now!

  • Today, I can confirm that I'm all set. I've now got quite a complex program building, loading, and executing successfully/correctly in the CGT environment.

**Attention** This is a public forum