Nothing is impossible or how i uploaded a sketch to my Atmega328-PU (non-P version)

I tried a while to upload the sketch blink to my Atmega328-PU without success. I checked internet for solutions and trust me, i have tested them all. But no success, until i found this one. It’s not as simple like to use the Arduino IDE but it works with sketches made in the Arduino IDE, and that was important for me. I will also tell that i had successfull burned the bootloader without problem on the same Atmega328-PU before trying to upload sketches.

To burn bootloader i first added some rows in two files like this post:
Files are located at C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf and C:\Program Files (x86)\Arduino\hardware\arduino\boards.txt on my system that is Windows 7. Don’t forget to restart Arduino IDE.

I burned the ArduinoISP sketch to my arduino. After i set Tools -> Programmer -> Arduino as ISP to use my Arduino as a programmer.
After that i connected my circuit like this schematic:
Schematic of using an Arduino UNO as a programmer
I recommend that you connect the debugging leds. Trust me, they simplify a lot.

Before i start to upload i change one more thing. I select Tools -> Board -> Arduino Uno w/ ATmega328 (non-P).

Now i can upload the bootloader with success.

But upload the sketchy thing… It won’t work, it didn’t do it for me anyway.
But i did solve it when doing like this:
I followed the instructions on step 3 and 4 in this guide. I do changed a little in my command line when uploading sketch to my Atmega328-PU as this :
AVRDUDE -P com7 -b 19200 -c avrisp -p m328p -F -u -U flash:w:”C:\Users\mrslade\AppData\Local\Temp\build4807434003741737164.tmp\Blink.cpp.hex”:i
Remember to change the com-port to your own and to change the -p flag dependent on what chip you will program. AND remember that the path was to my sketch.

Good luck!