Creating a C-callable Assembly Function for the TMS320C28x DSP

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

C-callable assembly routines require an understanding of parameter-passing conventions and environments expected by the C compiler.

Interfacing C/C++ with assembly language functions is straightforward if you follow the calling conventions and the register conventions. C/C++ code can access variables and call functions defined in assembly language and assembly code can access C/C++ variables and call C/C++ functions.

These conventions are defined in section 7.4 of spru514c.pdf.

For the beginners, it is strongly advised to follow the compiler user guide and adhere to the conventions listed there in. It is not suggested to modify the generated assembly code as it may lead to discrepancies like breaking alignment restrictions, overwriting the wrong register etc.

However, the experienced users who are well aware of the compiler restrictions may modify generated assembly to get the function started. It is assumed that the users who opt for this method are well versed with the implications of changing the assembly code.

To know more about the procedure, please download the document here.

E2e.jpg For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Creating a C-callable Assembly Function for the TMS320C28x DSP here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox