Hi,
I'm using code composer studio V5.4 to programm a TMS320UC5402 DSP.
I have a code written in algebraic assembly and i want to include it in my main.c file.
Is there any method and confiuration to do it ?
Best regards
Youssef
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.
Hi,
I'm using code composer studio V5.4 to programm a TMS320UC5402 DSP.
I have a code written in algebraic assembly and i want to include it in my main.c file.
Is there any method and confiuration to do it ?
Best regards
Youssef
Hi Youssef,
You can inline asm command by wrapping them like the syntax below (mnemonic shown):
asm(" BCLR XF");
See Section 5.8 The asm Statement in compiler user guide. Inline asm calls do not play nicely with the compiler, and the compiler is not aware of the resources touched by these asm instructions, so optimization can corrupt the program.
Alternately, you can create C-callable assembly functions (like DSPLIB), where the standard function call stack pushes and pops occur so that the compiler can restore elements after returning form the function call.
See C5505 Compiler Guide (in-line asm and C-callable asm should apply to C5402): http://www.ti.com/lit/ug/spru281g/spru281g.pdf
Hope this helps,
Mark
Hi Youssef,
You may also have to go to Project -> Properties -> Build -> C5500 Compiler -> Advanced Options -> Runtime Model Options and check the box next to "Codegen outputs algebraic assembly (--algebraic, -mg)" to use algebraic assembly instead of mnemonic.
Regards,
-Jon
Thanks Jon for replying,
The methode shown in the PDF doesn't work with me for Algebraic assembly i think it works only for mnemonic assembly.
If you could give me just a short example how interfacing C and Algebraic assembly for c54x DSP.
Best regards.