Selected Processor does not support in THUMB Mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Selected Processor does not support in THUMB Mode

3,370 次查看
kaarthick
Contributor II

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?

标签 (1)
0 项奖励
回复
5 回复数

2,485 次查看
converse
Senior Contributor V

I suspect you meant to use

LDR R1, Variable

0 项奖励
回复

2,485 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

2,485 次查看
kaarthick
Contributor II

Hi ZhangJennie,

What is the difference between LDA and LDR Instructions?

0 项奖励
回复

2,485 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

2,485 次查看
kaarthick
Contributor II

Weather LDR and LDA, both are same working?

Did you face same type of issue earlier?

0 项奖励
回复