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.
Dear sir.
I have built a project that is imported from C:\ti\controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.1\HVPM_Sensored. Because I want to use the eCAN module, I adopted the configuration of this application report downloaded from the following URL: http://www.ti.com/lit/zip/spraby7. I got a warning message like the following figure; function "InitECan" declared implicitly. But, there is no warning message in the example project from spraby7. Why?
Thanks
Hi,
It appears that the compiler can not find the header file that contains that definition of the InitECan(). Can you confirm that the path to the directory DSP2803x_headers/include is added to the project's include paths. You can check this in the Project Properties under Build -> C2000 Compiler -> Include Options.
- Ozino
Dear Ozino, Thanks for your reply. As per the figure, I have included the header file. The DSP2803x_ECan.h and DSP2803x_ECan.c files are the original from TI. If we review these two files, we can find the prototype functions listed in the c file like "InitECan()" are not declared in the h file. However, there is no problem in the example of the application report. How can I solve this problem?
Lewis
Hi Lewis,
Since the function prototype is missing in the header file, you will need to include a file called DSP2833x_GlobalPrototypes.h which contains all the function prototypes in your main routine by using a #include. Alternatively, you can add the function prototype for InitECan() in your main.c.
It should be noted this warning typically occurs when a function is called before it is formally declared.
Regards,
Ozino
Dear Ozino,
There are more error messages when I add "InitSysCtrl()" to my main.c or include "DSP2833x_GlobalPrototypes.h" in the Project.c as follow.
Regards,
Lewis
Lewis,
i meant to say you should add the function prototype for InitEcan() in your main routine. Not the sysCtrl one. Remove the globalprototypes #include if you are adding the function prototypes.
Can you confirm if the protoype is include in the globalprototypes.h file for InitEcan
Alternatively, you can just suppress the warning. See previous E2E link in my earlier post.