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.

CCS/TMS320F28335: Non-defined segment appearing in .map file.

Part Number: TMS320F28335
Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE

Tool/software: Code Composer Studio

I have been struggling to download a SYS/BIOS example to my controlCARD TMS320F28335. I had the error: #10099-D program will not fit. I found here a workaround to my problem . There it says "This is due to the PIEVECT being placed in the wrong PAGE in the memory linker command file". However, when I went to the .map file I found the PIEVECT segment defined in PAGE 1 (which did not correspond to any segment definition in any .cmd file). Then I added the line that was supposed to be missing in the .cmd file under the "PAGE 1:" statement: "PIEVECT     : origin = 0xD00,    length = 0x100", just the way the wiki establishes. And after that, I stopped having that annoying #10099-D error but the .map file generated was exactly the same (I used "diff" to be sure of this). The things I did not understand were:

-Why the PIEVECT segment appeared in the .map file in the first place if no .cmd file defined it. Is it defined in some configuration file related to SYS/BIOS?

-Why was I having the #10099-D error if (I do not know why) PIEVECT segment actually appeared in the .map file in the right PAGE (the number 1).

  • user5233338 said:
    Then I added the line that was supposed to be missing in the .cmd file

    Don't add anything.  When the PIEVECT line is wrong, it is in the MEMORY directive, on PAGE 0.  Move it, still within the MEMORY directive, to PAGE 1.  

    If that doesn't fix it, then I need to see this linker command file.  Please attach it to your next post.  Either before the change or after, doesn't matter.  But I need to know which it is.  So, the forum will accept it, add the file extension .txt.

    Thanks and regards,

    -George

  • The thing is that it was not on PAGE 0 nor on PAGE 1. And the PIEVECT segment was not defined in any other linker command file (I explicitly say this because I have two linker command files in the project, both from de ControlSuite: DSP2833x_Headers_BIOS.cmd and F28335.cmd). Anyway the PIEVECT segment appeared in the .map file generated and it was in PAGE 1. However the compiler keep showing the error. The only thing that solved this error was adding that line I explained in the question in any linker command file, on PAGE 1, of course.

    Here I attached the DSP2833x_Headers_BIOS.cmd that finally solved the issue (I defined PIEVECT here but it also worked if I defined it in F28335.cmd).

    /*
    //###########################################################################
    //
    // FILE:    DSP2833x_Headers_BIOS.cmd
    //
    // TITLE:   DSP2833x Peripheral registers linker command file
    //
    // DESCRIPTION:
    //
    //          This file is for use in BIOS applications.
    //
    //          Linker command file to place the peripheral structures
    //          used within the DSP2833x headerfiles into the correct memory
    //          mapped locations.
    //
    //          This version of the file does not include the PieVectorTable structure.
    //          For non-BIOS applications, please use the DSP2833x_Headers_nonBIOS.cmd
    //          file which includes the PieVectorTable structure.
    //
    //###########################################################################
    // $TI Release: F2833x/F2823x Header Files and Peripheral Examples V142 $
    // $Release Date: November  1, 2016 $
    // $Copyright: Copyright (C) 2007-2016 Texas Instruments Incorporated -
    //             http://www.ti.com/ ALL RIGHTS RESERVED $
    //###########################################################################
    */
    
    MEMORY
    {
     PAGE 0:    /* Program Memory */
    
     PAGE 1:    /* Data Memory */
    
       DEV_EMU     : origin = 0x000880, length = 0x000180     /* device emulation registers */
       FLASH_REGS  : origin = 0x000A80, length = 0x000060     /* FLASH registers */
       CSM         : origin = 0x000AE0, length = 0x000010     /* code security module registers */
    
       ADC_MIRROR  : origin = 0x000B00, length = 0x000010     /* ADC Results register mirror */
    
       XINTF       : origin = 0x000B20, length = 0x000020     /* external interface registers */
    
       CPU_TIMER0  : origin = 0x000C00, length = 0x000008     /* CPU Timer0 registers */
       CPU_TIMER1  : origin = 0x000C08, length = 0x000008     /* CPU Timer0 registers (CPU Timer1 & Timer2 reserved TI use)*/
       CPU_TIMER2  : origin = 0x000C10, length = 0x000008     /* CPU Timer0 registers (CPU Timer1 & Timer2 reserved TI use)*/
    
       PIE_CTRL    : origin = 0x000CE0, length = 0x000020     /* PIE control registers */
       PIEVECT     : origin = 0xD00,    length = 0x100
    
       DMA         : origin = 0x001000, length = 0x000200     /* DMA registers */
    
       MCBSPA      : origin = 0x005000, length = 0x000040     /* McBSP-A registers */
       MCBSPB      : origin = 0x005040, length = 0x000040     /* McBSP-B registers */
    
       ECANA       : origin = 0x006000, length = 0x000040     /* eCAN-A control and status registers */
       ECANA_LAM   : origin = 0x006040, length = 0x000040     /* eCAN-A local acceptance masks */
       ECANA_MOTS  : origin = 0x006080, length = 0x000040     /* eCAN-A message object time stamps */
       ECANA_MOTO  : origin = 0x0060C0, length = 0x000040     /* eCAN-A object time-out registers */
       ECANA_MBOX  : origin = 0x006100, length = 0x000100     /* eCAN-A mailboxes */
    
       ECANB       : origin = 0x006200, length = 0x000040     /* eCAN-B control and status registers */
       ECANB_LAM   : origin = 0x006240, length = 0x000040     /* eCAN-B local acceptance masks */
       ECANB_MOTS  : origin = 0x006280, length = 0x000040     /* eCAN-B message object time stamps */
       ECANB_MOTO  : origin = 0x0062C0, length = 0x000040     /* eCAN-B object time-out registers */
       ECANB_MBOX  : origin = 0x006300, length = 0x000100     /* eCAN-B mailboxes */
    
       EPWM1       : origin = 0x006800, length = 0x000022     /* Enhanced PWM 1 registers */
       EPWM2       : origin = 0x006840, length = 0x000022     /* Enhanced PWM 2 registers */
       EPWM3       : origin = 0x006880, length = 0x000022     /* Enhanced PWM 3 registers */
       EPWM4       : origin = 0x0068C0, length = 0x000022     /* Enhanced PWM 4 registers */
       EPWM5       : origin = 0x006900, length = 0x000022     /* Enhanced PWM 5 registers */
       EPWM6       : origin = 0x006940, length = 0x000022     /* Enhanced PWM 6 registers */
    
       ECAP1       : origin = 0x006A00, length = 0x000020     /* Enhanced Capture 1 registers */
       ECAP2       : origin = 0x006A20, length = 0x000020     /* Enhanced Capture 2 registers */
       ECAP3       : origin = 0x006A40, length = 0x000020     /* Enhanced Capture 3 registers */
       ECAP4       : origin = 0x006A60, length = 0x000020     /* Enhanced Capture 4 registers */
       ECAP5       : origin = 0x006A80, length = 0x000020     /* Enhanced Capture 5 registers */
       ECAP6       : origin = 0x006AA0, length = 0x000020     /* Enhanced Capture 6 registers */
    
       EQEP1       : origin = 0x006B00, length = 0x000040     /* Enhanced QEP 1 registers */
       EQEP2       : origin = 0x006B40, length = 0x000040     /* Enhanced QEP 2 registers */
    
       GPIOCTRL    : origin = 0x006F80, length = 0x000040     /* GPIO control registers */
       GPIODAT     : origin = 0x006FC0, length = 0x000020     /* GPIO data registers */
       GPIOINT     : origin = 0x006FE0, length = 0x000020     /* GPIO interrupt/LPM registers */
    
       SYSTEM      : origin = 0x007010, length = 0x000020     /* System control registers */
       SPIA        : origin = 0x007040, length = 0x000010     /* SPI-A registers */
       SCIA        : origin = 0x007050, length = 0x000010     /* SCI-A registers */
       XINTRUPT    : origin = 0x007070, length = 0x000010     /* external interrupt registers */
    
       ADC         : origin = 0x007100, length = 0x000020     /* ADC registers */
    
       SCIB        : origin = 0x007750, length = 0x000010     /* SCI-B registers */
    
       SCIC        : origin = 0x007770, length = 0x000010     /* SCI-C registers */
    
       I2CA        : origin = 0x007900, length = 0x000040     /* I2C-A registers */
    
       CSM_PWL     : origin = 0x33FFF8, length = 0x000008     /* Part of FLASHA.  CSM password locations. */
    
       PARTID      : origin = 0x380090, length = 0x000001     /* Part ID register location */
    }
    
    
    SECTIONS
    {
    /*** The PIE Vector table is called PIEVECT by DSP/BIOS ***/
       PieVectTableFile  : > PIEVECT,     PAGE = 1,  TYPE = DSECT
    
    /*** Peripheral Frame 0 Register Structures ***/
       DevEmuRegsFile    : > DEV_EMU,     PAGE = 1
       FlashRegsFile     : > FLASH_REGS,  PAGE = 1
       CsmRegsFile       : > CSM,         PAGE = 1
       AdcMirrorFile     : > ADC_MIRROR,  PAGE = 1
       XintfRegsFile     : > XINTF,       PAGE = 1
       CpuTimer0RegsFile : > CPU_TIMER0,  PAGE = 1
       CpuTimer1RegsFile : > CPU_TIMER1,  PAGE = 1
       CpuTimer2RegsFile : > CPU_TIMER2,  PAGE = 1
       PieCtrlRegsFile   : > PIE_CTRL,    PAGE = 1
       DmaRegsFile       : > DMA,         PAGE = 1
    
    /*** Peripheral Frame 3 Register Structures ***/
       McbspaRegsFile    : > MCBSPA,      PAGE = 1
       McbspbRegsFile    : > MCBSPB,      PAGE = 1
    
    /*** Peripheral Frame 1 Register Structures ***/
       ECanaRegsFile     : > ECANA,       PAGE = 1
       ECanaLAMRegsFile  : > ECANA_LAM    PAGE = 1
       ECanaMboxesFile   : > ECANA_MBOX   PAGE = 1
       ECanaMOTSRegsFile : > ECANA_MOTS   PAGE = 1
       ECanaMOTORegsFile : > ECANA_MOTO   PAGE = 1
    
       ECanbRegsFile     : > ECANB,       PAGE = 1
       ECanbLAMRegsFile  : > ECANB_LAM    PAGE = 1
       ECanbMboxesFile   : > ECANB_MBOX   PAGE = 1
       ECanbMOTSRegsFile : > ECANB_MOTS   PAGE = 1
       ECanbMOTORegsFile : > ECANB_MOTO   PAGE = 1
    
       EPwm1RegsFile     : > EPWM1        PAGE = 1
       EPwm2RegsFile     : > EPWM2        PAGE = 1
       EPwm3RegsFile     : > EPWM3        PAGE = 1
       EPwm4RegsFile     : > EPWM4        PAGE = 1
       EPwm5RegsFile     : > EPWM5        PAGE = 1
       EPwm6RegsFile     : > EPWM6        PAGE = 1
    
       ECap1RegsFile     : > ECAP1        PAGE = 1
       ECap2RegsFile     : > ECAP2        PAGE = 1
       ECap3RegsFile     : > ECAP3        PAGE = 1
       ECap4RegsFile     : > ECAP4        PAGE = 1
       ECap5RegsFile     : > ECAP5        PAGE = 1
       ECap6RegsFile     : > ECAP6        PAGE = 1
    
       EQep1RegsFile     : > EQEP1        PAGE = 1
       EQep2RegsFile     : > EQEP2        PAGE = 1
    
       GpioCtrlRegsFile  : > GPIOCTRL     PAGE = 1
       GpioDataRegsFile  : > GPIODAT      PAGE = 1
       GpioIntRegsFile   : > GPIOINT      PAGE = 1
    
    /*** Peripheral Frame 2 Register Structures ***/
       SysCtrlRegsFile   : > SYSTEM,      PAGE = 1
       SpiaRegsFile      : > SPIA,        PAGE = 1
       SciaRegsFile      : > SCIA,        PAGE = 1
       XIntruptRegsFile  : > XINTRUPT,    PAGE = 1
       AdcRegsFile       : > ADC,         PAGE = 1
       ScibRegsFile      : > SCIB,        PAGE = 1
       ScicRegsFile      : > SCIC,        PAGE = 1
       I2caRegsFile      : > I2CA,        PAGE = 1
    
    /*** Code Security Module Register Structures ***/
       CsmPwlFile        : > CSM_PWL,     PAGE = 1
    
    /*** Device Part ID Register Structures ***/
       PartIdRegsFile    : > PARTID,      PAGE = 1
    
    }
    
    
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */
    

    Even though the problem was solved, my doubt is why the PIEVECT segment was appearing in the .map file from the beginning (when I got the compiler error and no PIEVECT segment was defined in any linker command file).

  • It is clear that adding the PIEVECT line to DSP2833x_Headers_BIOS.cmd is not how this is designed to work.  Unfortunately, I cannot tell you how it is designed to work.  For that, help is needed from a C2000 expert, and maybe an BIOS expert too.  I'll bring this thread to the attention of the C2000 team.

    I have C2000Ware version 1.0.5.0 installed.  This product is a more recent version of what was formerly called controlSUITE.  The file DSP2833x_Headers_BIOS.cmd from the newer product does not define the memory range PIEVECT, but it does refer to it.  These lines appear in the SECTIONS directive ...

    /*** The PIE Vector table is called PIEVECT by DSP/BIOS ***/
       PieVectTableFile  : > PIEVECT,     PAGE = 1,  TYPE = DSECT
    

    The comment implies the memory range PIEVECT is defined by BIOS.  

    I am not familiar with C2000Ware, which is why I will get help from the C2000 team.

    Thanks and regards,

    -George

  • Perfect, then I understood why PIEVECT appeared in the .map file even though it was not defined in any linker command file. The thing I still do not get is why the #10099-D error arised since PIEVECT appeared in PAGE 1 in the .map file (before I added the line "PIEVECT : origin = 0xD00, length = 0x100" in the DSP2833x_Headers_BIOS.cmd).
    Regarding to this thing you wrote "It is clear that adding the PIEVECT line to DSP2833x_Headers_BIOS.cmd is not how this is designed to work.", I understand you also said "Unfortunately, I cannot tell you how it is designed to work.", but you think that line should be added in F28335.cmd or you mean that that line should not be written anywhere and that it should be entirely handled by SYS/BIOS?
  • Hello

    You get the 10099 error because the PIEVECT wasn't defined in the memory section of linker (or possibly the wrong PAGE in your case).
    For BIOS, you should be using DSP2833x_Headers_BIOS.cmd along with a F28335 linker provided by BIOS. This linker will define the program memory as well as have PIEVECT section on PAGE 1. (I found one here: ~\tirtos_c2000_2_10_01_38\products\bios_6_41_00_26\packages\ti\platforms\tms320x28\include)
    BIOS instructions (can't confirm as I don't use BIOS) make ask you to add PIEVECT to F28335.cmd. Not sure. The PIEVECT memory section does have to be defined in some linker in the project.

    Best regards
    Chris