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

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

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

360 次查看
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).
标签 (1)
0 项奖励
1 回复

328 次查看
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 项奖励