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.
工具与软件:
我们通常使用 IAR 工具链进行开发。
但对于附带项目、我想使用 TI 的 MSP-CGT 环境。
我已经成功下载了这些工具、现在有一个包含./bin 子目录(包含可执行文件)、./include 子目录(包含头文件)和./lib 子目录(包含以下内容)的目录:
-rw-r--r-- 1 7440九月23 2022 lib/libc.a.
-rw-r--r-- 1 3597 Sep 23 2022 lib/lnk.cmd
-rw-r--r-- 1 3735九月23 2022 lib/lnkx.cmd
-rw-r--r-- 1 3936 Sep 23 2022 lib/lnkxl.cmd
-rw-r--r-- 1 1720012 9月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 sp 23 2022 lib/rts430_eabi.lib
-rw-r--r- 1 29246898 sp 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
借助这些代码、我成功编译了 hello.c 的"Hello World!" 编程并将 elf 映像转换为 TI .txt 文件。 但是、它的链接针对某些默认 MSP430、该 MSP430由./lib 子目录中包含的三个 link.cmd 文件之一描述。
显然、我需要一个描述我的特定 MSP430F5359的内存布局的连接器命令文件(.cmd 文件)。 这些链接器命令文件从何而来? 我是否需要从某个位置下载另一个安装程序?
在我的系统上、它们位于"c:\ti\ccs1240\ccs\ccs_base\msp430\include\*。cmd"中。
您会告诉链接器"lnk_msp430f5359.cmd"、并在结尾跳转到 "msp430f5359.cmd"。
在你创建一个新项目时、CCS 通常添加一个"lnk_"副本 添加了.cmd"。
啊! 我没有下载 Code Composer Studio;我想会的;谢谢!
(时间)
现在、完成这些之后、我有:
-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_base/msp430/include/msp430f5359.cmd
因此、lnk_msp430f5359.cmd 定义存储器区域、中断矢量和复位矢量。 然后调用 定义所有外设的 msp430f5359.cmd。
在我的编译/链接/ convert_to_TI_hex 过程结束时、我的 MSP430F5359图像看起来正确!
再次感谢;我想我现在都准备好了!
今天、我可以确认已经设置好了。 现在我已经在 CGT 环境中成功/正确地建立、加载和执行了相当复杂的程序。