Atmel Studio 6.0 and Due

Hi Guys
I am trying to write the code for a simple blinking led on arduino due using the ATmel studion 6.0 and gcc compiler.I able to compile the code but the led is not blinking

#include <asf.h>

void delay_ms(unsigned int delay) {
	while (delay--) for(int x=0; x<0x3FFF; x++) __asm__("nop\n\t");
}

#define led 1<<27
int main (void)
{
	unsigned int i;
	sysclk_init();
	board_init();
	PIOB->PIO_OER =1<<27;
	while(1)
	{
		
		 PIOB->PIO_SODR=led; // turn the LED on (HIGH is the voltage level)
		 delay_ms(1000); // wait for a second
		 PIOB->PIO_CODR=led; // turn the LED off by making the voltage LOW
		 delay_ms(1000); // wait for a second

		
	}
	// Insert application code here, after the board has been initialized.
}
This code is not working and led is not blinking.Can anybody help me with sample code and program.

Regards
Gopalakrishnan.N

Hi
I got the answer from the ARMguy post.

The problem has been solved