Forcing a Thumb address

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Forcing a Thumb address

Jump to solution
690 Views
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 Kudos
1 Solution
552 Views
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

 

View solution in original post

0 Kudos
3 Replies
552 Views
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 Kudos
551 Views
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 Kudos
553 Views
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 Kudos