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.

[参考译文] TMS320F28379D:链接器命令问题

Guru**** 2465890 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1490468/tms320f28379d-linker-cmd-question

器件型号:TMS320F28379D

工具与软件:

尊敬的 TI 支持部门:

我对在链接器命令(.cmd)文件中使用 GROUP 和 SECTIONS 有疑问。

在我的命令文件中、我声明了一个将命令文件中其他地方未明确定义的两个段组合在一起的组。 当我使用 pragma 指令创建缓冲区时#pragma DATA_SECTION(),它似乎工作正常。 缓冲区数据实际上放置在定义的组中、即使仅在该组中声明各个段也是如此。

令我惊讶的是、我尚未明确定义这些段的起始地址和结束地址。 之前、我一直假设这些段需要具有明确定义的地址、类似于以下示例:

RAMGS7 : origin = 0x013000, length = 0x001000

在此代码中、我尝试为ANALOG_TRIM组内的段定义 start 和 end 变量、以跟踪此段使用的大小。 但是、链接器似乎不接受此方法、并会生成以下警告:

#10068-D no matching section

这是我将使用的链接器代码片段:

GROUP : LOAD = FLASHN1,
         RUN = RAMGS14_1,
         LOAD_START(_IdentLoadStart),
         LOAD_END(_IdentLoadEnd),
         RUN_START(_IdentRunStart),
         LOAD_SIZE(_IdentLoadSize),
         PAGE = 0, ALIGN(8)
	{
	    SW_IDENTIFICATION : {

	         _swIdentStart = .;            /* Marque le début de SW_IDENTIFICATION */
	         *(.sw_identification)          /* Regroupe les fragments .sw_identification */
	         *(.sw_identification*)         /* Regroupe tous les fragments commençant par .sw_identification */
	         _swIdentEnd = .;              /* Marque la fin de SW_IDENTIFICATION */
	    }

	    ANALOG_TRIM : {
	         _analogTrimStart = .;          /* Marque le début de ANALOG_TRIM */
	         *(.analog_trim)                /* Regroupe les fragments .analog_trim */
	         *(.analog_trim*)               /* Regroupe tous les fragments commençant par .analog_trim */
	         _analogTrimEnd = .;            /* Marque la fin de ANALOG_TRIM */
	    }
	}

您能否说明链接器生成此警告的原因、并确认我对段定义和分组的理解是否正确?

感谢您的帮助。

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

    您好!

    请看一下链接器 cmd 文件文档- TI 链接器命令文件入门

    此外、请查看 SDK 中存在的链接器 cmd 文件以获取参考-C2000Ware_5_04_00_00\device_support\f2837xd\common\cmd

    谢谢

    Aswin