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.

CCS/TMS320F28379D: enabling exception handling in ccs8

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

Hi,

I wanna use the exception handling feature in ccs . In default the exception option is disabled , hence i enabled it  from properties>Advanced options>Language options  .

Since  exception handling is not supported for C language , i enabled the "Treat C files as C++ files" option under the language option . 

But when i build the code i get the following errors:

>> Compilation failure
subdir_rules.mk:65: recipe for target 'F2837xD_PieVect.obj' failed
"C:/ti/c2000/C2000Ware_1_00_06_00/device_support/f2837xd/common/source/F2837xD_PieVect.c", line 295: error #145: a value of type "const PIE_VECT_TABLE *" cannot be used to initialize an entity of type "Uint32 *"
"C:/ti/c2000/C2000Ware_1_00_06_00/device_support/f2837xd/common/source/F2837xD_PieVect.c", line 296: error #145: a value of type "volatile PIE_VECT_TABLE *" cannot be used to initialize an entity of type "Uint32 *"
2 errors detected in the compilation of "C:/ti/c2000/C2000Ware_1_00_06_00/device_support/f2837xd/common/source/F2837xD_PieVect.c".
gmake: *** [F2837xD_PieVect.obj] Error 1
gmake: Target 'all' not remade because of errors.

the error lines in the code are :

Uint32* Source = &PieVectTableInit;
Uint32* Dest = &PieVectTable;

From what i know from pointers point of view is void * cant be defined in C++.

But due to lack of knowledge i dont know who to change the lines according to the C++ form.

Below i will be posting the screenshot of enabling the exception and C to C++ conversion selection.

Regards,

Ashwin

  • I am not familiar enough with C2000Ware to know, but it is a good guess it is not documented or tested to be built as C++.  

    Building a C file as C++, with exceptions enabled, doesn't accomplish very much.  Suppose this C code is called by a C++ function named parent, and this C code in turn calls a different C++ function named child, and child throws an exception.  Building this way means the exception does propagate from the child, through the C code, to the parent.  Other than that unusual circumstance, there is no reason to do it.

    Thanks and regards,

    -George