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.

AWR1642BOOST: CCS程式編譯錯誤

Part Number: AWR1642BOOST
Other Parts Discussed in Thread: AWR1642, UNIFLASH

你好,

  我想測試AWR1642開發板GPIO的功能,目前使用SSR範例的MSS專案將程式碼改成SDK提供的GPIO test範例,編譯後出現以下錯誤,有爬過論壇好像沒人遇過類似問題,請問該如何解決。

/**************************************************************************
 *************************** Include Files ********************************
 **************************************************************************/

/* Standard Include Files. */
#include <stdint.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include <math.h>

/* BIOS/XDC Include Files. */
#include <xdc/std.h>
#include <xdc/cfg/global.h>
#include <xdc/runtime/IHeap.h>
#include <xdc/runtime/System.h>
#include <xdc/runtime/Error.h>
#include <xdc/runtime/Memory.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Event.h>
#include <ti/sysbios/knl/Semaphore.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/heaps/HeapBuf.h>
#include <ti/sysbios/heaps/HeapMem.h>
#include <ti/sysbios/knl/Event.h>
#include <ti/sysbios/family/arm/v7a/Pmu.h>
#include <ti/sysbios/family/arm/v7r/vim/Hwi.h>

/* mmWave SDK Include Files: */
#include <ti/common/sys_common.h>
#include <ti/drivers/soc/soc.h>
#include <ti/drivers/esm/esm.h>
#include <ti/drivers/crc/crc.h>
#include <ti/drivers/uart/UART.h>
#include <ti/drivers/gpio/gpio.h>
#include <ti/drivers/mailbox/mailbox.h>
#include <ti/drivers/pinmux/pinmux.h>
#include <ti/drivers/osal/MemoryP.h>
#include <ti/utils/testlogger/logger.h>
#include <ti/drivers/osal/DebugP.h>
#include <ti/control/mmwavelink/mmwavelink.h>
#include <ti/control/mmwave/mmwave.h>
#include <ti/control/mmwavelink/include/rl_driver.h>


/* Application Include Files: */
#include "mss_srr.h"
#include <common/srr_config_consts.h>
#include "common/mmw_messages.h"
#include <ti/utils/cli/cli.h>
#include <ti/drivers/cbuff/cbuff.h>

/**************************************************************************
 *************************** Global Definitions ***************************
 **************************************************************************/

/**
 * @brief
 *  Global Variable for tracking information required by the SRR TI Design
 */
#pragma DATA_ALIGN(gSrrMSSMCB, 16);
Srr_MSS_MCB    gSrrMSSMCB;

/**************************************************************************
 *************************** Local Definitions ****************************
 **************************************************************************/
static void SRR_MSS_chirpIntCallback(uintptr_t arg);
static void SRR_MSS_frameStartIntCallback(uintptr_t arg);
static int32_t SRR_MSS_eventFxn(uint16_t msgId, uint16_t sbId, uint16_t sbLen, uint8_t *payload);
static void SRR_MSS_cfgFxn(MMWave_CtrlCfg* ptrCtrlCfg);
static void SRR_MSS_startFxn(MMWave_CalibrationCfg* ptrCalibrationCfg);
static void SRR_MSS_stopFxn(void);
static void SRR_MSS_initTask (UArg arg0, UArg arg1);
static void SRR_MSS_mmWaveCtrlTask (UArg arg0, UArg arg1);

#ifdef USE_LVDS_INTERFACE_FOR_OBJECT_DATA_TX
static int32_t SRR_MSS_configureStreaming();
static int32_t SRR_MSS_EDMAAllocateCBUFFChannel (CBUFF_EDMAInfo* ptrEDMAInfo, CBUFF_EDMAChannelCfg* ptrEDMACfg);
static void SRR_MSS_EDMAFreeCBUFFChannel(CBUFF_EDMAChannelCfg* ptrEDMACfg);
static EDMA_Handle SRR_MSS_openEDMA(uint8_t instance);
int32_t SRR_MSS_initEDMA(uint8_t instance);
static void SRR_MSS_edmaErrorCallbackFxn(EDMA_Handle handle, EDMA_errorInfo_t* errorInfo);
static void SRR_MSS_edmaTransferControllerErrorCallbackFxn(EDMA_Handle handle,
                                                    EDMA_transferControllerErrorInfo_t* errorInfo);

/*! @brief
 *  The global variable gwSwUserBuffer will be filled with the object data, and send over LVDS. The
 * size of thar array is determined by the largest message possible and is given by
 * Header, TLV (3 of them) + 'detected objects' +  cluster + trackers + parking Assist.*/
#pragma DATA_ALIGN(gSwUserBuffer, 32);
volatile uint16_t gSwUserBuffer[2048];
#endif
/**
 * @brief
 *  Initialize the MCPI Log Message Buffer
 */
MCPI_LOGBUF_INIT(9216);

/**************************************************************************
 *************************** Extern Functions *****************************
 **************************************************************************/

extern int32_t Test_input (uint8_t gpioNum);
extern int32_t Test_output (uint8_t gpioNum);

/**************************************************************************
 *************************** GPIO Test Functions ***************************
 **************************************************************************/

/**
 *  @b Description
 *  @n
 *      System Initialization Task which initializes the various
 *      components in the system and executes the test.
 *
 *  @retval
 *      Not Applicable.
 */
static void Test_initTask(UArg arg0, UArg arg1)
{
    /* Debug Message: */
    System_printf ("***********************************************\n");
    System_printf ("************** GPIO Unit Tests ****************\n");
    System_printf ("***********************************************\n");

    /* Initialize the test logger framework: */
    MCPI_Initialize ();

    /* Initialize the GPIO */
    GPIO_init ();

    /* Test the GPIO Input: Configure pin J13 as GPIO_1 input */
    Pinmux_Set_OverrideCtrl(SOC_XWR16XX_PINJ13_PADAC, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
    Pinmux_Set_FuncSel(SOC_XWR16XX_PINJ13_PADAC, SOC_XWR16XX_PINJ13_PADAC_GPIO_1);

    /* Test the GPIO Input */
    if (Test_input (SOC_XWR16XX_GPIO_1) < 0)
    {
        MCPI_setFeatureTestResult ("GPIO Input", MCPI_TestResult_FAIL);
        return;
    }
    MCPI_setFeatureTestResult ("GPIO Input", MCPI_TestResult_PASS);

    /* Test the GPIO Output: Configure pin K13 as GPIO_2 output */
    Pinmux_Set_OverrideCtrl(SOC_XWR16XX_PINK13_PADAZ, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
    Pinmux_Set_FuncSel(SOC_XWR16XX_PINK13_PADAZ, SOC_XWR16XX_PINK13_PADAZ_GPIO_2);

    /* Test the GPIO Output */
    if (Test_output (SOC_XWR16XX_GPIO_2) < 0)
    {
        MCPI_setFeatureTestResult ("GPIO Output", MCPI_TestResult_FAIL);
        return;
    }
    MCPI_setFeatureTestResult ("GPIO Output", MCPI_TestResult_PASS);
    return;
}

/**
 *  @b Description
 *  @n
 *      Entry point to the unit tests
 *
 *  @retval
 *      Success  -   0
 *  @retval
 *      Error    -   <0
 */
int32_t main (void)
{
    int32_t         errCode;
    SOC_Handle      socHandle;
    Task_Params     taskParams;
    SOC_Cfg         socCfg;

    /* Initialize the ESM: Dont clear errors as TI RTOS does it */
    ESM_init(0U);

    /* Initialize the SOC confiugration: */
    memset ((void *)&socCfg, 0, sizeof(SOC_Cfg));

    /* Populate the SOC configuration: */
    socCfg.clockCfg = SOC_SysClock_INIT;

    /* Initialize the SOC Module: This is done as soon as the application is started
     * to ensure that the MPU is correctly configured. */
    socHandle = SOC_init (&socCfg, &errCode);
    if (socHandle == NULL)
    {
        System_printf ("Error: SOC Module Initialization failed [Error code %d]\n", errCode);
        return -1;
    }

    /* Initialize the Task Parameters. */
    Task_Params_init(&taskParams);
    taskParams.stackSize = 4*1024;
    Task_create(Test_initTask, &taskParams, NULL);

    /* Start BIOS */
    BIOS_start();
}