Arduino code on atmel studio

I want to write a c code on Atmel Studio 7.0 and convert it into hex.file
so that I can upload it on a proteus simulation
I did it on Arduino IDE and exported a hex.file
but I want to use Atmel studio
what are the settings i should choose on starting the Atmel Studio too

I'm controlling a dc motor via l293 ( h bridge )
and controlling its speed via potentiometer input readings

void setup() {
  // put your setup code here, to run once:
pinMode (2,OUTPUT);
pinMode (3,OUTPUT);
pinMode (9,OUTPUT);
pinMode (A0,INPUT);
}

void loop() {
  int Speed = analogRead (A0);
  Speed = Speed / 4;
digitalWrite ( 2 , HIGH);
digitalWrite ( 3, LOW);
analogWrite (9 , Speed);

}