I am using Freescale controller with MCUXpresso IDE. While i compile the project i am facing issue of "Selected Processor does not support in THUMB Mode " at the line where the asm code __asm("LDA R1, Variable");
Proceesor :- ARM Cortex M4
Can anybody give me the solution?
HI Con,
LDA ---Load-Acquire Word loads a word from memory and writes it to a register.
This instruction is supported ONLY in ARMv8. For example, Cortex M23, M33 processor can use it without problem.
While Cortex M4 is based on ARMv7 architecture. Thus LDA is not supported for Cortect M4 core processor.
For detail, I suggest you check armv7 and armv8 reference manual.
Have a great day,
Jun Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Karthik,
Both LDR/STR and LDA/STL are load/store instructions.
One big difference is that LDA is supported in armv8 only but LDR can be supported in armv6/armv7/armv8.
LDR is a normal instruction for loading with immediate offset, pre-indexed immediate offset, or post-indexed immediate offset.
LDA uses the concept of Load-Acquire and Store-Release of armv8. armv8 manual has a section document this topic. Please check them.
Have a great day,
Jun Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------