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.

IWR1642BOOST: Interfacing with through UART with c++.

Part Number: IWR1642BOOST

I am trying to use the built in API in order to interface with the board through UART.  I cannot compile the code becuase I get the error that the SOC_ModuleID has not been declared.  I have tried to compile in sdk ver 1.02 and 2.00 with the same problem in each.  

Here is the error message that I am getting.

In file included from /home/parallels/ti/mmwave_sdk_02_00_00_04/packages/ti/control/mmwave/mmwave.h:164:0,
from driver.cpp:13:
/home/parallels/ti/mmwave_sdk_02_00_00_04/packages/ti/drivers/soc/soc.h:347:61: error: ‘SOC_ModuleId’ has not been declared
extern int32_t SOC_setPeripheralClock( SOC_Handle handle, SOC_ModuleId module, SOC_PeripheralClkSource clkSource,
^
/home/parallels/ti/mmwave_sdk_02_00_00_04/packages/ti/drivers/soc/soc.h:348:57: error: ‘SOC_ModuleId’ has not been declared
extern int32_t SOC_initPeripheralRam(SOC_Handle handle, SOC_ModuleId module, int32_t* errCode);

  • Hi Davis,

    Are you writing custom software, or starting with a demo? If writing your own software, are you using the RTOS?

    For an example of using the UART, please see the Out of Box demo - all the source code is available in the SDK.
    C:\ti\mmwave_sdk_02_00_00_04\packages\ti\demo\xwr16xx\mmw\mss
    mss_main.c initializes the UART in the mssInitTask at line 2273.

    Regards,
    Justin
  • Hi Davis,

    Are you still having issues with the UART driver?

    Regards,
    Justin
  • I am writing custom software as I have messed around with the demo a fair bit.  Right now I am not even to the point of initializing or trying to run the UART, I am getting errors on compile.  I have the #include <ti/control/mmwave/mmwave.h> that is necessary to use the mm-wave API.  It says that in soc/soc.h SOC_ModuleId hasn't been declared.  I have tried both sdk version 1.02 and 2.00. I get the same error in both.

  • Hi Davis,

    To initialize the SOC, you will have to cal SCO_init(soc_config, error_code). Ensure you are including soc.h from <ti/drivers/soc/soc.h>
    Please view the source code of the Out of Box demo to see how this is done in main().

    Regards,
    Justin
  • The problem is with including the soc.h. I have included the mmwave.h, which includes soc.h.  I am getting an error when I compile with no code in the main and only including the mmwave.h.  This error is in soc.h, which i have not modified from when I downloaded and built the sdk.  The compilation and error are below:

    g++ -Wall -std=c++11 -o driver driver.cpp -I/home/parallels/ti/mmwave_sdk_01_02_00_05/packages/
    In file included from /home/parallels/ti/mmwave_sdk_01_02_00_05/packages/ti/control/mmwave/mmwave.h:164:0,
    from driver.cpp:13:
    /home/parallels/ti/mmwave_sdk_01_02_00_05/packages/ti/drivers/soc/soc.h:346:61: error: ‘SOC_ModuleId’ has not been declared
    extern int32_t SOC_setPeripheralClock( SOC_Handle handle, SOC_ModuleId module, SOC_PeripheralClkSource clkSource, uint8_t clkDivisor, int32_t* errCode);
    ^
    /home/parallels/ti/mmwave_sdk_01_02_00_05/packages/ti/drivers/soc/soc.h:347:57: error: ‘SOC_ModuleId’ has not been declared
    extern int32_t SOC_initPeripheralRam(SOC_Handle handle, SOC_ModuleId module, int32_t* errCode);

    My entire driver.cpp file is below:

    #include <ti/control/mmwave/mmwave.h>
    #include <ti/drivers/uart/UART.h>

    using namespace std;

    int main()
    {

    }

    This results in the error above when i compile the code below.  Thank you for taking the time to help me.

    Davis

  • Hi Davis,

    You need to declare a device type. See line 76 - 82 in soc.h:
    #ifdef SOC_XWR14XX
    #include <ti/drivers/soc/include/soc_xwr14xx.h>
    #endif

    #ifdef SOC_XWR16XX
    #include <ti/drivers/soc/include/soc_xwr16xx.h>
    #endif

    The files included in the if statements have the SOC_ModuleId declaration.

    Ideally, you will define the device in the project settings in CCS, or in the makefile.

    Regards,
    Justin