Other Parts Discussed in Thread: MCU-PLUS-SDK-AM263PX, MCU-PLUS-SDK-AM261X
Tool/software:
Hi Experts,
I am trying to compile an example where I am placing the function code in TCM memory location:
static __attribute__((__section__(".text.armiqmath")))_iq24 _IQ24mpy1(_iq24 A, _iq24 B)
{
_iq24 result;
__asm__ volatile(
"smull r2, r3, %1, %2\n"
"lsr r2, r2, #24\n"
"lsr r3, r3, #8\n"
"add %0, r2, r3\n"
: "=r" (result)
: "r" (A), "r" (B)
: "r2", "r3", "cc"
);
return result;
}
//GLobal variables:
volatile _iq24 a ;
volatile _iq24 b ;
//main function
void main(void *args)
{
Drivers_open();
Board_driversOpen();
volatile _iq24 result;
result = _IQ24mpy1(a,b);
{
---do processing based on variable result
}
}
The behavior I see is that in debug build the code is present in TCM location but when I am trying to build in release mode the TCM location is empty(observations are based on generated map file)
Below is release build map file
This is debug build.
Why is this behaviour seen?
Regards
Nilabh A.