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.

c2000 linking issue

Other Parts Discussed in Thread: TMS320F28335, CONTROLSUITE

Hello,

I am trying to build a project on TMS320F28335 processor for flashing program software, below snippet is the linker command file modified for my requirements. Even though i have specified the section for "codestart" the linker is always spitting an error "entry-point symbol "code_start" undefined".

Can anyone help me with this issue.

Thanks,

Ajay

----------------------------------------------------------------------------------------------------------------------------------------------------

MEMORY
{
PAGE 0 :
/* BEGIN is used for the "boot to L0 Mirror" bootloader mode */
/* is fetched from boot ROM. */

BEGIN : origin = 0x3F8000, length = 0x000002 /* on-chip RAM L0 Mirror */
PRAML0 : origin = 0x3F8002, length = 0x000FFE /* on-chip RAM L0 Mirror */

PAGE 1 :
BOOT_RSVD : origin = 0x000000, length = 0x000050 /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x000050, length = 0x0003B0 /* on-chip RAM block M0 */
RAML0 : origin = 0x008000, length = 0x001000 /* on-chip RAM block L0 */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
DRAML0 : origin = 0x3f9000, length = 0x001000 /* on-chip RAM L0 Mirror */
FLASHB_H : origin = 0x300000, length = 0x037FF0 /* on-chip FLASH sectors B to H*/
IMG_PROPERTIES : origin = 0x337FF0, length = 0x000010 /* 16x16 on-chip FLASH for Image Properties*/

}

SECTIONS
{
/* Intialize Sections */
.cinit : > PRAML0 PAGE = 0
.text : > PRAML0, PAGE = 0
.pinit : > PRAML0, PAGE = 0
.switch : > PRAML0, PAGE = 0
code_start : > BEGIN, PAGE = 0
ramfuncs : > PRAML0 PAGE = 0

/* .stack : > RAMM1, PAGE = 1*/
.ebss : > DRAML0, PAGE = 1
.econst : > PRAML0, PAGE = 0
.esysmem : > DRAML0, PAGE = 1

IMG_Props : > IMG_PROPERTIES PAGE = 1
IMG_Space : > FLASHB_H PAGE = 1
RAM_Buffer : > RAML0 PAGE = 1

}

----------------------------------------------------------------------------------------------

  • Ajay,

    The entry point is expected to be a function, not a memory section. In your build options for the linker you'll need to specify the name of whichever function goes in the code_start section.

  • Hello Ajay,

    I think you will need to add this file DSP2833x_CodeStartBranch.asm that can be found in ControlSuite folder:

    controlSUITE\device_support\f2833x\v133\DSP2833x_common\source

    Best regards,

    Maria

  • Adam,

    I had already specified the entry point in the project and below give is the snippet of makefile

    "C:/Program Files/Texas Instruments/ccsv5/tools/compiler/c2000/bin/cl2000" -v28 -mt -ml -g -O2 --define="_DEBUG" --define="LARGE_MODEL" --diag_warning=225 --display_error_number --float_support=fpu32 .........  entry_point=code_start --rom_model

    From "code_start" it branches to _c_int00 which in turn provides entry to main function of application.

    All the above settings were done prior to build the project and still i am getting the same error mentioned in the post before.

    Thanks,

    Ajay

  • Maria,

    I am already using this assembly file "DSP2833x_CodeStartBranch.asm" in my source and function "code_start" is defined in this file only. These were the prerequisites before building the project.

     

    Thanks,

    Ajay

  • Let me make sure I understand this. You have a function (C or assembly?) call code_start(). You assembled it into a memory section that's also called code_start (using a #pragma or assembly directive). You then specified code_start as the entry point in your build options.

    You might try giving the function a different name from the section, just in case the identical names are confusing the linker.

  • the problem is with the below line in your linker command file. check your codestartbranch.asm file, the function code_start is put in the section "codestart" so your linker command file should direct the section codestart to BEGIN, not the function code_start.

     

    code_start : > BEGIN, PAGE = 0

    hope this helps.

    Best Regards

    Santosh Athuru

  • Santosh,

    I started with using "codestart" and replaced all the entries of "code_start" with "codestart" throughout the files in the project, including CCS project and linker files but still the problem persists only thing instead of "code_start" its "codestart" not defined.

    I had tried this earlier also but just gave one more try and the result was same.

    error #10234-D: unresolved symbols remain

    warning #10062-D: entry-point symbol "codestart" undefined

    Attached is the map file

    3465.Issue.txt
    ******************************************************************************
                 TMS320C2000 Linker PC v6.0.2                      
    ******************************************************************************
    >> Linked Fri Jul 18 14:14:22 2014
    
    OUTPUT FILE NAME:   <C:/AP2112/Programloader/dev/LoadToRAM/../Release/LoadToRAM.out>
    ENTRY POINT SYMBOL: "_c_int00"  address: 003405c3
    
    
    MEMORY CONFIGURATION
    
             name            origin    length      used     unused   attr    fill
    ----------------------  --------  ---------  --------  --------  ----  --------
    PAGE 0:
      ZONE0                 00004000   00001000  00000028  00000fd8  RWIX
      RAML0                 00008000   00001000  00000000  00001000  RWIX
      RAML1                 00009000   00001000  00000000  00001000  RWIX
      RAML2                 0000a000   00001000  00000000  00001000  RWIX
      RAML3                 0000b000   00001000  00000000  00001000  RWIX
      ZONE6                 00100000   00100000  00000000  00100000  RWIX
      ZONE7A                00200000   0000fc00  00000000  0000fc00  RWIX
      FLASHA                00338000   00007f80  00000000  00007f80  RWIX
      CSM_RSVD              0033ff80   00000076  00000000  00000076  RWIX
      PRAML0M               0033fff6   00000ffe  00000696  00000968  RWIX
      CSM_PWL               0033fff8   00000008  00000000  00000008  RWIX
      ADC_CAL               00380080   00000009  00000000  00000009  RWIX
      OTP                   00380400   00000400  00000000  00000400  RWIX
      BEGIN                 003f8000   00000002  00000002  00000000  RWIX
      IQTABLES              003fe000   00000b50  00000000  00000b50  RWIX
      IQTABLES2             003feb50   0000008c  00000000  0000008c  RWIX
      FPUTABLES             003febdc   000006a0  00000000  000006a0  RWIX
      ROM                   003ff27c   00000d44  00000000  00000d44  RWIX
      RESET                 003fffc0   00000002  00000000  00000002  RWIX
      VECTORS               003fffc2   0000003e  00000000  0000003e  RWIX
    
    PAGE 1:
      BOOT_RSVD             00000000   00000050  00000010  00000040  RWIX
      RAMM0                 00000050   000003b0  00000100  000002b0  RWIX
      RAMM1                 00000400   00000400  00000000  00000400  RWIX
      RAML4                 0000c000   00001000  00000018  00000fe8  RWIX
      RAML5                 0000d000   00001000  00000000  00001000  RWIX
      RAML6                 0000e000   00001000  00000000  00001000  RWIX
      RAML7                 0000f000   00001000  00000000  00001000  RWIX
      ZONE7B                0020fc00   00000400  00000000  00000400  RWIX
      FLASHB_H              00300000   00037ff0  00000000  00037ff0  RWIX
      IMG_PROPERTIES        00337ff0   00000010  00000000  00000010  RWIX
      DRAML0M               003f9000   00001000  00000000  00001000  RWIX
    
    
    SECTION ALLOCATION MAP
    
     output                                  attributes/
    section   page    origin      length       input sections
    --------  ----  ----------  ----------   ----------------
    .pinit     0    0033fff6    00000000     UNINITIALIZED
    
    .econst    0    00004000    00000028     
                      00004000    00000020     Flash28335_API_V210.lib : Flash28_Erase.obj (.econst:_Sector$1)
                      00004020    00000008                             : Flash28_Erase.obj (.econst:_SecKey$2)
    
    .text      0    0033fff6    0000068a     
                      0033fff6    0000017a     Main.obj (.text)
                      00340170    000000aa     Flash28335_API_V210.lib : Flash28_Prog.obj (.text)
                      0034021a    000000a0                             : Flash28_Erase.obj (.text)
                      003402ba    0000009a                             : Flash28_Erase_Pulse.obj (.text)
                      00340354    00000084                             : Flash28_Internals.obj (.text)
                      003403d8    00000080                             : Flash28_Prog_Pulse.obj (.text)
                      00340458    0000007d                             : Flash28_Compact_Pulse.obj (.text)
                      003404d5    0000005a                             : Flash28_EraseSector.obj (.text)
                      0034052f    00000053                             : Flash28_CompactSector.obj (.text)
                      00340582    00000041                             : Flash28_ClearLoop.obj (.text)
                      003405c3    00000039     boot28.obj (.text)
                      003405fc    00000033     Flash28335_API_V210.lib : Flash28_ClearSector.obj (.text)
                      0034062f    00000029                             : Flash28_Init.obj (.text)
                      00340658    00000014                             : Flash28_Utils.obj (.text)
                      0034066c    0000000d                             : Flash28_Delay.obj (.text)
                      00340679    00000007                             : Flash28_DisInt.obj (.text)
    
    .cinit     0    00340680    0000000c     
                      00340680    0000000a     Flash28335_API_V210.lib : Flash28_Globals.obj (.cinit)
                      0034068a    00000002     --HOLE-- [fill = 0]
    
    codestart 
    *          0    003f8000    00000002     
                      003f8000    00000002     CodeStartBranch.obj (codestart)
    
    .reset     0    003fffc0    00000000     DSECT
    
    vectors    0    003fffc2    00000000     DSECT
    
    IMG_Props 
    *          1    00000000    00000010     UNINITIALIZED
                      00000000    00000010     Main.obj (IMG_Props)
    
    RAM_Buffer 
    *          1    00000080    00000100     UNINITIALIZED
                      00000080    00000100     Main.obj (RAM_Buffer)
    
    .ebss      1    0000c000    00000018     UNINITIALIZED
                      0000c000    00000014     Main.obj (.ebss)
                      0000c014    00000004     Flash28335_API_V210.lib : Flash28_Globals.obj (.ebss)
    
    
    GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name 
    
    address    name
    --------   ----
    0033fff6   .text
    003405fc   _Fl28335_ClearSector
    0034052f   _Fl28335_CompactSector
    003404d5   _Fl28335_EraseSector
    0034062f   _Fl28335_Init
    00340582   _Fl28x_ClearLoop
    003403b6   _Fl28x_ClosePulse
    00340492   _Fl28x_CompactPulse
    00340458   _Fl28x_CompactVerify
    0034066c   _Fl28x_Delay
    00340679   _Fl28x_DisableInt
    00340660   _Fl28x_DisableNMI
    00340361   _Fl28x_EnterCmdMode
    00340302   _Fl28x_ErasePulse
    003402ba   _Fl28x_EraseVerify
    00340386   _Fl28x_FlashRegSleep
    00340354   _Fl28x_LeaveCmdMode
    003403cd   _Fl28x_MaskAll
    003403a5   _Fl28x_OpenPulse
    00340416   _Fl28x_ProgPulse
    003403d8   _Fl28x_ProgVerify
    0034067d   _Fl28x_RestoreInt
    00340658   _Fl28x_WatchDogDisable
    0034021a   _Flash28335_Erase
    00340170   _Flash28335_Program
    0000c016   _Flash_CPUScaleFactor
    0000c014   _Flash_CallbackPtr
    ffffffff   ___binit__
    ffffffff   ___c_args__
    00340680   ___cinit__
    00340680   ___etext__
    ffffffff   ___pinit__
    0033fff6   ___text__
    003405c3   _c_int00
    0033fff6   _halt
    0033fff9   _main
    00000080   _puRAM_BUFFER
    0000c000   _sFlashStatus
    00000000   _sImageParameters
    0000c004   _sTempImageParams
    ffffffff   binit
    00340680   cinit
    UNDEFED    codestart
    00340680   etext
    ffffffff   pinit
    
    
    GLOBAL SYMBOLS: SORTED BY Symbol Address 
    
    address    name
    --------   ----
    00000000   _sImageParameters
    00000080   _puRAM_BUFFER
    0000c000   _sFlashStatus
    0000c004   _sTempImageParams
    0000c014   _Flash_CallbackPtr
    0000c016   _Flash_CPUScaleFactor
    0033fff6   .text
    0033fff6   ___text__
    0033fff6   _halt
    0033fff9   _main
    00340170   _Flash28335_Program
    0034021a   _Flash28335_Erase
    003402ba   _Fl28x_EraseVerify
    00340302   _Fl28x_ErasePulse
    00340354   _Fl28x_LeaveCmdMode
    00340361   _Fl28x_EnterCmdMode
    00340386   _Fl28x_FlashRegSleep
    003403a5   _Fl28x_OpenPulse
    003403b6   _Fl28x_ClosePulse
    003403cd   _Fl28x_MaskAll
    003403d8   _Fl28x_ProgVerify
    00340416   _Fl28x_ProgPulse
    00340458   _Fl28x_CompactVerify
    00340492   _Fl28x_CompactPulse
    003404d5   _Fl28335_EraseSector
    0034052f   _Fl28335_CompactSector
    00340582   _Fl28x_ClearLoop
    003405c3   _c_int00
    003405fc   _Fl28335_ClearSector
    0034062f   _Fl28335_Init
    00340658   _Fl28x_WatchDogDisable
    00340660   _Fl28x_DisableNMI
    0034066c   _Fl28x_Delay
    00340679   _Fl28x_DisableInt
    0034067d   _Fl28x_RestoreInt
    00340680   ___cinit__
    00340680   ___etext__
    00340680   cinit
    00340680   etext
    ffffffff   ___binit__
    ffffffff   ___c_args__
    ffffffff   ___pinit__
    ffffffff   binit
    ffffffff   pinit
    UNDEFED    codestart
    
    [45 symbols]
    

    Thanks,

    Ajay

  • Ajay,

    put back to the way it was:

    in the ASM file, the function/symbol name is code_start:

    In the ASM file the section name where the symbols code_start goes into is codestart;

    in the linker command file the section codestart should go into begin ( codestart        : > BEGIN,    PAGE = 0)

    Now right click the project name and click on properties and browse C2000 Linker->symbol management and see if entry point is set to code_start.

    now build and you still get the error? if yes, see if the needed codestartbranch.asm file is included in your project. Inspect your map file and see if it is in there.

     

    Best Regards

    Santosh

  • Santosh,

    I tried entering the entry point in "Symbol Management" section of C2000 linker but still the same error persisted. Since we ran out of all the options i deleted the entire project and created one from the beginning and with the same linker command file and you know what the project built successfully and i was able to generate the output file. 

    Even though the old project was listing the command file linked it was not referenced when the project was being compiled and linked. I guess it was an file linker file reference issue which resulted in the above mentioned issue.

    Thanks for your time and suggestions now I know what not to do.

    Thanks,

    Ajay