Uno on FreeBSD requires non-standard avrdude parameters <solved>

G'day all,

New Uno owner here...

I'm trying to program my Arduino Uno from FreeBSD 8-stable amd64. I've installed the comms/uarduno port and loaded the uarduno.ko module. This causes /dev/cuaU1 to appear and I've configured the Arduino IDE to use that port. I've set the correct board type in the IDE too. When I try to build and upload one of the example programs, I get an error avrdude: stk500_recv(): programmer is not responding. If I run avrdude from the command line and use "-cstk500v1" instead of the "-carduino" parameter, it at least talks to the board. However, now it reports:

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

So I add the "-F" option and it successfully programs.

Can anybody please tell me why I might need these two non-standard options. The board programs successfully under Ubuntu Natty without them, so I don't think it's anything to do with the board - it's something about FreeBSD. Assuming that I do need them for some reason, where can I set them to be used from the IDE - I can't see anything relevant in preferences.txt?

Thanks in advance for any help, Graham

Just a guess but maybe ~/.avrduderc which is the user configuration file (/usr/local/arduino/hardware/tools/avr/etc/avrdude.conf being the system wide configuration).

I'm having problems with UNO and FreeBSD at the moment. Can you confirm which version (date) of stable are you running? Also, have you applied any patches to avrdude, arduino or uarduno? Could you please show me how is your board recognized by the system (dmesg)?

I'm searching for solutions to a not uncommon problem. I see posts over years stating the problem but the forum strings die. No, answer -

The problem is when programming an AVR (ATmega328p in this case.) with a Bit Bang or other programming method then getting the following intermediate error:

avrdude.exe: Yikes! Invalid device signature. avrdude.exe: Expected signature for ATMEGA328P is 1E 95 0F

For my instance I'm connecting a FT232RL [USB to Serial] device with DTR (pin 2), TX (pin 1), RX (pin 5), CTS (pin 11), Vcc (5V), GND (power and ground from USB) to a new unprogrammed bare breadboarded ATmega328-PU. The FT232RL device is connected as follows:

FTDI pin -- USB-Device - AVR -- 2 DTR --- Reset 1 TX --- MOSI (pin 17) 5 RX --- MISO (pin 18) 11 CTS --- SCK (pin 19)

But ---- I've just found out that my board is mis-marked and I need to use RTS instead of CTS for connections.

Ok - So, I changed to:

FTDI pin -- USB-Device - AVR -- 2 DTR --- Reset 1 TX --- MOSI (pin 17) 5 RX --- MISO (pin 18) 3 RTS --- SCK (pin 19)

Either pin formatting - Note: If I use avrdude-gui I can read the fuse settings.

Then using avrdude I get to:

avrdude -p m328p -c ftdi -B2400 -P ft0 -F -v -v

As the finishing of the output I get -

avrdude.exe: Yikes! Invalid device signature. avrdude.exe: Expected signature for ATMEGA328P is 1E 95 0F

What solutions have there been to resolve this issue of - Invalid device signature?

For bstott's problem, you have an unprogrammed 328, not a 328P and these chips both have different signatures. You need to add the 328's signature to your config files, or force avrdude to ignore the signatures. Check the microcontrollers subforum for several other threads on this.

Well, it’s taken me a long time to get back to this! My apologies to macx for not replying.

The solution is given on the uarduno page uarduno - FreeBSD® Kernel Driver for the Arduino Uno. It involves a small change to the avrdude source to increase a timeout from 50ms to 250ms. After making that change and rebuilding avrdude, it all works.

For the record, I’m now using FreeBSD 9-Stable amd64 as of about two weeks ago. The Arduino Uno is recognised in usbconfig as ugen0.3: <Arduino Uno Arduino> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON and in dmesg as

ugen0.3: <Arduino> at usbus0
uarduno0: <Arduino Arduino Uno, class 2/0, rev 1.10/0.00, addr 3> on usbus0