SPRU513Z August 2001 – October 2023 SM320F28335-EP
C++ compilers use name mangling to avoid conflicts between identically named functions and variables. If name mangling were not used, symbol name clashes can occur.
You can use the demangler (dem2000) to demangle names and identify the correct symbols to use in assembly. See the "C++ Name Demangler" chapter of the TMS320C28x Optimizing C/C++ Compiler User's Guide for details.
To defeat name mangling in C++ for symbols where polymorphism (calling a function of the same name with different kinds of arguments) is not required, use the following syntax:
extern "C" void somefunc(int arg);
The above format is the short method for declaring a single function. To use this method for multiple functions, you can also use the following syntax:
extern "C"
{
void somefunc(int arg);
int anotherfunc(int arg);
...
}