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.

[参考译文] TM4C129EKCPDT:操作链接命令文件

Guru**** 1821780 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1258604/tm4c129ekcpdt-manipulate-link-command-file

器件型号:TM4C129EKCPDT

您好!

我当时正在尝试将我的项目从 GNU GCC 迁移到 TI CCS。 我的原始工程在链接脚本文件中有一些特殊代码、用于向链接的映像插入一些自定义信息、以便可以由我们自己的软件实用程序处理该映像以进行加密。  

链接脚本文件中的特殊代码

   。 = 0x120;                           
   __image_header =.;
   *(图像头)                         /*图像头*/
   生效(。 !=__ image_header、"未定义图像标头");
   长整型(__image_total_size)                /*后跟图像长度*/
   长整型(0x204E4942)                      /*纯文本签名*/
   长整型(__image_header_end -__image_header)   /*图像标题长度*/
   长(0)                            /*纯文本校验和*/
   长(0)                            /*密文校验和*/
   ___ image_header_end =.;

如果我将上述代码插入链接命令文件、CCS 编译器将不接受这些代码。 由于缺乏有关 CCS 链接命令文件的信息、我的问题是:CCS 中是否有等效的方法向映像插入4字节值、

长(0)

或  

长整型(__image_header_end -__image_header)

这甚至可能采用一些链接级变量而不是常量值。

谢谢

天磊