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.

[参考译文] TMS320F28388D:链接器文件错误

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1115371/tms320f28388d-linker-file-errors

器件型号:TMS320F28388D

您好!

我正在尝试在应用程序的示例之一中重新使用链接器文件、但遇到了各种错误。  

谢谢、

Jagbir

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

    MEMORY
    {
       /* BEGIN is used for the "boot to SARAM" bootloader mode   */
       BEGIN            : origin = 0x000000, length = 0x000002
       BOOT_RSVD        : origin = 0x000002, length = 0x0001AF     /* Part of M0, BOOT rom will use this for stack */
       RAMM0            : origin = 0x0001B1, length = 0x00024F
       RAMM1            : origin = 0x000400, length = 0x0003F8     /* on-chip RAM block M1 */
    //   RAMM1_RSVD       : origin = 0x0007F8, length = 0x000008     /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
       RAMD01           : origin = 0x00C000, length = 0x001000
       RAMLS02          : origin = 0x008000, length = 0x001800
       RAMLS3           : origin = 0x009800, length = 0x000800
       RAMLS4           : origin = 0x00A000, length = 0x000800
       RAMLS56          : origin = 0x00A800, length = 0x001000
       RAMLS7           : origin = 0x00B800, length = 0x000800
       RAMGS0           : origin = 0x00D000, length = 0x001000
       RAMGS1           : origin = 0x00E000, length = 0x001000
       RAMGS2           : origin = 0x00F000, length = 0x001000
       RAMGS3           : origin = 0x010000, length = 0x001000
       RAMGS4           : origin = 0x011000, length = 0x001000
       RAMGS5           : origin = 0x012000, length = 0x001000
       RAMGS6           : origin = 0x013000, length = 0x001000
       RAMGS7           : origin = 0x014000, length = 0x001000
       RAMGS8           : origin = 0x015000, length = 0x001000
       RAMGS9           : origin = 0x016000, length = 0x001000
       RAMGS101112      : origin = 0x017000, length = 0x003000
       RAMGS13          : origin = 0x01A000, length = 0x001000
       RAMGS14          : origin = 0x01B000, length = 0x001000
       RAMGS15          : origin = 0x01C000, length = 0x000FF8
    //   RAMGS15_RSVD     : origin = 0x01CFF8, length = 0x000008     /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    
       /* Flash sectors */
       FLASH0           : origin = 0x080000, length = 0x002000	/* on-chip Flash */
       FLASH1           : origin = 0x082000, length = 0x002000	/* on-chip Flash */
       FLASH2           : origin = 0x084000, length = 0x002000	/* on-chip Flash */
       FLASH3           : origin = 0x086000, length = 0x002000	/* on-chip Flash */
       FLASH4           : origin = 0x088000, length = 0x008000	/* on-chip Flash */
       FLASH5           : origin = 0x090000, length = 0x008000	/* on-chip Flash */
       FLASH6           : origin = 0x098000, length = 0x008000	/* on-chip Flash */
       FLASH7           : origin = 0x0A0000, length = 0x008000	/* on-chip Flash */
       FLASH8           : origin = 0x0A8000, length = 0x008000	/* on-chip Flash */
       FLASH9           : origin = 0x0B0000, length = 0x008000	/* on-chip Flash */
       FLASH10          : origin = 0x0B8000, length = 0x002000	/* on-chip Flash */
       FLASH11          : origin = 0x0BA000, length = 0x002000	/* on-chip Flash */
       FLASH12          : origin = 0x0BC000, length = 0x002000	/* on-chip Flash */
       FLASH13          : origin = 0x0BE000, length = 0x002000	/* on-chip Flash */
       CPU1TOCPU2RAM    : origin = 0x03A000, length = 0x000800
       CPU2TOCPU1RAM    : origin = 0x03B000, length = 0x000800
    
       CPUTOCMRAM       : origin = 0x039000, length = 0x000800
       CMTOCPURAM       : origin = 0x038000, length = 0x000800
    
       CANA_MSG_RAM     : origin = 0x049000, length = 0x000800
       CANB_MSG_RAM     : origin = 0x04B000, length = 0x000800
       RESET           	: origin = 0x3FFFC0, length = 0x000002
    }
    
    
    SECTIONS
    {
       codestart        : > BEGIN
       .text            : >> RAMD01 | RAMLS02 | RAMLS3 | RAMGS101112
       .cinit           : > RAMM0
       .switch          : > RAMM0
       .reset           : > RESET, TYPE = DSECT /* not used, */
    
       .stack           : > RAMM1
    #if defined(__TI_EABI__)
       .bss             : >> RAMLS56 | RAMGS101112
       .bss:output      : > RAMLS3
       .init_array	    : > RAMM0
       .const           : > RAMLS56
       .data			: >> RAMLS56 | RAMLS7 | RAMGS101112
       .sysmem			: > RAMLS4
    #else
       .pinit           : > RAMM0
       .ebss            : >> RAMLS56
       .econst          : > RAMLS56
       .esysmem         : > RAMLS56
    #endif
    
       ramgs0 : > RAMGS0, type=NOINIT
       ramgs1 : > RAMGS1, type=NOINIT
    
       MSGRAM_CPU1_TO_CPU2 > CPU1TOCPU2RAM, type=NOINIT
       MSGRAM_CPU2_TO_CPU1 > CPU2TOCPU1RAM, type=NOINIT
       MSGRAM_CPU_TO_CM   > CPUTOCMRAM, type=NOINIT
       MSGRAM_CM_TO_CPU   > CMTOCPURAM, type=NOINIT
    
        .TI.ramfunc : {} > RAMM0
    
    }
    
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */
    

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

    您好!

    在工程编译中是否有2个链接器 cmd 文件?

    此致、

    Veena

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

    是的、我有两个.cmd 文件。 我正在尝试移植通用电机控制器实验室 SDK 中的代码,该 SDK 是为 f28002x 控制器编写的。 我正在尝试用  F2838D 替换 f28002x 控制器。 为了移植代码、我将使用 TI 文档。 在移植指令中(第70页、第3.3节)
    , 他们要求用户按原样复制链接器 CMD 文件,并重命名链接器文件。  

     

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

    为2838x 禁用第二个链接器文件后、我删除了存储器重叠错误、但现在我得到了多个未解析的符号错误。  

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

    您好!

    这不是链接器 cmd 文件问题。 请检查项目中是否存在这些函数定义、无论是在.c 文件还是.lib 文件中

    此致、

    Veena

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

    您的项目中有哪个版本的 FAST .lib 文件? 您是否看到有关它的任何警告或错误? 我认为我们不支持 FPU64版本的 FAST 库、因此您可能会遇到一些链接问题。

    您是否需要 FPU64? 您能否将编译器设置更改为 FPU32、看看这是否有助于消除一些错误?

    惠特尼

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

    尊敬的惠特尼:

    我在任何地方都没有 FPU64、所有东西都是 FPU32。 请参阅我的.projectspec 文件中的以下片段。

        <configuration name="Flash_lib_DRV8323RS" 
    				compilerBuildOptions="-v28 -ml -mt --float_support=fpu32  --tmu_support=tmu0 -O3 --opt_for_speed=3 --fp_mode=relaxed 
    					-I${SDK_ROOT} 
    					-I${SDK_ROOT}/libraries/observers/est_lib/include 					
    					-I${SDK_ROOT}/libraries/control/pi/include 
    					-I${SDK_ROOT}/libraries/control/vsf/include 
    					-I${SDK_ROOT}/libraries/control/fwc/include 
    					-I${SDK_ROOT}/libraries/control/mtpa/include 
    					-I${SDK_ROOT}/libraries/control/vs_freq/include 
    					-I${SDK_ROOT}/libraries/control/dclink_ss/include 					
    					-I${SDK_ROOT}/libraries/filter/filter_fo/include 
    					-I${SDK_ROOT}/libraries/filter/filter_so/include 
    					-I${SDK_ROOT}/libraries/filter/offset/include 
    					-I${SDK_ROOT}/libraries/observers/esmo/include 
    					-I${SDK_ROOT}/libraries/observers/speedfr/include	
    					-I${SDK_ROOT}/libraries/observers/speedcalc/include						
    					-I${SDK_ROOT}/libraries/observers/mpid/include 	
    					-I${SDK_ROOT}/libraries/observers/ssipd/include 
    					-I${SDK_ROOT}/libraries/observers/isbldc/include					
    					-I${SDK_ROOT}/libraries/observers/encoder/include
    					-I${SDK_ROOT}/libraries/observers/hall/include
    					-I${SDK_ROOT}/libraries/transforms/clarke/include 
    					-I${SDK_ROOT}/libraries/transforms/ipark/include 
    					-I${SDK_ROOT}/libraries/transforms/park/include 
    					-I${SDK_ROOT}/libraries/transforms/svgen/include 
    					-I${SDK_ROOT}/libraries/transforms/volts/include 
    					-I${SDK_ROOT}/libraries/utilities/angle_gen/include 
    					-I${SDK_ROOT}/libraries/utilities/cpu_time/include 
    					-I${SDK_ROOT}/libraries/utilities/datalog/include  
    					-I${SDK_ROOT}/libraries/utilities/diagnostic/include 
    					-I${SDK_ROOT}/libraries/utilities/step_response/include					
    					-I${SDK_ROOT}/libraries/utilities/traj/include 
    					-I${SDK_ROOT}/libraries/utilities/types/include
    					-I${SDK_ROOT}/libraries/utilities/rimpulse/include
    					-I${SDK_ROOT}/libraries/utilities/mod6cnt/include	
    					-I${SDK_ROOT}/libraries/sfra/include
    					-I${SDK_ROOT}/libraries/sfra/gui/include										
    					-I${SDK_ROOT}/libraries/drvic/drv8323/include					
    					-I${SDK_ROOT}/libraries/dacs/dac128s085/include						
    					-I${SDK_ROOT}/solutions/universal_motorcontrol_lab/common/include/ 
    					-I${SDK_ROOT}/solutions/universal_motorcontrol_lab/f28388d/drivers/include 
    					-I${} 
    					-I${C2000WARE_DLIB_ROOT} 
    					-I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include/ 
    					-I${C2000WARE_DEVICE_SUPPORT_ROOT}/headers/include/ 
    					-I${C2000WARE_LIBS_ROOT}/flash_api/f28388d/include/FlashAPI/
    					--define=_INLINE --define=_FLASH --define=_f2838x
    					--define=_FULL_FAST_LIB				
    					--define=BSXL8323RS_REVA	
    					--define=LPD_SITE_J1_J4																					
    					--define=MOTOR1_FAST
    					--define=MOTOR1_ESMO_N
    					--define=MOTOR1_ENC_N
    					--define=QEP_ENABLE_N
    					--define=MOTOR1_HALL_N
    					--define=HALL_ENABLE_N
    					--define=HALL_CAL_N
    					--define=MOTOR1_ISBLDC_N
    					--define=MOTOR1_DCLINKSS_N					
    					--define=MOTOR1_OVM_N
    					--define=MOTOR1_FWC_N
    					--define=MOTOR1_MTPA_N
    					--define=MOTOR1_SSIPD_N
    					--define=MOTOR1_VOLRECT_N			
    					--define=DATALOGF2_EN_N
    					--define=DAC128S_ENABLE --define=DAC128S_SPIB						
    					--define=CPUTIME_ENABLE
    					--define=TEST_ENABLE		
    					--define=SFRA_ENABLE_N
    					--define=STEP_RP_EN_N					
    					--define=CPUTIME_ENABLE
    					--define=TEST_ENABLE
    					--define=CMD_POT_EN_N
    					--define=CMD_CAP_EN_N
    					--define=CMD_SWITCH_EN_N
    					--define=CMD_CAN_EN_N																		
    					--gen_func_subsections=on --abi=eabi  
    					--display_error_number --diag_warning=225 --diag_suppress=10063" 
    				linkerBuildOptions="--entry_point  code_start --stack_size=0x100
    					-I${C2000WARE_DLIB_ROOT}/math/FPUfastRTS/c28/lib	
    					-I${SDK_ROOT}/libraries/sfra/lib/			
    					--define=SFRA_ENABLE_N						
    					-llibc.a -w" />

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

    在您在原始帖子中共享的屏幕截图中、我可以看到一行代码为-float_support=fpu64。 它看起来像是在构建控制台中。 您可以在 CCS 中右键点击工程并转至 Properties 吗? 查看编译器和链接器设置、了解它们使用的是 float_support。

    选择 F28388D 作为器件时、CCS 可能会自动选择 fpu64。

    惠特尼

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

    FPU64导致了此问题。  感谢您提供的准确和即时的帮助。