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.

AWR2944EVM: Linking custom DPU directory with DPC's objectdetection.c/.h using makefiles

Part Number: AWR2944EVM

Tool/software:

Hi, I have written a custom library which computes STFTs (Short Time FFT) which am trying now to hook up to AWR2944EVM's DDM demo. The  functionality of this additional DPU is explained here: https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1538053/awr2944evm-best-practice-for-modifying-the-demo-source-code 

I have created a new directory within SDK's DPU folder:

  • C:\ti\mmwave_mcuplus_sdk_04_07_00_01\mmwave_mcuplus_sdk_04_07_00_01\ti\datapath\dpu\classificationproc <- My new directory
  • The structure inside mimics that of the SDK, meaning I have 
  • makefile 
  • classificationproclib.mak
  • classificationdpu.h
  • src/classificationdpu.c

From what I understand I need both of these makefiles/.mak to build my librarie's binaries which then will get pulled in during project build by the modified makefile from the objectdetection folder. Is that correct?

After adding the files makefile/.mak to my directory i tired to build the binaries by using these files but I fail to do that. I have run setenv.bat files located here:

  • "C:\ti\mmwave_mcuplus_sdk_04_07_00_01\dsplib_c66x_3_4_0_0\packages\ti\dsplib\setenv.bat"
  • "C:\ti\mmwave_mcuplus_sdk_04_07_00_01\mmwave_mcuplus_sdk_04_07_00_01\scripts\windows\setenv.bat"
  • "C:\ti\mmwave_mcuplus_sdk_04_07_00_01\mmwave_dfp_02_04_17_00\ti\control\mmwavelink\makefiles\setenv.bat"

But still when I run gmake in my folder it fails. So I would greatly appreciate it if you could let me know how to build the binaries for further usage inside the demo?

Best regards

Mark 

  • Hi Mark,

    "C:\ti\mmwave_mcuplus_sdk_04_07_00_01\mmwave_mcuplus_sdk_04_07_00_01\scripts\windows\setenv.bat"

    Setting environment variables by running this batch file should be sufficient. You don't need to run other batch files.

    But still when I run gmake in my folder it fails

    Firstly, are you able to rebuild any other library or tests in C:\ti\mmwave_mcuplus_sdk_,ver>\mmwave_mcuplus_sdk_<ver>\ti\datapath?

    Did you update the paths and names of all files in the makefiles? Please check the build errors to understand where it fails.

    Regards,

    Samhitha

  • Hi, 

    I have mistakenly used the wrong setenv.bat file, which didn't have the platform set etc. After using the correct file: "C:\ti\mmwave_mcuplus_sdk_04_07_00_01\mmwave_mcuplus_sdk_04_07_00_01\scripts\windows\setenv.bat" my source code did compile and 2 binary files were created. Though I still have a problem and some questions.

    The problem: in my ocde there is a line which allocates the outputbuffer for the computed STFT it uses the type (cmplx16ImRe_t), since this did not work for now I have used the type (uint16_t) but this won't work in practice:

    obj->outBufBytes = (size_t) numChirps * numOutBins * sizeof(uint16_t);
    //obj->outBufBytes = (size_t) numChirps * numOutBins * sizeof(cmplx16ImRe_t);

    I wasn't quite able to figure out which header files do I need to include to get this type. I have tried and placed these two header files in my .c file but it didn't work and the compiler kept crashing due to an unknown type:

    #include <ti/common/syscommon.h>
    #include <ti/control/mmwavelink/mmwavelink.h>

    Which headers should I include to get the complex datatypes?

    The questions:   

    • 2 binary files were created a ".ae66" and a ".aer5f". Do I actually need both? The DSS/DPU runs on the c66x so isn't the file for the R5F on which the MSS runs redundant?
    • How do I now cleanly inlcude the created binary in objectdetection.c? Should I modify the makefile in this directory: C:\ti\mmwave_mcuplus_sdk_04_07_00_01\mmwave_mcuplus_sdk_04_07_00_01\ti\datapath\dpc\objectdetection\objdethwaDDMA and then include the headerfile of my library in the .c file itself?
  • Mark,

    Which headers should I include to get the complex datatypes?

    Structure for a complex number is defined in C:\ti\mmwave_mcuplus_sdk_04_07_01_03\mcu_plus_sdk_awr294x_10_01_00_04\source\drivers\hw_include\csl_complex_math_types.h.

    2 binary files were created a ".ae66" and a ".aer5f". Do I actually need both? The DSS/DPU runs on the c66x so isn't the file for the R5F on which the MSS runs redundant?

    You don't need to create R5F library.

    How do I now cleanly inlcude the created binary in objectdetection.c? Should I modify the makefile in this directory: C:\ti\mmwave_mcuplus_sdk_04_07_00_01\mmwave_mcuplus_sdk_04_07_00_01\ti\datapath\dpc\objectdetection\objdethwaDDMA and then include the headerfile of my library in the .c file itself?

    makefile in the directory that you are pointing to is the used to build the DPC test. Instead, the library and it's path should be included in the application's DSS core makefile - C:\ti\mmwave_mcuplus_sdk_04_07_01_03\mmwave_mcuplus_sdk_04_07_01_03\ti\demo\awr294x\mmw\dss\mmw_dss.mak. You can check how the DPU libs are included and follow the same to include your library.

    Regards,

    Samhitha