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: Linker file errors

Part Number: TMS320F28388D

Hi,

I am trying to re-use the linker file from one of the example for my application but I am getting various errors. 

Thanks,

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.
    //===========================================================================
    */
    

  • Hi,

    Do you have 2 linker cmd files in your project build?

    Regards,

    Veena

  • Yes, I have two .cmd files. I am trying to port the code from the universal motor controller lab SDK ,which is written for a f28002x controller. I am trying to replace the  f28002x controller with a F2838D. For porting the code, I am using the this TI document. In the porting instructions (page 70,section 3.3)
    , they ask the user to copy the linker CMD files as it is and just rename the linker file. 

     

  • After disabling the 2nd linker file for the 2838x, I got the rid of memory overlap errors but now I am getting multiple unresolved symbol errors. 

  • Hi,

    This is not a linker cmd file issue. Please check if you have these function definitions are present in the project, either in .c files or .lib files

    Regards,

    Veena

  • What version of the FAST .lib file do you have in your project? Are you seeing any warnings or errors about it? I don't think we support an FPU64 version of the FAST lib, so you may be running into some linking issues because of that.

    Do you need FPU64? Could you change your compiler settings to FPU32 and see if that helps get rid of some errors?

    Whitney

  • Hi Whitney,

    I don't have FPU64 anywhere, everything is FPU32. See following snippet from my .projectspec file.

        <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" />

  • In the screen shot you shared in your original post, I can see a line that says --float_support=fpu64. It looks like it's in build console. Can you right click your project in CCS and go to Properties? Look at the compiler and linker settings and see what float_support they are using.

    It's possible CCS automatically selected fpu64 when you selected F28388D as your device.

    Whitney

  • The FPU64 was causing this issue. Thanks for the precise and immediate assistance.