user94: I want to program an ATtiny through the Arduino IDE. I have a somehow strange programmer. But I can upload via avrdude by 

avrdude -p attiny13 -P /dev/cu.usbmodemfa131     -c stk500v2    -F -B20 -U flash:w:programm.hex 

It took a while to figure out that I had to slow the baud rate via the -B20 switch. If I try to upload via the arduino 1.0.5 IDE avrdude is executed as follows.

/Applications/Adafruit Arduino 1.0.5.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Adafruit Arduino 1.0.5.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pattiny13 -cstk500v1 -P/dev/tty.usbmodemfa131 -Uflash:w:/var/folders/9t/5jldfq752fs1x74_rhn2plz80000gn/T/build7680201613426497544.tmp/attinytest.cpp.hex:i 

My question is, how can I change the preferences such that I have control over the avrdude parameters? Say I want to add a -B20 switch and change stk500v1 to stk500v2. 

user84: Short answer: I'm afraid you can't do it with Arduino IDE 1.0.5.
Long answer:
First of all, be aware that -B20 does not specify the baud rate but the bitclock period (in us); this is specific to stk500v2 programmer.
Normally, enabling your programmer should only be a matter of adding it to the list of programmers known by Arduino IDE; that list can be found in hardware/arduino/programmers.txt. You would then append the following lines at the end of this file:
strangeprogrammer.name=Somehow Strange Programmer
strangeprogrammer.communication=serial
strangeprogrammer.protocol=stk500v2
strangeprogrammer.force=true
strangeprogrammer.speed=?????

However, the problem here is that Arduino IDE does not seem to be able to use flag -B (bitclock period) but only flag -b (baud rate) which value is set to whatever you will put to strangeprogrammer.speed. 
At least that's what I could find out by inspecting Arduino IDE source code: AvrdudeUploader.java never adds that flag to the avrdude command-line :-(
That means your options are:

Rebuild the Arduino IDE 1.0 on your own after modifying AvrdudeUploader.java to support -B flag; code should be quite easy (about 2 more lines of Java code).
Switch to Arduino IDE 1.5 and follow Federico's answer :-)
Use another IDE, something that deserves the IDE name. I use Eclipse with this Arduino plugin and it works fine for me. As a bonus, avrdude support seems better as you can see on the screenshot below:



94: <p>I want to program an ATtiny through the Arduino IDE. I have a somehow strange programmer. But I can upload via avrdude by </p>

<blockquote>
  <p>avrdude -p attiny13 -P /dev/cu.usbmodemfa131     -c stk500v2    -F -B20 -U flash:w:programm.hex </p>
</blockquote>

<p>It took a while to figure out that I had to slow the baud rate via the -B20 switch. If I try to upload via the arduino 1.0.5 IDE avrdude is executed as follows.</p>

<blockquote>
  <p>/Applications/Adafruit Arduino 1.0.5.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Adafruit Arduino 1.0.5.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pattiny13 -cstk500v1 -P/dev/tty.usbmodemfa131 -Uflash:w:/var/folders/9t/5jldfq752fs1x74_rhn2plz80000gn/T/build7680201613426497544.tmp/attinytest.cpp.hex:i </p>
</blockquote>

<p>My question is, how can I change the preferences such that I have control over the avrdude parameters? Say I want to add a -B20 switch and change stk500v1 to stk500v2. </p>
 84: <p><strong>Short answer</strong>: I'm afraid you can't do it with Arduino IDE 1.0.5.</p>

<p><strong>Long answer</strong>:</p>

<p>First of all, be aware that <code>-B20</code> does not specify the baud rate but the bitclock period (in us); this is specific to <code>stk500v2</code> programmer.</p>

<p>Normally, enabling your programmer should only be a matter of adding it to the list of programmers known by Arduino IDE; that list can be found in <code>hardware/arduino/programmers.txt</code>. You would then append the following lines at the end of this file:</p>

<pre><code>strangeprogrammer.name=Somehow Strange Programmer
strangeprogrammer.communication=serial
strangeprogrammer.protocol=stk500v2
strangeprogrammer.force=true
strangeprogrammer.speed=?????
</code></pre>

<p>However, the problem here is that Arduino IDE does not seem to be able to use flag <code>-B</code> (bitclock period) but only flag <code>-b</code> (baud rate) which value is set to whatever you will put to <code>strangeprogrammer.speed</code>. </p>

<p>At least that's what I could find out by inspecting Arduino IDE source code: <code>AvrdudeUploader.java</code> never adds that flag to the <code>avrdude</code> command-line :-(</p>

<p>That means your options are:</p>

<ol>
<li><p>Rebuild the Arduino IDE 1.0 on your own after modifying <code>AvrdudeUploader.java</code> to support <code>-B</code> flag; code should be quite easy (about 2 more lines of Java code).</p></li>
<li><p>Switch to Arduino IDE 1.5 and follow <a href="https://arduino.stackexchange.com/questions/1075/change-options-for-the-avr-programmer-via-arduino-ide/1077#1077">Federico's answer</a> :-)</p></li>
<li><p>Use another IDE, something that deserves the <strong>IDE</strong> name. I use Eclipse with this <a href="http://eclipse.baeyens.it/UsethePlugin.html" rel="nofollow noreferrer">Arduino plugin</a> and it works fine for me. As a bonus, avrdude support seems better as you can see on the screenshot below:</p></li>
</ol>

<p><img src="https://i.stack.imgur.com/gUqsS.png" alt="enter image description here"></p>
