how to program lpc1768 in thumb mode?

Status
Not open for further replies.

manoharn

Junior Member level 2
Joined
Jun 5, 2012
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bangalore,India
Activity points
1,429
Code:
#include "lpc17xx.h"

#define LED (1 << 29)

void delay(unsigned  long int count)
{ 	unsigned long int j;
   for(j = 1000000; j > 0; j--);

}

int main (void)
{	    		

	
	SystemInit();

	LPC_GPIO1->FIODIR   |=  LED;				// P1.29 = Outputs 
	LPC_GPIO1->FIOCLR 	 =  LED;				// Turn-OFF LED

	//Loop LED Test
	while(1)
	{
		LPC_GPIO1->FIOSET 	 =  LED;				// Turn-ON LED
		//for(j = 1000000; j > 0; j--);
		 delay(1);
		LPC_GPIO1->FIOCLR 	 =  LED;				// Turn-OFF LED
	//	for(j = 1000000; j > 0; j--);
	 delay(1);
	}
}


this is the program working properly in arm mode .Please guide me what are all the changes i need to make for this program to run in thumb mode.
 
Last edited by a moderator:

this is the program working properly in arm mode .Please guide me what are all the changes i need to make for this program to run in thumb mode.

I'm interested in understanding your question, as I use the mBed LPC1768 and may be porting my design to a bare processor.

What do you define as "arm mode" and "thumb mode"?
 

sorry actually i got to know by edaboard member ,that cortex lpc178 is working in thumb mode only.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…