How to tell the IDE the ISP port

Today I added the following lines to programmers.txt

stangeisp.name=StangeISP
stangeisp.communication=/dev/serial/by-id/usb-Stange_Distribution_DX-ISP-if00
stangeisp.protocol=stk500v2

Unfortunately this did not work.

/home/udo/arduino-0018/hardware/tools/avrdude -C/home/udo/arduino-0018/hardware/tools/avrdude.conf -v -v -v -v -patmega328p -cstk500v2 -Uflash:w:/tmp/build3149196500010728135.tmp/Beeper.cpp.hex:i

Obviously the communication parameter does not show up in the avrdude call. Hence avrdude will default according to its configuration thus choosing the wrong port. As a workaround I can fix this by overwriting the avrdude configuration.

How is this done properly? How do I achieve that avrdude gets called with the proper port parameter?

Udo

doesn't the ide tell avrdude to use the port named in tools/serial port?

Fair warning: I have a different ICSP and a different operating system so my suggestion is unlikely to work. However, it's a simple test.

This is what I have for a Pololu programmer...

pololu.name=Pololu USB AVR Programmer
pololu.communication=serial
pololu.protocol=avrispv2

Try changing communication to serial.

I have 3 different serial ports. How would avrdude know which one to pick? Of course one would expect that it should use the one that I choose in the menu. However the menu it shows only 2 serial ports. The missing one belongs to the ISP. Hence this unfortunately does not work.

Udo

Is it possible another application has opened the ISP serial port?

Is the ISP serial port device name similar to the other serial port device names? Maybe the IDE builds the list using a pattern.

No, the port is not under control of a different application. Maybe it is because the IDE does not pick it up building the list of devices. I have no idea where to look in order to figure this one out.

Udo

Try "communication=usb".

I already tried this before --> this did not work. The avrispmkii wants "usb". It failed as well for some strange reasons. It started to talk with the ISP as desired but failed to finish. I suspect this is because I messed with its SCK settings but this is a different story.

Then I switched to the Stange ISP. It failed to talk to the ISP until I changed the avrdude default serial setup. Obviously the failure was because the IDE did not pass the desired port to avrdude.

Udo

I doubt it will help but I've noticed that most of the folks who have AVRDUDE issues on Linux have serial port names like these...

  /dev/ttyUSB0
  /dev/ttyUSB2

Beyond that, I'm not going to be any help. (plus, it's about bedtime)

I recall struggling with the exact same question - however without finding the answer I ended up patching the default port in avrdude.conf. Also I'm using two programmers with the same protocol on different USB ports so this is not a good solution.

I guess the answer may be found in the Java script upload source, but I never took the time to look for it. Perhaps someone did?