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.
工具与软件:
您好!
进行 CPU2设置时出现此错误。
can.c 的路径:C:/DSP_Firmware_28379D/common/can.c
我找到了 hw_can.h 的路径:"C:\DSP_Firmware_28379D\common\F2837xD\F2837xD_common\inc\hw_can.h"
can.c 是我找到的原始文件:"C:\DSP_Firmware_28379D\common\F2837xD\F2837xD_common\driverlib\can.c"、但由于某种原因、它被移至 C:/DSP_Firmware_28379D/common/can.c.
我在这里有点困惑。 我怎样才能使它正确?
对于这种 include "inc/hw_can.h"、如何将文件设置在正确的位置以便以这种方式使用?
谢谢!
洪美湾
您好!
[quote userid="267327" url="~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1461864/tms320f28379d-how-to-get-the-include-file-properly 我找到了 hw_can.h 的路径:"C:\DSP_Firmware_28379D\common\F2837xD\F2837xD_common\inc\hw_can.h"[quote userid="267327"url="~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1461864/tms320f28379d-how-to-get-the-include-file-properly 对于此类 include 文件、#include "inc/hw_can.h"、如何正确地使用此文件来放置引号[/hw_h]确保将以下路径添加到包含搜索路径列表(--include_path)中:
"C:\DSP_Firmware_28379D\common\F2837xD\F2837xD_common"
谢谢
Ki
尊敬的 Ki:
无需将其放入 inc 文件夹"C:\DSP_Firmware_1DSP_DC_28379D\common\F2837xD\F2837xD_common\inc"?
我两者都有。 "C:\DSP_Firmware_28379D\common\F2837xD\F2837xD_common"、和
"C:\DSP_Firmware_1DSP_DC_28379D\common\F2837xD\F2837xD_common\inc"。
如果我将包含两个包含同一个文件的文件夹、编译器将使用哪一个?
谢谢!
洪美湾
无需将其放入 inc 文件夹、"C:\DSP_Firmware_1DSP_DC_28379D\common\F2837xD\F2837xD_common\inc"?
对于"#include "inc/hw_can.h"、编译器需要一个可以放在"inc/hw_can.h"后面的搜索路径来查找文件。 因此:
"C:/DSP_Firmware_28379D/common/F2837xD/F2837xD_common/"+"inc/hw_can.h"= C:/DSP_Firmware_28379D/common/F2837xD/F2837xD_common/inc/hw_can.h"
如果我包含两个包含同一文件的文件夹、编译器将使用哪一个?
它将按列出的路径的顺序进行搜索、直到 首次找到该文件。
非常感谢。 你帮我很多! 祝您度过美好的一天!