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/TMS320F28379D: "warning: creating output section "IQmath" without a SECTIONS specification" .

Part Number: TMS320F28379D

Tool/software: Code Composer Studio

I am trying to produce spwm waveform using epwmregs.

Epwm1interrupt  doesn't seem to be responding . I am not sure whether it is due to the IQmath section warning or the interrupts syntax is  wrong.

PFA the code below:

/**
* Generating 3 phase 50% duty cycle square wave
*/
#include "F28x_Project.h" // Device Header File and Examples Include File

#define MATH_TYPE 1
#include "IQmathLib.h"
static unsigned int index;
#pragma DATA_SECTION(sine_table, "IQmathTables");
_iq30 sine_table[512];

void initepwm(void);
interrupt void epwm1_isr(void);

void main(void)
{
index = 0;
InitSysCtrl();
DINT;


InitGpio();
EALLOW;
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1;
GpioCtrlRegs.GPAGMUX1.bit.GPIO0 = 0;
GpioCtrlRegs.GPAGMUX2.bit.GPIO31 = 0;
GpioCtrlRegs.GPAMUX2.bit.GPIO31 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO31 = 1;
EDIS;


InitPieCtrl();

CpuSysRegs.PCLKCR2.bit.EPWM1 = 1;

InitPieVectTable();

EALLOW;
PieVectTable.EPWM1_INT = &epwm1_isr;
EDIS;

IER |= M_INT3;
PieCtrlRegs.PIEIER3.bit.INTx1 = 1;


EALLOW;
CpuSysRegs.PCLKCR0.bit.TBCLKSYNC = 0;
EDIS;

EPwm1Regs.ETSEL.bit.INTEN = 1;
EPwm1Regs.ETSEL.bit.INTSEL = 5;
//EPwm1Regs.ETPS.bit.INTCNT = 1;
EPwm1Regs.ETPS.bit.INTPRD = 1;
initepwm();

EALLOW;
CpuSysRegs.PCLKCR0.bit.TBCLKSYNC = 1;
EDIS;


EINT;
ERTM;

while(1);
}

interrupt void epwm1_isr()
{
GpioDataRegs.GPATOGGLE.bit.GPIO31 = 1;
EALLOW;
CpuSysRegs.PCLKCR0.bit.TBCLKSYNC = 0;
EDIS;

initepwm();

EALLOW;
CpuSysRegs.PCLKCR0.bit.TBCLKSYNC = 1;
EDIS;

GpioDataRegs.GPATOGGLE.bit.GPIO31 = 1;
index +=1;
if( index > 511) index = 0;

//EPwm1Regs.ETFLG.bit.INT = 0;
EPwm1Regs.ETCLR.bit.INT = 1;
PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;
}

void initepwm()
{

EALLOW;
// ---------------------------------------------
// | 1 100 MHz | f_sw = 10 kHz for TBPRD = 2000,
// | TBPRD = - x ------------------------- ; | CLKDIV = TB_DIV1 and HSPCLKDIV = TB_DIV1
// | 2 f_sw * CLKDIV * HSPCLKDIV | Max TBPRD = 65535
// ---------------------------------------------
EPwm1Regs.TBPRD = 5000; // timer period for 25KHz
EPwm1Regs.TBCTL.bit.CLKDIV = TB_DIV1; // CLKDIV = 1
EPwm1Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1; // HSPCLKDIV = 1
EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN; // Symmetrical mode for triangular carrier


EPwm1Regs.ETSEL.bit.INTEN = 1;
EPwm1Regs.ETSEL.bit.INTSEL = 5;
//EPwm1Regs.ETPS.bit.INTCNT = 1;
EPwm1Regs.ETPS.bit.INTPRD = 1;


EPwm1Regs.CMPA.bit.CMPA = EPwm1Regs.TBPRD -_IQsat( _IQ30mpy((sine_table[index]+_IQ30(0.9999))/2, EPwm1Regs.TBPRD), EPwm1Regs.TBPRD,0);
EPwm1Regs.AQCTLA.bit.CAU = 2;
EPwm1Regs.AQCTLA.bit.CAD = 1;

EDIS;
}

Please help me overcome this problem.

Thankyou.

  • Hi Akhil,

    Your code appears to be fine. What I want to look into is 

    1. Your build configuration(RAM/FLASH) and your predefined symbols in Linker build settings.
    2. The full linker command file that you are using.

    The warning that you facing is a combination of build settings and linker command file. So we'll focus on that.

    -Ritvik

  • Thanks for the response.

    PFA: build configuration




    MEMORY
    {
    PAGE 0 :
    /* BEGIN is used for the "boot to SARAM" bootloader mode */

    BEGIN : origin = 0x000000, length = 0x000002
    RAMM0 : origin = 0x000122, length = 0x0002DE
    RAMD0 : origin = 0x00B000, length = 0x000800
    RAMLS0 : origin = 0x008000, length = 0x000800
    RAMLS1 : origin = 0x008800, length = 0x000800
    RAMLS2 : origin = 0x009000, length = 0x000800
    RAMLS3 : origin = 0x009800, length = 0x000800
    RAMLS4 : origin = 0x00A000, length = 0x000800
    RESET : origin = 0x3FFFC0, length = 0x000002

    PAGE 1 :

    BOOT_RSVD : origin = 0x000002, length = 0x000120 /* Part of M0, BOOT rom will use this for stack */
    RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
    RAMD1 : origin = 0x00B800, length = 0x000800


    RAMLS5 : origin = 0x00A800, length = 0x000800

    RAMGS0 : origin = 0x00C000, length = 0x001000
    RAMGS1 : origin = 0x00D000, length = 0x001000
    RAMGS2 : origin = 0x00E000, length = 0x001000
    RAMGS3 : origin = 0x00F000, length = 0x001000
    RAMGS4 : origin = 0x010000, length = 0x001000
    RAMGS5 : origin = 0x011000, length = 0x001000
    RAMGS6 : origin = 0x012000, length = 0x001000
    RAMGS7 : origin = 0x013000, length = 0x001000
    RAMGS8 : origin = 0x014000, length = 0x001000
    RAMGS9 : origin = 0x015000, length = 0x001000
    RAMGS10 : origin = 0x016000, length = 0x001000
    RAMGS11 : origin = 0x017000, length = 0x001000
    RAMGS12 : origin = 0x018000, length = 0x001000
    RAMGS13 : origin = 0x019000, length = 0x001000
    RAMGS14 : origin = 0x01A000, length = 0x001000
    RAMGS15 : origin = 0x01B000, length = 0x001000

    CPU2TOCPU1RAM : origin = 0x03F800, length = 0x000400
    CPU1TOCPU2RAM : origin = 0x03FC00, length = 0x000400
    }


    SECTIONS
    {
    codestart : > BEGIN, PAGE = 0

    #ifdef __TI_COMPILER_VERSION__
    #if __TI_COMPILER_VERSION__ >= 15009000
    .TI.ramfunc : {} > RAMM0, PAGE = 0
    #else
    ramfuncs : > RAMM0 PAGE = 0
    #endif
    #endif

    .text : >>RAMM0 | RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4, PAGE = 0
    .cinit : > RAMM0, PAGE = 0
    .pinit : > RAMM0, PAGE = 0
    .switch : > RAMM0, PAGE = 0
    .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */

    .stack : > RAMM1, PAGE = 1
    .ebss : > RAMLS5, PAGE = 1
    .econst : > RAMLS5, PAGE = 1
    .esysmem : > RAMLS5, PAGE = 1
    Filter_RegsFile : > RAMGS0, PAGE = 1

    ramgs0 : > RAMGS0, PAGE = 1
    ramgs1 : > RAMGS1, PAGE = 1

    /* The following section definitions are required when using the IPC API Drivers */
    GROUP : > CPU1TOCPU2RAM, PAGE = 1
    {
    PUTBUFFER
    PUTWRITEIDX
    GETREADIDX
    }

    GROUP : > CPU2TOCPU1RAM, PAGE = 1
    {
    GETBUFFER : TYPE = DSECT
    GETWRITEIDX : TYPE = DSECT
    PUTREADIDX : TYPE = DSECT
    }

    }
    //IQmathTables : >RAMGS1, PAGE = 0
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */

    Beow is the image of predifend symbols in project settings

  • Akhil Sai said:
    }
    //IQmathTables : >RAMGS1, PAGE = 0

    Since this part of the code is commented out, you get that warning. Please uncomment and then try to run. Let me know if you face issues after that.

    Ritvik