Forcing a Thumb address

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

Forcing a Thumb address

跳至解决方案
1,522 次查看
ERussell
Contributor IV

I am working with a k60 using CW10.2. I would like to force a label in an assembly file to be at a thumb address, i.e. with the LSB set, but have not been able to do this.  Can anyone tell me how to do this?

 

Thanks.

0 项奖励
回复
1 解答
1,384 次查看
Nouchi
Senior Contributor II

Hi,

 

Cortex M processors only support thumb and thumb-2 instructions.

 http://www.arm.com/products/processors/cortex-m/cortex-m4-processor.php

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,384 次查看
konrada
Contributor IV

Whether you need to add one to your code address depends on what instruction you use to jump there (B/BL vs BX/BLX), so adding the one to the label is dangerous.

 

What are you trying to do? 

0 项奖励
回复
1,383 次查看
ERussell
Contributor IV

I was attempting to implement the QK Scheduler  portion of the Quantum Leaps QP code. There is a warning, at least for the GNU C compiler, to insure that the address of an assembly label is a thumb address in the PendSV_Handler routine. As it turned out there was no problem and the function is working correctly with no intervention on my part, so I assummed that the fist responder was correct.

 

Thanks for responding.

0 项奖励
回复
1,385 次查看
Nouchi
Senior Contributor II

Hi,

 

Cortex M processors only support thumb and thumb-2 instructions.

 http://www.arm.com/products/processors/cortex-m/cortex-m4-processor.php

 

0 项奖励
回复