asm module call routine from C code of VDSP, CCES
Hello.
Could you tell me the detail of below?
Are the same the compiler system between VDSP and CCES?
And, are these same the asm module call routine from C code between VDSP and CCES?
If the detail of this information is described in your documents, could you tell me which document this is described in?
BR,
Masa Hibino
cces
compiler
asm
vdsp
Hello Masa,
Apologies for the delay caused here. We missed out this thread while we were tracking cases in our database.
There is difference between the compiler version of CCES and VDSP, because there are number of ways in which VisualDSP++ applications differ from CCES applications: RTOS, interrupt handling, SSL/DD APIs, and more.
The CCES compiler (and other build tools - assembler, linker, loader) were branched from the VisualDSP++ sources. There are obvious differences - e.g. the VisualDSP++ Compiler has not received support for the newest processors (BF60x, BF70x), as well as less obvious changes - such as a different ELF format in CrossCore Embedded Studio vs. VisualDSP++.
There are also changes to some runtime library functionality (e.g. the System Services and Device Drivers libraries have been completed overhauled), but the tools remain broadly similar.
Please refer the attached example which calls an assembly function from C for CCES. You can refer the project and you can use it to VisualDSP++
When the compiler generates the assembly version of a C-namespace symbol, it either prepends an underscore or appends a dot to the symbol name. When compiling with the -char-size-8 switch on processors that support byte-addressing, the symbol name will have a dot suffix, otherwise it will have an underscore prefix.
For example assembly function, "_ASMFunction" should be renamed to be "ASMFunction." for byte addressing.
Also, the compiler supports the use of extern to declare symbol names in the different C, C++ and assembly namespaces. For example,
extern int def_fn(void); // "_def_fn" or "__Z6def_fnv"
extern "asm" int asm_fn(void); // "asm_fn" in assembly
extern "C" int c_fn(void); // "_c_fn" in assembly
When compiling your source in C or C++ mode, you can use extern "asm" or extern "C" to specify which namespace you want your external symbols to use. Without the external linkage specifier, your symbol will use C namespace when compiling in C mode, and C++ namespace (mangled) when compiling in C++ mode.
Please follow the below link's for compiler manual in which details the correct approach for "Calling Assembly Subroutines From C/C++ Programs"
CCES with sharc processor:
www.analog.com/.../cces-SharcCompiler-manual.pdf
CCES with Blackfin processor:
www.analog.com/.../cces-blackfincompiler-library-manual.pdf
VisualDSP++ with sharc processor:
www.analog.com/.../50_21k_cc_mn_rev_1.5.pdf
VisualDSP++ with Blackfin processor:
www.analog.com/.../50_bf_cc_rtl_mn_rev_5.4.pdf
Also,please refer the below Ezone thread for blackfin programming which might be helpful to you:
ez.analog.com/.../144747
Regards,
Santhakumari.K
extern.rar
Dear Santhakumari,
Thank you for your reply.
I noted.
BR,
Masa Hibino
Please log in to reply.