CCS/IWR6843: SPI test compile error Part Number: IWR6843 Tool/software: Code Composer Studio I'm trying to test SPI function on IWR6843. After finished pinmux settings, I modified the mss_main.c code of 3D people counting and added the SPI test code based on sample code in the path: C:\ti\mmwave_sdk_03_03_00_03\packages\ti\drivers\spi\test\xwr68xx I already done SPI_init(), SPI_Params_init(¶ms); But there were many errors occurred. Please explain (something like 3D_people_count_68xx_mss.xe4f not built, other errors and help me solve it. Here's the code I used void Test_spiSlaveWithPC(void) { SPI_Params params; SPI_Handle handle; spiTestMsg* pTestMsg; uint16_t retry=0; uint16_t msgSeqNo = 0; uint32_t loop; volatile uint32_t cycles; float throughput; uint32_t totalLoop; /* Setup the default SPI Parameters */ SPI_Params_init(¶ms); params.mode = SPI_SLAVE; params.frameFormat = SPI_POL0_PHA1; params.pinMode = SPI_PINMODE_4PIN_CS; params.shiftFormat = SPI_MSB_FIRST; /* When communicating with PC through FTDI, it is difficult to toggle CS for every two bytes, hence set csHold to 1. In this mode, the highest working SPI clock is 2MHz */ params.csHold = 1; /* Enable DMA and set DMA channels */ params.dmaEnable = 1; params.dmaHandle = gDmaHandle; params.u.slaveParams.dmaCfg.txDmaChanNum =1U; params.u.slaveParams.dmaCfg.rxDmaChanNum =0U; handle = SPI_open(0, ¶ms); if (handle == NULL) { System_printf("Error: Unable to open the SPI Instance\n"); MCPI_setFeatureTestResult ("SPI Slave with PC ", MCPI_TestResult_FAIL); return; } memset((void *)txBuf, 0x55, SPI_TEST_MSGLEN); System_printf("Debug: SPI Instance %p has been reopened in SLAVE mode successfully for 4pin FTDI testing\n", handle); gXWR1xxxSlaveReady = true; while(1) { Test_spiRead(handle, SPI_TEST_MSGLEN, (void *)rxBuf, 0U); pTestMsg = (spiTestMsg*)&rxBuf[0]; if(pTestMsg->magicNumber != SWAP_BYTES(MAGIC_NUMBER)) { System_printf("incorrect magic Number: 0x%x 0x%x\n", pTestMsg->magicNumber, SWAP_BYTES(MAGIC_NUMBER)); continue; } if((pTestMsg->dataLen != SWAP_BYTES(SPI_TEST_SYNC_MSGLEN)) || (pTestMsg->seqNo != 0)) { System_printf("incorrect datalen(%d), seqNo= %d\n", pTestMsg->dataLen, pTestMsg->seqNo); continue; } /* Got the correct sync message, send back the message */ msgSeqNo = SWAP_BYTES(pTestMsg->seqNo); pTestMsg->seqNo = SWAP_BYTES(msgSeqNo+1); /* Read two byte , send it back */ Test_spiWrite(handle, SPI_TEST_MSGLEN, (void *)pTestMsg, 0U); break; } /* Save the Sync message for re-sent */ memcpy((void *)txBuf, (void *)pTestMsg, SPI_TEST_MSGLEN); /* Got the Sync message, waiting for next test message */ msgSeqNo += 2; /* Test loop count from first 16 bits of Sync message */ loop = pTestMsg->data[0] * 256 + pTestMsg->data[1] ; System_printf("Test loop=%d, bufferLen=%d\n", loop, SPI_TEST_MSGLEN); totalLoop = loop; while(loop) { /* Read two byte , send it back */ Test_spiRead(handle, SPI_TEST_MSGLEN, (void *)rxBuf, 0U); if(pTestMsg->magicNumber != SWAP_BYTES(MAGIC_NUMBER)) { continue; } if((pTestMsg->seqNo == 0) && (pTestMsg->dataLen == SWAP_BYTES(SPI_TEST_SYNC_MSGLEN))) { /* Re-sent the Sync message */ Test_spiWrite(handle, SPI_TEST_MSGLEN, (void *)txBuf, 0U); continue; } /* Receive Last message */ if(pTestMsg->seqNo == SWAP_BYTES(msgSeqNo - 2)) { Test_spiWrite(handle, SPI_TEST_MSGLEN, (void *)txBuf, 0U); retry++; continue; } /* Incorrect seqNo, drop the message */ if(pTestMsg->seqNo != SWAP_BYTES(msgSeqNo)) { retry++; continue; } if(loop == totalLoop) { // Start the counter after receive the first message Test_benchmarkStart(0); } retry = 0; loop--; /* Receive the message with correct header, increment the seq Number */ pTestMsg->seqNo = SWAP_BYTES(SWAP_BYTES(pTestMsg->seqNo) + 1); Test_spiWrite(handle, SPI_TEST_MSGLEN, (void *)pTestMsg, 0U); msgSeqNo += 2; } // Stop the counter cycles = Test_benchmarkStop(0); // Calculate and print the count throughput = 8.0 * SPI_TEST_MSGLEN * totalLoop * VBUSP_FREQ / cycles; System_printf("Debug: throughput overall = %.2f Mbps\n", throughput); MCPI_setFeatureTestResult ("SPI Slave with PC ", MCPI_TestResult_PASS); } /** * @b Description * @n * System Initialization Task which initializes the various * components in the system. * * @retval * Not Applicable. */ static void Pcount3DDemo_initTask(UArg arg0, UArg arg1) { int32_t errCode; MMWave_InitCfg initCfg; UART_Params uartParams; Task_Params taskParams; Semaphore_Params semParams; DPM_InitCfg dpmInitCfg; DMA_Params dmaParams; DMA_Handle dmaHandle; SPI_Params params; SPI_Handle handle; SOC_Handle socHandle; spiTestMsg* pTestMsg; int32_t retVal = 0; /* Get SOC driver Handle */ socHandle = (SOC_Handle) arg0; DPC_ObjectDetectionRangeHWA_InitParams objDetInitParams; // int32_t i; /* Debug Message: */ System_printf("Debug: Launched the Initialization Task\n"); /* Initialize MCPI logger framework */ MCPI_Initialize (); /***************************************************************************** * Initialize the mmWave SDK components: *****************************************************************************/ /* Initialize the UART */ UART_init(); /* Initialize the DMA for UART */ DMA_init (); /* Open DMA driver instance 0 for SPI test */ gDmaHandle = DMA_open(0, &dmaParams, &retVal); if(gDmaHandle == NULL) { printf("Open DMA driver failed with error=%d\n", retVal); return; } /* Initialize the SPI */ SPI_init(); /* Setup the default SPI Parameters */ SPI_Params_init(¶ms); /************************************************************************** * Test: One instace API test - SPIA **************************************************************************/ Test_spiAPI_oneInstance(0); System_printf("Debug: Finished API Test for SPIA!\n"); /************************************************************************** * Test: One instace API test - SPIB **************************************************************************/ Test_spiAPI_oneInstance(1); System_printf("Debug: Finished API Test for SPIB!\n"); /************************************************************************** * Test: two instaces API test - SPIA & SPIB **************************************************************************/ Test_spiAPI_twoInstance(); System_printf("Debug: Finished API Test for SPIA + SPIB!\n"); if(gXWR1xxxSlaveWithFTDITest) { /* Enable output control for SPIA in 4Pin mode */ if(SOC_SPIOutputCtrl(socHandle, 0U, 0U, &errCode) < 0) { /* Debug Message: */ System_printf ("Debug: SOC_SPIOutputCtrl failed with Error [%d]\n", errCode); return; } Test_spiSlaveWithPC(); } /* Open the DMA Instance */ DMA_Params_init(&dmaParams); dmaHandle = DMA_open(0, &dmaParams, &errCode); if (dmaHandle == NULL) { printf ("Error: Unable to open the DMA Instance [Error code %d]\n", errCode); return; } /* Initialize the GPIO */ GPIO_init(); /* Initialize the Mailbox */ Mailbox_init(MAILBOX_TYPE_MSS); /* Platform specific configuration */ Pcount3DDemo_platformInit(&gMmwMssMCB.cfg.platformCfg); /***************************************************************************** * Open the mmWave SDK components: *****************************************************************************/ /* Setup the default UART Parameters */ UART_Params_init(&uartParams); uartParams.clockFrequency = gMmwMssMCB.cfg.platformCfg.sysClockFrequency; uartParams.baudRate = gMmwMssMCB.cfg.platformCfg.commandBaudRate; uartParams.isPinMuxDone = 1; /* Open the UART Instance */ gMmwMssMCB.commandUartHandle = UART_open(0, &uartParams); if (gMmwMssMCB.commandUartHandle == NULL) { Pcount3DDemo_debugAssert (0); return; } /* Setup the default UART Parameters */ UART_Params_init(&uartParams); uartParams.writeDataMode = UART_DATA_BINARY; uartParams.readDataMode = UART_DATA_BINARY; uartParams.clockFrequency = gMmwMssMCB.cfg.platformCfg.sysClockFrequency; uartParams.baudRate = gMmwMssMCB.cfg.platformCfg.loggingBaudRate; uartParams.isPinMuxDone = 1U; uartParams.dmaHandle = dmaHandle; uartParams.txDMAChannel = UART_DMA_TX_CHANNEL; uartParams.rxDMAChannel = UART_DMA_RX_CHANNEL; /* Open the Logging UART Instance: */ gMmwMssMCB.loggingUartHandle = UART_open(1, &uartParams); if (gMmwMssMCB.loggingUartHandle == NULL) { System_printf("Error: Unable to open the Logging UART Instance\n"); Pcount3DDemo_debugAssert (0); return; } /* Create binary semaphores which is used to signal DPM_start/DPM_stop/DPM_ioctl is done * to the sensor management task. The signalling (Semaphore_post) will be done * from DPM registered report function (which will execute in the DPM execute task context). */ Semaphore_Params_init(&semParams); semParams.mode = Semaphore_Mode_BINARY; gMmwMssMCB.DPMstartSemHandle = Semaphore_create(0, &semParams, NULL); gMmwMssMCB.DPMstopSemHandle = Semaphore_create(0, &semParams, NULL); gMmwMssMCB.DPMioctlSemHandle = Semaphore_create(0, &semParams, NULL); /* Open EDMA driver */ Pcount3DDemo_edmaInit(&gMmwMssMCB.dataPathObj, DPC_OBJDET_R4F_EDMA_INSTANCE); /* Use EDMA instance 0 on MSS */ Pcount3DDemo_edmaOpen(&gMmwMssMCB.dataPathObj, DPC_OBJDET_R4F_EDMA_INSTANCE); Pcount3DDemo_hwaInit(&gMmwMssMCB.dataPathObj); Pcount3DDemo_hwaOpen(&gMmwMssMCB.dataPathObj, gMmwMssMCB.socHandle); /***************************************************************************** * mmWave: Initialization of the high level module *****************************************************************************/ /* Initialize the mmWave control init configuration */ memset ((void*)&initCfg, 0 , sizeof(MMWave_InitCfg)); /* Populate the init configuration: */ initCfg.domain = MMWave_Domain_MSS; initCfg.socHandle = gMmwMssMCB.socHandle; initCfg.eventFxn = Pcount3DDemo_eventCallbackFxn; initCfg.linkCRCCfg.useCRCDriver = 1U; initCfg.linkCRCCfg.crcChannel = CRC_Channel_CH1; initCfg.cfgMode = MMWave_ConfigurationMode_FULL; initCfg.executionMode = MMWave_ExecutionMode_ISOLATION; /* Initialize and setup the mmWave Control module */ gMmwMssMCB.ctrlHandle = MMWave_init (&initCfg, &errCode); if (gMmwMssMCB.ctrlHandle == NULL) { /* Error: Unable to initialize the mmWave control module */ System_printf ("Error: mmWave Control Initialization failed [Error code %d]\n", errCode); Pcount3DDemo_debugAssert (0); return; } System_printf ("Debug: mmWave Control Initialization was successful\n"); /* Synchronization: This will synchronize the execution of the control module * between the domains. This is a prerequiste and always needs to be invoked. */ if (MMWave_sync (gMmwMssMCB.ctrlHandle, &errCode) < 0) { /* Error: Unable to synchronize the mmWave control module */ System_printf ("Error: mmWave Control Synchronization failed [Error code %d]\n", errCode); Pcount3DDemo_debugAssert (0); return; } System_printf ("Debug: mmWave Control Synchronization was successful\n"); // Create a task to do SPI /* Task_Params_init(&taskParams); taskParams.stackSize = 6*1024; taskParams.arg0 = (UArg)socHandle; Task_create(Test_initTask, &taskParams, NULL);*/ /***************************************************************************** * Launch the mmWave control execution task * - This should have a higher priroity than any other task which uses the * mmWave control API *****************************************************************************/ Task_Params_init(&taskParams); taskParams.priority = MMWDEMO_MMWAVE_CTRL_TASK_PRIORITY; taskParams.stackSize = 2800; gMmwMssMCB.taskHandles.mmwaveCtrl = Task_create(Pcount3DDemo_mmWaveCtrlTask, &taskParams, NULL); /***************************************************************************** * Create a task to do DMA based UART data transfer *****************************************************************************/ /* Create a binary semaphore for application task to pend */ Semaphore_Params_init(&semParams); semParams.mode = Semaphore_Mode_BINARY; gMmwMssMCB.uartTxSemHandle = Semaphore_create(0, &semParams, NULL); Task_Params_init(&taskParams); taskParams.priority = MMWDEMO_UARTTX_TASK_PRIORITY; taskParams.stackSize = 800; Task_create(MmwDemo_uartTxTask, &taskParams, NULL); /***************************************************************************** * Initialization of the DPM Module: *****************************************************************************/ memset ((void *)&objDetInitParams, 0, sizeof(DPC_ObjectDetectionRangeHWA_InitParams)); /* Note this must be after Pcount3DDemo_dataPathOpen() above which opens the hwa */ objDetInitParams.L3ramCfg.addr = (void *)&gMmwL3[0]; objDetInitParams.L3ramCfg.size = sizeof(gMmwL3); objDetInitParams.CoreLocalRamCfg.addr = &gDPCTCM[0]; objDetInitParams.CoreLocalRamCfg.size = sizeof(gDPCTCM); objDetInitParams.edmaHandle = gMmwMssMCB.dataPathObj.edmaHandle; objDetInitParams.hwaHandle = gMmwMssMCB.dataPathObj.hwaHandle; /* DPC Call-back config */ objDetInitParams.processCallBackFxn.processInterFrameBeginCallBackFxn = Pcount3DDemo_DPC_ObjectDetection_processInterFrameCallBackFxn; objDetInitParams.processCallBackFxn.processFrameBeginCallBackFxn = Pcount3DDemo_DPC_ObjectDetection_processFrameBeginCallBackFxn; /* Setup the configuration: */ memset ((void *)&dpmInitCfg, 0, sizeof(DPM_InitCfg)); dpmInitCfg.socHandle = gMmwMssMCB.socHandle; dpmInitCfg.ptrProcChainCfg = &gDPC_ObjDetRangeHWACfg;; dpmInitCfg.instanceId = DPC_OBJDET_R4F_INSTANCEID; dpmInitCfg.domain = DPM_Domain_DISTRIBUTED; dpmInitCfg.reportFxn = Pcount3DDemo_DPC_ObjectDetection_reportFxn; dpmInitCfg.arg = &objDetInitParams; dpmInitCfg.argSize = sizeof(DPC_ObjectDetectionRangeHWA_InitParams); /* Initialize the DPM Module: */ gMmwMssMCB.objDetDpmHandle = DPM_init (&dpmInitCfg, &errCode); if (gMmwMssMCB.objDetDpmHandle == NULL) { System_printf ("Error: Unable to initialize the DPM Module [Error: %d]\n", errCode); Pcount3DDemo_debugAssert (0); return; } /* Synchronization: This will synchronize the execution of the datapath module * between the domains. This is a prerequiste and always needs to be invoked. */ while (1) { int32_t syncStatus; /* Get the synchronization status: */ syncStatus = DPM_synch (gMmwMssMCB.objDetDpmHandle, &errCode); if (syncStatus < 0) { /* Error: Unable to synchronize the framework */ System_printf ("Error: DPM Synchronization failed [Error code %d]\n", errCode); Pcount3DDemo_debugAssert (0); return; } if (syncStatus == 1) { /* Synchronization acheived: */ break; } /* Sleep and poll again: */ Task_sleep(1); } #ifdef TRACKERPROC_EN /***************************************************************************** * Create a task to run tracker DPU at lower priority than HWA DPC *****************************************************************************/ /* Create a binary semaphore for application task to pend */ Semaphore_Params_init(&semParams); semParams.mode = Semaphore_Mode_BINARY; gMmwMssMCB.trackerDPUSemHandle = Semaphore_create(0, &semParams, NULL); Task_Params_init(&taskParams); taskParams.priority = MMWDEMO_TRACKERDPU_TASK_PRIORITY; taskParams.stackSize = 7*1024; Task_create(MmwDemo_trackerDPUTask, &taskParams, NULL); #endif /* Launch the DPM Task */ Task_Params_init(&taskParams); taskParams.priority = MMWDEMO_DPC_OBJDET_DPM_TASK_PRIORITY; taskParams.stackSize = 7*1024; gMmwMssMCB.taskHandles.objDetDpmTask = Task_create(mmwDemo_mssDPMTask, &taskParams, NULL); /***************************************************************************** * Initialize the Profiler *****************************************************************************/ Cycleprofiler_init(); /***************************************************************************** * Initialize the CLI Module: *****************************************************************************/ Pcount3DDemo_CLIInit(MMWDEMO_CLI_TASK_PRIORITY); return; } int main(void) { /*======================================= * Setup the PINMUX to bring out the MibSpiA *=======================================*/ /* NOTE: Please change the following pin configuration according to EVM used for the test */ /* SPIA_MOSI */ Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PIND13_PADAD, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL); Pinmux_Set_FuncSel(SOC_XWR68XX_PIND13_PADAD, SOC_XWR68XX_PIND13_PADAD_SPIA_MOSI); /* SPIA_MISO */ Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINE14_PADAE, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL); Pinmux_Set_FuncSel(SOC_XWR68XX_PINE14_PADAE, SOC_XWR68XX_PINE14_PADAE_SPIA_MISO); /* SPIA_CLK */ Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINE13_PADAF, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL); Pinmux_Set_FuncSel(SOC_XWR68XX_PINE13_PADAF, SOC_XWR68XX_PINE13_PADAF_SPIA_CLK); /* SPIA_CS */ Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINE15_PADAG, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL); Pinmux_Set_FuncSel(SOC_XWR68XX_PINE15_PADAG, SOC_XWR68XX_PINE15_PADAG_SPIA_CSN); /* SPI_HOST_INTR - not used, reference code */ Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINP13_PADAA, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL); Pinmux_Set_FuncSel(SOC_XWR68XX_PINP13_PADAA, SOC_XWR68XX_PINP13_PADAA_SPI_HOST_INTR); /*======================================= * Setup the PINMUX to bring out the MibSpiB *=======================================*/ /* NOTE: Please change the following pin configuration according to EVM used for the test */ /* Setup the PINMUX to bring out the MibSpiB */ Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINF13_PADAH, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL); Pinmux_Set_FuncSel(SOC_XWR68XX_PINF13_PADAH, SOC_XWR68XX_PINF13_PADAH_SPIB_MOSI); Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PING14_PADAI, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL); Pinmux_Set_FuncSel(SOC_XWR68XX_PING14_PADAI, SOC_XWR68XX_PING14_PADAI_SPIB_MISO); Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINF14_PADAJ, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL); Pinmux_Set_FuncSel(SOC_XWR68XX_PINF14_PADAJ, SOC_XWR68XX_PINF14_PADAJ_SPIB_CLK); Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINH14_PADAK, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL); Pinmux_Set_FuncSel(SOC_XWR68XX_PINH14_PADAK, SOC_XWR68XX_PINH14_PADAK_SPIB_CSN); /* SPIB signals are connected to PMIC and XDS110 , unless the connection is removed on XWR16 EVM, SPI signals can not be enabled as output. */ #if 0 /* Enable output control for SPIB */ if(SOC_SPIOutputCtrl(socHandle, 1U, 1U, &errCode) < 0) { /* Debug Message: */ System_printf ("Debug: SOC_SPIOutputCtrl failed with Error [%d]\n", errCode); goto Exit; } #endif /* SPIA DMA and interrupt signals are muxed with other IPs in the SOC. * Map them to SPIA. */ if (SOC_selectDMARequestMapping(socHandle, SOC_MODULE_SPIA, &errCode) < 0) { /* Debug Message: */ System_printf ("Debug: SOC_selectDMARequestMapping (SPIA) failed with Error [%d]\n", errCode); goto Exit; } if (SOC_selectInterruptRequestMapping(socHandle, SOC_MODULE_SPIA, &errCode) < 0) { /* Debug Message: */ System_printf ("Debug: SOC_selectInterruptRequestMapping (SPIA) failed with Error [%d]\n", errCode); goto Exit; } /* Debug Message: */ System_printf ("**********************************************\n"); System_printf ("Debug: Launching the MMW Demo on MSS\n"); System_printf ("**********************************************\n"); /* Initialize the Task Parameters. */ Task_Params_init(&taskParams); gMmwMssMCB.taskHandles.initTask = Task_create(Pcount3DDemo_initTask, &taskParams, NULL); /* Start BIOS */ BIOS_start(); Exit: return 0; } Hi Hector, Your errors are all unresolved symbols. This means the linker cannot find a compiled version of the functions you are trying to use. For example, one of your errors is "Unresolved Symbol: SPI_init()" - this means that the SPI library isn't properly included or linked. Please check the following: SPI and other new libraries are included in the relevant files SPI and other new libraries have a path in linker properties. Right click on the CCS project Select Properties at the bottom Select linker on the left Ensure there is a path in the linker setting to spi lib Regards, Justin Hi Justin, I added spi lib path to the project but compile still got the same error. Please show me how to solve it with illustration photo. Hi Justin, I also tried another method to add library by clicking to mss project ->Properties->Add files. Then I chose libspi_xwr68xx.aer4f in the path C:\ti\mmwave_sdk_03_03_00_03\packages\ti\drivers\spi\lib. But it still showed #10010 null: errors encountered during linking; "3D_people_count_68xx_mss.xer4f" not built 3D_people_count_68xx_mss C/C++ Problem null: unresolved symbols remain 3D_people_count_68xx_mss C/C++ Problem Import a library should be easy. I don't know why it failed. Here's the message when I tried to add lib file to project Hi Justin, I got less compiling error by adding xwr68xx_spi_mss.xer4f in the path C:\ti\mmwave_sdk_03_03_00_03\packages\ti\drivers\spi\test\xwr68xx to the project. Previously, I got 13 compile errors. After added xwr68xx_spi_mss.xer4f, now I only see 4 errors. Not sure whether this is better or not. But even if I don't use SPI function and remove all SPI commands, I still have these 4 errors after adding xwr68xx_spi_mss.xer4f to my project. If I don't add it, I only got compile error when I use SPI commands. How to solve it? I expect I can use SPI/I2C within this week, but I got stuck at library linking even though it seems to be easy. 1. Here's the error after I added xwr68xx_spi_mss.xer4f error: "could not be statically or dynamically linked null: file "C:/ti/mmwave_sdk_03_03_00_03/packages/ti/drivers/spi/test/xwr68xx/xwr68xx_spi_mss.xer4f" could not be statically or dynamically linked 3D_people_count_68xx_mss C/C++ Problem 2. Here's the error without xwr68xx_spi_mss.xer4f, I only added libspi_xwr68xx.aer4f in the path C:\ti\mmwave_sdk_03_03_00_03\packages\ti\drivers\spi\lib Hi Hector, You are linking the test library, instead you need to link the functional library. It is at: C:\ti\mmwave_sdk_03_03_00_03\packages\ti\drivers\spi\lib You can read mmWave SDK module documentation here: C:\ti\mmwave_sdk_03_03_00_03\docs\mmwave_sdk_module_documentation.html - if you go through the SPI documentation, you can see all external functions, which are the ones you should be using. Do not use the "Test" functions unless you are specifically trying to test the functionality of the module. Regards, Justin Hi Justin, 1. I modified my code, there's no compile error now. But I'm not sure how to test SPI function with UART GUI. As my understanding, we must connect PC to FTDI port on MMWAVEICBOOST in order to use SPI, right? If it's right, do I need to change S1 switch as below to use FTDI? The problem is: after I switched as above and connect PC to FTDI port, I don't see any port number on PC Device Manager to connect device to GUI even though I installed FTDI driver on Windows. How to connect? 2. I see in test_common.c in the path C:\ti\mmwave_sdk_03_03_00_03\packages\ti\drivers\spi\test\common has a function MCPI_setFeatureTestResult ((const char *)&testCase[0], MCPI_TestResult_PASS); I think it's to test whether SPI pass or not. But I can't find where its declaration located. Please tell me more about MCPI_setFeatureTestResult if it's really used to test SPI. 3. How can we send data from IWR6843 to MMWAVEICBOOST via SPI, then send to PC via UART and display on GUI? Below is some basic SPI function in my code, but I don't know how to combine it with UART data transfer to check whether SPI works well and display tracking on GUI correctly. static int32_t Test_spiReadWrite(const SPI_Handle handle, uint32_t dataLen, void* inBuffer, void* outBuffer, uint8_t slaveIndex) { SPI_Transaction transaction; /* Configure Data Transfer */ transaction.count = dataLen; transaction.txBuf = outBuffer; transaction.rxBuf = inBuffer; transaction.slaveIndex = slaveIndex; /* Start Data Transfer */ if (SPI_transfer(handle, &transaction) != true) { return -1; } return 0; } void MmwDemo_mssInitTask(UArg arg0, UArg arg1) { // UART function UART_init(); } int main(void) { //handle = SPI_open(someSPI_configIndexValue, ¶ms); handle = SPI_open(0, ¶ms); if (!handle) { System_printf("SPI did not open"); } /* Initialize the Task Parameters. */ Task_Params_init(&taskParams); taskParams.priority = 3; taskParams.stackSize = 4*1024; Task_create(MmwDemo_mssInitTask, &taskParams, NULL); } Hi Hector, The FTDI port on the ICBOOST is only for mmWave studio direct control. We don't provide a driver for SPI to windows PC interface. To use the SPI connection, you will need to set the device in 40 Pin BP/LP mode, then connect some other device (like a beagle bone raspberry pi) to SPI pins. Regarding test code - these are unit tests that can be used to ensure the SPI driver is functioning correctly. Unit test documentation is here: /docs/mmwave_sdk_unit_test_procedure.pdf You should not be using any of the test functions in your application. Regards, Justin Hi Justin, I checked mmwave_sdk_unit_test_procedure.pdf as you said. It mentions we can test SPI on PC via FTDI port by setting gXWR1xxxSlaveWithFTDITest = 1. But I'm still unclear how to check whether SPI function works well in this case. If I write SPI transfer function correctly, and connect IWR6843 EVM from FTDI port to PC USB port. Thencompany GUI can still display tracking ? Orcompany GUI for IWR6843 3D people counting is only to demo via UART on XDS110 port and can't read SPI data from FTDI port? Hi Hector, I believe Charles answered your questions here: /support/sensors/f/1023/t/897434 - SPI will come out, but we don't have applications that support it, so you will have to find a python library that parses SPI. Regards, Justin