Enabling Thumb mode in LPCXpresso IDE for cortex M4 (LPC4330)

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

Enabling Thumb mode in LPCXpresso IDE for cortex M4 (LPC4330)

352 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by praveen.9123 on Tue Mar 04 04:29:01 MST 2014
Hi,

I am working on LPC4330 from 3 months, And am facing problem to call assembly code. please suggest me how to enable Thumb mode in LPCXpresso IDE for cortex M4 (LPC4330).
Labels (1)
0 Kudos
1 Reply

320 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Mon Mar 10 10:54:20 MST 2014
The Cortex-Mx series is different to the ARM7TDMI. The Cortex-Mx processors are Thumb-only CPUs.
There are the so called "intrinsics" which can be used to execute assembler code.
You can also use inline assembler functions: (compiler tool dependent)

__asm void test(unsigned int input)
{
   MSR   MASK, input
   BX      LR
}

I recommend to have a look into the Cortex-M docs on the ARM website and also browse on Google for resulst on the search string "use assembler with Cortex-M3" .

Regards,
NXP Support Team
0 Kudos