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.

Problem compiling using TI CGTOOLS 7.4.16 for C6000

Other Parts Discussed in Thread: TMS320DM6435, TMS320C6678

Hello everyone,

We are having a compiler error while compiling our source code for the below platform.

  • CPU

o   DaVinci (TMS320DM6435)

  • Tool chain:

o   external (TI CGTOOLS 7.4.16  for C6000) in Cygwin environment

 

Below is the example code snippet and the line pointed in red causes the error. 

Test.cpp :

 

Error :

 

error #515: a value of type "void (*)(int)" cannot be assigned to an entity of type "void (*)(int) C"

 

The compiler complains that the assigned function is C++ even though it is defined under extern “C”. We have compiled the same source code using various other compilers before and did not have any errors. I did look at the compiler manual but could not find an appropriate parameter that could fix this error.

We are doing this project for a customer and the deadline is very short. Your support is very much appreciated.

Regard,

Vivek

  • Vivek Srinivasan said:
    We are having a compiler error while compiling our source code for the below platform.

    • CPU

    o   DaVinci (TMS320DM6435)

    • Tool chain:

    o   external (TI CGTOOLS 7.4.16  for C6000) in Cygwin environment

    I can repeat the error with that combination of device and compiler.

    If I change the device to a TMS320C6678 the v7.4.16 compiler generates the same error, but the v8.1.0 compiler successfully compiles the code. i.e. something has changed between compiler versions. However, that doesn't help you since the version 8.x.x compilers no longer support the TMS320DM6435 CPU.

    [CCS won't let me select the v8.1.0 compiler for a TMS320DM6435, reporting "Selected device is no longer supported by compilers of version 8.0.0 or higher."]

  • Vivek Srinivasan said:
    error #515: a value of type "void (*)(int)" cannot be assigned to an entity of type "void (*)(int) C"

    That diagnostic is correct.  Those function types are different, and assignment between them is an error.  That said, many C++ compilers let this go by with no diagnostic.  Even the 7.4.x compiler builds clean when you use the option --relaxed_ansi .  In compiler version 8.1.x, --relaxed_ansi is the default.  With 8.1.x, if you use --strict_ansi, then you see the diagnostic.

    Thanks and regards,

    -George