Other Parts Discussed in Thread: TMS570LS20216, LM3S8971
Hello, experts:
I am using TMS570LS20216 for the motor control development. I have a question like this:
When I see the example code RDK-BLDC(9107) use LM3S8971 CPU which based on the Cortex-M3, there is a multiplies function(the function will be called by every milliseconds interrupt) define like this
//
// For CCS implement this function in pure assembly. This prevents the TI
// compiler from doing funny things with the optimizer.
//
#if defined(ccs)
long MainLongMul(long lX, long lY);
__asm(" .sect \".text:MainLongMul\"\n"
" .clink\n"
" .thumbfunc MainLongMul\n"
" .thumb\n"
" .global MainLongMul\n"
"MainLongMul:\n"
" smull r0, r1, r0, r1\n"
" lsrs r0, r0, #16\n"
" orr r0, r0, r1, lsl #16\n"
" bx lr\n");
#endif
My quesions are : can i use it directly on the TMS570LS20126 CPU which base on the Cortex-R4 without any change(i use CCS) ? If not, how to modify the asm code?
Thank you!