BareMetalRunConfiguration::BareMetalRunConfiguration(Target *target, Core::Id id)
    : RunConfiguration(target, id)
{
    auto exeAspect = addAspect<ExecutableAspect>();
    exeAspect->setDisplayStyle(BaseStringAspect::LabelDisplay);
    exeAspect->setPlaceHolderText(tr("Unknown"));

    addAspect<ArgumentsAspect>();
    addAspect<WorkingDirectoryAspect>();

    connect(target, &Target::deploymentDataChanged,
            this, &BareMetalRunConfiguration::updateTargetInformation);
    connect(target, &Target::applicationTargetsChanged,
            this, &BareMetalRunConfiguration::updateTargetInformation);
    connect(target, &Target::kitChanged,
            this, &BareMetalRunConfiguration::updateTargetInformation); // Handles device changes, etc.
    connect(target->project(), &Project::parsingFinished,
            this, &BareMetalRunConfiguration::updateTargetInformation);
}
void main()
{
    unsigned char sec,min,hour,day,month,year;
	uint8_t option=0;
	
	#define Button PIND
    #define up 5
    #define down 4
	#define select 3
	#define cancel 2
	
	DDRD = 0XF0; //Switches as input, lcd dataline as output
	PORTD = 0XFF; //Internal pull up enabled for switches
	DDRB  |= (1<<buzzer_pin); // buzzer as output

	LCD_Init(4,2,16);
	LCD_Printf(" Explore Time !");
	_delay_ms(2000);
	LCD_Clear();
	
    RTC_Init();
	
	//segments for creating large font stored in RAM.
	
	LCD_CreateCC(LT,0);
	LCD_CreateCC(UB,1);
	LCD_CreateCC(RT,2);
	LCD_CreateCC(LL,3);
	LCD_CreateCC(LB,4);
	LCD_CreateCC(LR,5);
	LCD_CreateCC(UMB,6);
	LCD_CreateCC(LMB,7);

	/*Set the time and Date only once */
//	RTC_SetTime(0x23,0x40,0x20);  //  11:40:20 pm
//	RTC_SetDate(0x14,0x11,0x12);  //  14th Nov 2012
	
	while(1)
	{		       
		if(util_IsBitCleared(Button,select))
		 {   
			while(util_IsBitCleared(Button,select));
			 
			do
			{
				option = LCD_DisplayMenu();
				switch(option)
				{
				 case 0: setTime(hour,min,sec);break;
				 case 1: setDate(day,month,year);break;
				 case 2: setAlarm(); break;
				 case 3: setDisplayStyle(); break;
				 case 4: setTimeFormat(); break;
				 default: break;
				}
			} while(util_IsBitSet(Button,cancel));
			
			LCD_Clear(); 	 
		 }
	
		RTC_GetTime(&hour,&min,&sec);      
		RTC_GetDate(&day, &month, &year);
		LCD_DisplayTime(hour, min, sec);
		LCD_DisplayDate(day, month, year);
		
		checkAlarm();
				
	}

}