
On Thu, Apr 16, 2015 at 03:53:56PM +0200, Albert ARIBAUD wrote:
Hello Matt,
On Tue, 14 Apr 2015 14:07:18 -0400, Matt Porter mporter@konsulko.com wrote:
On ARM v7M, the processor will return to ARM mode when executing a blx instruction with bit 0 of the address == 0. Always set it to 1 to stay in thumb mode.
This should be done for all targets which build with Thumb instruction set, not only ARMv7M, should it not?
No, because it's not a problem on CPUs where we can do Thumb or non-Thumb instructions, only on CPUs where we can _only_ do Thumb instructions (or the special subset of "other" instructions the core allows). On ARM v7M trying to do the blx in ARM mode isn't allowed and causes an abort (or some other exception, I forget which) to happen upon execution.