Other Parts Discussed in Thread: C2000WARE, CONTROLSUITE
Tool/software: Code Composer Studio
Greetings Everyone!
Hope this finds you very well.
I have a working TI-RTOS project based on 'C' language in which there are multiple source code and header files. Now I have to convert that into Object Oriented Programming based code.
I tried creating a class of a module in code. For that I added a new source code file with .cpp extension and its header file with .hpp extension. The problem is when I create a class in .cpp file it works well and I can create its objects also but when I try to create class in .hpp file then it gives following error:
#20 identifier "class" is undefined SoC.hpp
#66 expected a ";" SoC.hpp
gmake: *** [BMSmain.obj] Error 1
gmake: Target 'all' not remade because of errors.
While I am creating a class like this:
#include "DSP2833x_Device.h" #ifndef SOC_HPP_ #define SOC_HPP_ class SoC{ private: double dt; unsigned long diff; public: SoC(); ~SoC(); void estimateSoC(Battery_Data **data); }; #endif /* SOC_HPP_ */
I have also used a wrapper function to call any function defined in this class from a C code.
Tools I am using are:
- CCS 8.1.0
- Compiler: TI v18.1.2.LTS
- C2000Ware 1.0.5.00
- TI-RTOS 2.16.1.14
- XDAIS 7.21.1.07
- SYS/BIOS 6.73.1.01
- XDCtools 3.50.8.24_core
Second issue is when I define any RTOS task or clock function in .cpp file it gives follwing error:
- #10010 null: errors encountered during linking; "MBMS_0v1_021118_CPP_f28335.out" not built
- #10234-D</a> null: unresolved symbols remain
- gmake: *** [MBMS_0v1_021118_CPP_f28335.out] Error 1
- gmake: Target 'all' not remade because of errors.
- unresolved symbol _Clk_Fxn, first referenced in C:\Users\Assad\workspace_v8\MBMS_0v1_021118_CPP\MBMS_F28335\configPkg\package\cfg\app_f28335_p28FP.o28FP
- unresolved symbol _EEPROMwriteTask_Periodically, first referenced in C:\Users\Assad\workspace_v8\MBMS_0v1_021118_CPP\MBMS_F28335\configPkg\package\cfg\app_f28335_p28FP.o28FP
- unresolved symbol _IdleTask, first referenced in C:\Users\Assad\workspace_v8\MBMS_0v1_021118_CPP\MBMS_F28335\configPkg\package\cfg\app_f28335_p28FP.o28FP
Is there any other method to do so? If yes then please suggest.
Please help me in this problem.
Your replies will be strongly appreciated.
Many thanks for your kind consideration.