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.

TMS320F28379D: How to get the include file properly?

Part Number: TMS320F28379D


Tool/software:

Hi,

I have this error while doing the cpu2 settings.

The path for can.c: C:/DSP_Firmware_28379D/common/can.c

The path for hw_can.h I found: "C:\DSP_Firmware_28379D\common\F2837xD\F2837xD_common\inc\hw_can.h"

can.c is the original file I found : "C:\DSP_Firmware_28379D\common\F2837xD\F2837xD_common\driverlib\can.c", but for some reason it was moved to C:/DSP_Firmware_28379D/common/can.c.

I am kind of confused here. How can I make it right? 

For this kind of include, #include "inc/hw_can.h", how to make the file in the right place in order to use this way?

Thanks,

Hongmei Wan

  • Hello,

    The path for hw_can.h I found: "C:\DSP_Firmware_28379D\common\F2837xD\F2837xD_common\inc\hw_can.h"
    For this kind of include, #include "inc/hw_can.h", how to make the file in the right place in order to use this way

    Make sure you have the follow path added to your include search path list (--include_path):

    "C:\DSP_Firmware_28379D\common\F2837xD\F2837xD_common"

    Thanks

    ki

  • Hi Ki,

    No need to get it into inc folder, "C:\DSP_Firmware_1DSP_DC_28379D\common\F2837xD\F2837xD_common\inc"?

    I have both. "C:\DSP_Firmware_28379D\common\F2837xD\F2837xD_common", and

    "C:\DSP_Firmware_1DSP_DC_28379D\common\F2837xD\F2837xD_common\inc".

    If I include two folder containing the same file, which one is the compiler going to use?

    Thanks,

    Hongmei Wan

  • No need to get it into inc folder, "C:\DSP_Firmware_1DSP_DC_28379D\common\F2837xD\F2837xD_common\inc"?

    For "#include "inc/hw_can.h", the compiler needs a search path that it can prepend to "inc/hw_can.h" to find the file. So:

    "C:/DSP_Firmware_28379D/common/F2837xD/F2837xD_common/" + "inc/hw_can.h" =  C:/DSP_Firmware_28379D/common/F2837xD/F2837xD_common/inc/hw_can.h"

    If I include two folder containing the same file, which one is the compiler going to use?

    It will search in order of the listed paths until it first finds the file.

  • Thank you very much. You help me a lot! Have a wonderful day!