Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 21954

Segmentation fault while compiler is processing

$
0
0

Hi , 

I am getting the following error while compiling my file. Here is the detail of my compile parameters and output it gives:

C:\Users\Pranav.Nandan\Perforce\NP\depot\Connery\Branches\PMB05N\FE_App\FE_400\main\Release>"C:/TI_PC_Tools/Texas Instruments/ccsv5/tools/compiler/msp430/bin/cl
430" -vmspx -g -O2 --undefine=ENABLE_BISTFAILMSG --include_path="C:/TI_PC_Tools/Texas Instruments/ccsv5/ccs_base/msp430/include" --include_path="C:/TI_PC_Tools/
Texas Instruments/ccsv5/tools/compiler/msp430/include" --diag_warning=225 --printf_support=minimal --preproc_with_compile --verbose --preproc_dependency="fe_bis
t.pp" "../fe_bist.c"
MSP430 C/C++ Compiler v4.0.0
Tools Copyright (c) 2003-2011 Texas Instruments Incorporated

INTERNAL ERROR: C:\TI_PC_Tools\Texas Instruments\ccsv5\tools\compiler\msp430\bin\acp430.exe experienced a segmentation fault while
processing

This is a serious problem. Please contact Customer
Support with this message and a copy of the input file
and help us to continue to make the tools more robust.


>> Compilation failure

___________________________________________________________________________________________________________________

Kindly mention the cause and possible fix for this problem. If I do not call this function in my program, it gets compiled. Please find the method below, along with some declarations:

/************************************************************************
 * Function:    testPReg16
 *
 * Description: Perform read/compare on MSP430 peripheral register,
 *              returning only on a successful test.
 *
 * Parameters:  none
 *
 * Returns:     none
 *
 ************************************************************************/
static void testPReg16( void )
{
    const volatile uint16_t *addr = (Msp430PrTable[prRegSet].prSet+prSetIdx)->addr;
    const uint16_t end = Msp430PrTable[prRegSet].prTotal;
    const uint16_t mask = (Msp430PrTable[prRegSet].prSet+prSetIdx)->mask;
    const uint16_t val = (Msp430PrTable[prRegSet].prSet+prSetIdx)->val;

    if ( val != (mask & (*addr)) )
    {
        #ifdef ENABLE_BISTFAILMSG
        SendFSPStopOnError( (uint8_t)F_REG_MOD_ERR,
                            (uint8_t)RP_SERVICE_UNIT,
                            (uint8_t)(((uint16_t)addr)>>8),
                            (uint8_t)((uint16_t)addr),
                            (uint8_t)((*((uint16_t *)addr))>>8),
                            (uint8_t)(*((uint16_t *)addr)) );
        #endif //ENABLE_BISTFAILMSG
    }

    //set up for next register to compare
    prSetIdx++;

    //if this set is done, get next set
    if ( prSetIdx >= end )
    {
        prRegSet++;
        prSetIdx = 0;

        //if all sets are done, time to move on
        if ( prRegSet >= NUM_PR_REGSET )
        {
            // MSP430 register test cycle complete, move state to RAM test
            bistRamInit();
        }
    }
}

//******************************************************************************
//To add a peripheral set, create an array of type PR_TESTVAL that contains the
//register address, comparison mask & comparison value. Create an enum of all
//the registers to count the the size to allocate for the array. Add the new
//peripheral set to the master list by adding an entry of type PR_SET_ENTRY
//to the Msp430PrTable[] that references the pseripheral set array along with
//the number of registers in the set.
//*****************************************************************************

//Msp430PrTable[] coalesces all the register comparison tables. The entries match
//the order of the PR_SET enum
static const PR_SET_ENTRY Msp430PrTable[] =
{
{ PRSfr, NUM_SFR_REG },
{ PRPmm, NUM_PMM_REG },
{ PRFlash, NUM_FLASH_REG },
{ PRCrc16, NUM_CRC16_REG },
{ PRWdog, NUM_WDTCTL_REG },
{ PRUcs, NUM_UCS_REG },
{ PRSys, NUM_SYS_REG },
{ PRShdRef, NUM_REFCTL_REG },
{ PRPmap, NUM_PMAP_REG },
//{ PRMpy32, NUM_MPY32_REG }, // Keep here for future ref.
{ PRDio, NUM_DIO_REG },
{ PRTimerA, NUM_TIMERA_REG },
{ PRTimerB, NUM_TIMERB_REG }, // Keep here for future ref.
{ PRBakChg, NUM_BAKCHG_REG },
{ PRRtcB, NUM_RTCB_REG },
{ PRDma, NUM_DMA_REG },
{ PRUsci, NUM_USCI_REG },
{ PRAdc12, NUM_ADC12_REG },
{ PRDac12, NUM_DAC12_REG },
{ PRCompB, NUM_COMPB_REG },
{ PRUsbCtl, NUM_USBCTL_REG },
{ PRLcdB, NUM_LCDB_REG }
};


//array definition for the Special Function set of registers,
//matching the order of the PR_IDX_SFR enum
static const PR_TESTVAL PRSfr[] =
{
{ PR_SFRRPCR, 0x000F, 0x0000 }
};

//enum used to index within the Special Function Register set array, PRSfr[]
typedef enum _PR_IDX_SFR
{
IDX_SFRRPCR,
NUM_SFR_REG
} PR_IDX_SFR;

//enum used to index within the Power Management Module register set array, PRPmm[]
typedef enum _PR_IDX_PMM
{
IDX_PMMCTL0,
IDX_SVSMHCTL,
IDX_SVSMLCTL,
IDX_SVSMIO,
IDX_PM5CTL0,
NUM_PMM_REG
} PR_IDX_PMM;

//enum used to index within the Flash register set array, PRFlash[]
typedef enum _PR_IDX_FLASH
{
IDX_FCTL1,
IDX_FCTL3,
IDX_FCTL4,
NUM_FLASH_REG
} PR_IDX_FLASH;

//enum used to index within the CRC16 register set array, PRCrc16[]
typedef enum _PR_IDX_CRC16
{
IDX_CRCDI,
IDX_CRCDIRB,
IDX_CRCINIRES,
IDX_CRCRESR,
NUM_CRC16_REG
} PR_IDX_CRC16;


//enum used to index within the Watch dog control register set array, PRWdog[]
typedef enum _PR_IDX_WDTCTL
{
IDX_WDTCTL,
NUM_WDTCTL_REG
} PR_IDX_WDTCTL;

//enum used to index within the Unified Clock System register set array, PRUcs[]
typedef enum _PR_IDX_UCS
{
IDX_UCSCTL1,
IDX_UCSCTL2,
IDX_UCSCTL3,
IDX_UCSCTL4,
IDX_UCSCTL5,
IDX_UCSCTL6,
IDX_UCSCTL8,
NUM_UCS_REG
} PR_IDX_UCS;

//enum used to index within the System Module register set array, PRSys[]
typedef enum _PR_IDX_SYS
{
IDX_SYSCTL,
IDX_SYSBSLC,
IDX_SYSJMBC,
NUM_SYS_REG
} PR_IDX_SYS;

//enum used to index within the Shared Reference Module register set array, PRShdRef[]
typedef enum _PR_IDX_REFCTL
{
IDX_REFCTL0,
NUM_REFCTL_REG
} PR_IDX_REFCTL;


//enum used to index within the Port Mapping register set array, PRPmap[]
typedef enum _PR_IDX_PMAP
{
IDX_PMAPKEYID,
IDX_PMAPCTL,
IDX_P2MAP01,
IDX_P2MAP23,
IDX_P2MAP45,
IDX_P2MAP67,
NUM_PMAP_REG
} PR_IDX_PMAP;


Viewing all articles
Browse latest Browse all 21954

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>