arduino avrdude macos partial working

I'm using a an arduino ONE running Arduino development environment under MacOS an it works great. Reading the Book protical AVR microcontrollers I bought a pololu avr programmer to direcly write atmega328 using the same arduino development environment. That work great too without any problem.

Then there is the need to use avrdude to write fuses to change clock speed.

So using avrdude distributed with arduino dev environment has some problem. Seems it only works fine under root permission and not under normal user where unpredictable behaviour occurs.

But the real problem occurs using the -U command line parameter that does not take any effect at all ! As you can see there is no answer not reading and not writing too, same as not have used the -U option. I tried the -B option too to slow down communication but no answer. Using only the -v option gives all correct information in reading but -U is always a completely death parameter

Is there any idea or someone that has used it without problems ? Here an example of commend line returns:

sh-3.2# avrdude -P /dev/tty.usbmodem00077021 -c avrisp2 -p m328p -B 8 –U lfuse:r:-:h avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.03s avrdude: Device signature = 0x1e950f avrdude: safemode: Fuses OK avrdude done. Thank you. sh-3.2#

tnx in advance Giampiero

On an other Mac with same OS release all packages worked without problems. So going creasy in debugging the the specific serial port behaviur.

Looking for some messages in /var/log/syslog.log I found this message after inserting the USB cable: Aug 9 08:33:42 xx-iMac kernel[0]: considerRebuildOfPrelinkedKernel prebuild rebuild has expired Aug 9 08:33:43 xx-iMac kernel[0]: AppleUSBCDCACMData: Version number - 4.2.1b5, Input buffers 8, Output buffers 16 Aug 9 08:33:43 --- last message repeated 1 time --- Aug 9 08:33:43 xx-iMac kernel[0]: AppleUSBCDC: Version number - 4.2.1b5

after some google searching found a suggestion to give this command for other issues: Sounds like the kernel cache needs rebuilding. Try run Terminal command: sudo kextcache -system-prelinked-kernel

Doing so after unplug and replug the USB the ConsiderRebuild messages disapeared Run Arduino and programmed the ATmega328p with success !!!

Hope this could be useful for others