Uno R3 ISP Queries

I've followed this tutorial on how to use the Uno to flash a program onto a standalone AVR on a breadboard. It doesn't seem to be loading my program correctly though, so I have a few questions.

(On OS X using avrdude, attempting to program a blank ATMEGA328PU).

1: Does it matter that the ATMEGA328PU on the Arduino is still plugged in? 2: The tutorial said to tell avrdude that the programmer is an arduino. On an avr site one of the guys said that this would cause it to try flash the onboard micro. Is this the case? 3: How can I verify the integrity of the Arduino boot loader on the onboard AVR?

So the program seems to successfully flash on from avrdude, but my program that toggles a LED is not even lighting it up. I am certain the wiring and code is fine. Are there any gotchas to doing this?

1: Yes it does. ATmega328P inside of UNO acts as programmer. You have to upload ArduinoISP sketch prior to program another chip via ISP.
2: Programmer is the Arduino. You have to choose correct programmer (Arduino as ISP), correct board (e.g. ATmega328 on a breadboard) and burn the bootloader.
3: The simplest way without any special knowledge is to plug into UNO board and try to load sketch.
You can also read out and list from processor with avrdude tool. It is advanced technique which requires some knowledges so search this forum for more. Here is lots of information.

The tutorial he's using describes programming the barebones part directly - writing real C without the help of Arduino IDE, and uploading it by manually calling avrdude from command line.

That's a much more complicated process than just programming it using the IDE and an appropriate core.

Yes to clarify I'm writing C and not using the Arduino IDE. Using arduino as the programmer seems to make avrdude read the onboard micro as it works even if the SPI lines are disconnected from the breadboard with the external one. I can still reupload sketches to my hearts content. I feel like I'm definitely doing something wrong.

Using arduino as the programmer seems to make avrdude read the onboard micro as it works even if the SPI lines are disconnected

The bootloader on the onboard micro, and the ArduinoISP implement (approximately) the same upload protocol.
There are two things that are supposed to ensure that avrdude ends up programming the actual target, rather than the AVR on the Arduino.

  1. The 10uF capacitor connected between reset and Gnd on the arduino should prevent the Arduino from resetting when avrdude is run, so that it won’t enter the bootloader.
  2. ArduinoISP runs at 19200bps, while the bootloader runs at 115200bps. If you manage to end up talking to the bootloader at 19200bps, it shouldn’t work.

Both of these are documented in the tutorial you linked. Are you sure you followed the instructions?

Technically, the ArduinoISP implements the stk500v1 upload protocol, and you should use “-c stk500v1” in the avrdude command. “-c arduino” is a subset of stk500v1 implemented by the bootloader, and includes a few extra bits (explicitly invoking auto-reset for both RTS and DTR connections.) Either should work here, and the use of one over the other does not specifically cause the “talking to the wrong device” problem.

Alright thanks for your helpful responses. Still not working but I have a better understanding of whats happening.