expected string literal before 'CLI'

cancel
Showing results for 
Search instead for 
Did you mean: 

expected string literal before 'CLI'

239 Views
ankurchauhan123
Contributor I

Hi,

I'm using K70 tower kit(TWR-K70F120M).

I'm trying to communicate with the TWR-LCD touch screen(resistive) module using flexbus in bare metal project.

i got some example code for some other microcontroller  then i modified it according to k70 and try to compile it.

I'm getting the following error:

expected string literal before 'CLI'

Line in code where error is coming  : EnableInterrupts;

#define EnableInterrupts   {__asm (CLI);}

what is the root cause of this error and how can i resolve it.

if anyone is having any sample code for k70 touch screen lcd code plz share.

Thanks and Regards

Ankur

Labels (1)
0 Kudos
1 Reply

130 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Ankur,

CLI is a x86 assembly instruction , while K70 uses ARM thrumb instruction set, the corresponding instruction is "CPSIE Change Processor State, Enable Interrupts", please kindly refer to www.arm.com for more details.

The bare metal K70 examples can be found the following link:

Kinetis 120MHz bare metal sample code

Hope that helps,


Have a great day,
Kan

NXP Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos