How to write inline assembly code in arm mode.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Problem statement:

   

Want to add some assembly instruction in c code.

   

By default, it compiles in thumb mode, want to compile instruction as ARM mode.

   

Device config used: PSoC4 default device.

0 Likes
4 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Looks like a discussion here -

   

 

   

    

   

          http://www.devrs.com/gba/files/asmc.txt

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Good thought. But PSoC4 (Cortex M0) support only thumb mode.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Excerpt from the ARM Cortex M0 Generic User's Guide:

   

The Cortex-M0 processor implements the ARMv6-M architecture, that implements the
ARMv6-M Thumb® instruction set, including Thumb-2 technology.

   

Attempting to execute instructions when the Thumb bit is 0 results in a HardFault or lockup.

   

So there seem not to be room for ARM-mode

   

 

   

Bob

0 Likes
Anonymous
Not applicable

 Yes, you are right.

   

I developed operating system on cortex m3 architecture, wanted to check / port it on M0 architecture. Arm_v6 put lot of limitation on the implementation. 

   

 

   

By porting it here I understood the challenges and now trying to have a common implementation.

0 Likes