Question about loading Atmel Sudio for Arduino

I’m following the instructions at http://www.engblaze.com/tutorial-using-atmel-studio-6-with-arduino-projects/. I get to the step where you load the <project_name>.cpp file(Step 6). I compiled the “Blink” example. There is a “Blink.cpp.d” file, a “Blink.cpp.eep” file, a Blink.cpp elf" file, a “Blink.cpp.hex” file, and a “Blink.cpp.o” file, but no “Blink.cpp” file, or even a “.cpp”. There are several other files with a “cpp.d” or “cpp.o” extension. Which is the one I want to copy?

Jim

Hi, strange, I tried it myself and the Blink.cpp file got created. But since you want to switch to AVR Studio and you will probably write your there, it's not a big issue, I guess. As stated in step #9, all the Arduino IDE does is it adds some necessary imports and funktions.

Here's my blink.cpp content:

#line 1 "Blink.ino"
  
       
                                                                         

                                            
   

                                                      
                  
#include "Arduino.h"
void setup();
void loop();
#line 10
int led = 13;

                                                    
void setup() {
                                             
  pinMode(led, OUTPUT);
}

                                                     
void loop() {
  digitalWrite(led, HIGH);                                                 
  delay(1000);                                   
  digitalWrite(led, LOW);                                                 
  delay(1000);                                   
}

And in comparison the original Arduino example code:

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
 */

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;

// the setup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

As you can see, the Arduino IDE only removed the annotations and added the imports and function definitions.

John