Hello Team,
We tried of adding inline asm for calculating the OffsetOf in the .c file as below and it was working for us.
#define OsOffsetOf(type, member) __builtin_offsetof (type, member) //((osuint16) &(((structure *) 0)->member))
Inline asm :
__asm__("mov r1, %c0" : : "i" (OsOffsetOf(OsCtrlParamType, ActiveTaskIndex)));
compiler cmake define :
-D_CRT_USE_BUILTIN_OFFSETOF
If we try to add this code in assembly file we are facing errors and it is not successful.
So is there any equivalent code for calculating this OffsetOf and sizeof for a structure defined in .h file from the assembly file.
Attaching the previous ticket link for reference : https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1250832/sk-am62a-lp-ti-am62ax-asm-illegal-mnemonic-error
Please provide your feedback in this.
Thanks and Regards,
Naveen