0
votes

I am using http://ed.am/dev/make/arduino-mk to upload code to my arduino products in Ubuntu without using the IDE.

That being said, I have confirmed the makefile and avrdude works well with my Arduino Uno, so that is fine.

However, I needed it to work with the Arduino Micro. So before setting up the .hex files, etc, I inputted:

export BOARD = micro

Which would allow me to get the formatting for the micro, as described by the makefile. When I tried to upload it, I get an interesting situation:

nancy@nancy-VirtualBox:~/Desktop/Arduino/sketchbook$ make upload

stty -F /dev/ttyACM0 speed 1200
57600
sleep 1
/usr/bin/avrdude -DV -p atmega32u4 -P /dev/ttyACM0 -c avr109 -b 57600 -U flash:w:blink.hex:i

At that point it stays on that line for however long and doesn't really do anything. The Arduino itself has the LED 13 continuously blinking but the Rx is not lit up whatsoever. To double check, I checked the dmesg:

usb 1-2: new full-speed USB device number 32 using ohci-pci
usb 1-2: New USB device found, idVendor=2341, idProduct=8037
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-2: Product: Arduino Micro
usb 1-2: Manufacturer: Arduino LLC
cdc_acm 1-2:1.0: This device cannot do calls on its own. It is not a modem.
cdc_acm 1-2:1.0: ttyACM0: USB ACM device
input: Arduino LLC Arduino Micro as /devices/pci0000:00/0000:00:06.0/usb1/1-2/1-2:1.2/input/input36
hid-generic 0003:2341:8037.001F: input,hidraw1: USB HID v1.01 Mouse [Arduino LLC Arduino Micro ] on usb-0000:00:06.0-2/input2

So I at least know it's the right port (Also double checked using ls -l /dev/serial/by-id ). Just in case, I double checked with normal windows, and Windows notifies me the driver is not installed properly. In the Arduino software, when I try to upload the generic blink code to the micro, it does the same thing where it too gets stuck in the Upload...

I updated the driver for the micro and the Arduino software uploads to the Arduino Micro just fine. Just in case I thought it was the actual hardware since I borrowed it from a friend, I tested the issue on a new Arduino Micro and the issue is replicated just in the Linux interface. I'm pretty sure it's not the VirtualBox linux either because the Arduino Uno worked just fine uploading to it.

Does anyone know how I may resolve my uploading issue? I'm thinking it's some sort of driver issue.

Thanks.

edit: tried the arduino Mega (export BOARD = mega2560)

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

So I'm thinking it's a driver and the makefile issue...

2

2 Answers

0
votes

That's possibly not the answer you're waiting for, but it seems that the makefile you are using is getting quite old.

I would recommend that you switch the Sudar's Arduino Makefile which is just amazing.

Hope this helps :)

0
votes

Programming the Mega Board I use the following command, which works fine for me:

avrdude -patmega2560 -cwiring -P/dev/ttyACM0 -b115200 -D -Uflash:w:blink.hex:i