avrdude cannot open and read hex file

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In Atmel Studio 7 I managed to setup avrdude to program an Arduino Nano 3 this way:

 

-C "C:\avrdude\avrdude.conf" -v -v -v -patmega328p -carduino -Pcom8 -b57600 -Uflash:w:"$(ProjectDir)Debug\$(TargetName).hex":i

 

It all works to the point where it should open and read the .hex file, however it cannot find the hex file (even though the said hex file exists):

 

avrdude.exe: erasing chip
avrdude.exe: reading input file "C:\Users\IEUser\Documents\Atmel Studio\7.0\GccApplication2\GccApplication2\Debug\GccApplication2.hex"
avrdude.exe: can't open input file C:\Users\IEUser\Documents\Atmel Studio\7.0\GccApplication2\GccApplication2\Debug\GccApplication2.hex: No such file or directory
avrdude.exe: read from file 'C:\Users\IEUser\Documents\Atmel Studio\7.0\GccApplication2\GccApplication2\Debug\GccApplication2.hex' failed

 

Interestingly when I hard-coded the name of the hex file, everything worked fine. What am I missing?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe you need a \ after (ProjectDir).

 

Last Edited: Wed. Jun 15, 2016 - 09:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I always run avrdude from a batch file in the project folder.  The path is relative.

 

Depending where the batch file is it would be something like GccApplication2/Debug/GccApplication2.hex.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Steve!

 

Thank you for your help, you certainly gave me something to start with.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Strangely the path to the hex file is correct. It says it cannot open the file but the path to it is fine.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The following command works fine in command line:

 

avrdude -v -v -v -patmega328p -carduino -Pcom8 -b57600 -Uflash:w:GccApplication2.hex:i

 

I concluded that the fault is at Atmel Studio and the way the path is defined. avrdude, the serial port and the programmer all work fine. This still doesn't work in Atmel Studio:

 

-C "C:\avrdude\avrdude.conf" -v -v -v -patmega328p -carduino -Pcom8 -b57600 -Uflash:w:$(TargetDir)Debug\$(TargetName).hex:i

 

 

It's very frustrating. IS there an option in Atmel Studio to set paths?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

SOLVED!

 

The right command:

 

 

-C "C:\avrdude\avrdude.conf" -v -v -v -patmega328p -carduino -Pcom8 -b57600 -U flash:w:"$(TargetDir)$(TargetName).hex":i -v -v

 

So it seems that indeed, the path was wong. Thank you steve17, your tip was correct!!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there any a way to edit the topic title and add 'SOLVED'?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just click the "Mark as Solution" on one of the posts in the thread.

 

BTW for the future - to debug this kind of thing set the external command to invoke a batch file and then just have that print out the parameters passed to it and this way you can easily see what the meta variables represent.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I got a simular problem.

I'm trying to create a midi controller from my Arduino Uno using an AVR ISP2.

Everytime I try to reassign my usb port with terminal I get the same error:

 

/Users/Lennard/Downloads/hiduino-master/LUFA-140928/Projects/arduino_midi: is a directory

Lennards-MacBook-Pro:~ Lennard$ avrdude -p at90usb162 -P usb -c avrispmkii -U flash:w:arduino_midi.hex -v -F

 

Pressing enter:

 

avrdude: Version 6.0.1, compiled on Dec 16 2013 at 17:26:24

         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         Copyright (c) 2007-2009 Joerg Wunsch

 

         System wide configuration file is "/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf"

         User configuration file is "/Users/Lennard/.avrduderc"

         User configuration file does not exist or is not a regular file, skipping

 

         Using Port                    : usb

         Using Programmer              : avrispmkii

avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200212995

         AVR Part                      : AT90USB162

         Chip Erase delay              : 9000 us

         PAGEL                         : PD7

         BS2                           : PC6

         RESET disposition             : possible i/o

         RETRY pulse                   : SCK

         serial program mode           : yes

         parallel program mode         : yes

         Timeout                       : 200

         StabDelay                     : 100

         CmdexeDelay                   : 25

         SyncLoops                     : 32

         ByteDelay                     : 0

         PollIndex                     : 3

         PollValue                     : 0x53

         Memory Detail                 :

 

                                  Block Poll               Page                       Polled

           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack

           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------

           eeprom        65    20     4    0 no        512    4    128  9000  9000 0x00 0x00

           flash         65     6   128    0 yes     16384  128    128  4500  4500 0x00 0x00

           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00

           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

 

         Programmer Type : STK500V2

         Description     : Atmel AVR ISP mkII

         Programmer Model: AVRISP mkII

         Hardware Version: 1

         Firmware Version Master : 1.23

         Vtarget         : 5.1 V

         SCK period      : 8.00 us

 

avrdude: AVR device initialized and ready to accept instructions

 

Reading | ################################################## | 100% 0.00s

 

avrdude: Device signature = 0x1e9489

avrdude: Expected signature for AT90USB162 is 1E 94 82

avrdude: safemode: lfuse reads as EF

avrdude: safemode: hfuse reads as D9

avrdude: safemode: efuse reads as F4

avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed

         To disable this feature, specify the -D option.

avrdude: erasing chip

avrdude: reading input file "arduino_midi.hex"

avrdude: error opening arduino_midi.hex: No such file or directory

avrdude: input file arduino_midi.hex auto detected as invalid format

avrdude: can't open input file arduino_midi.hex: No such file or directory

avrdude: read from file 'arduino_midi.hex' failed

 

avrdude: safemode: lfuse reads as EF

avrdude: safemode: hfuse reads as D9

avrdude: safemode: efuse reads as F4

avrdude: safemode: Fuses OK (H:F4, E:D9, L:EF)

 

avrdude done.  Thank you.

 

How can I get rid of this error and start setting up my midi controller?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But that is simply saying that arduino_midi.hex does not exist in the directory where you are running avrdude (the prompt appears to suggest this is just "~", your home directory). Either cd to the directory where the .hex file really is or specify it on the avrdude command line.

 

It also seems a bit strange that you are saying it is an at90usb162 in the command line but avrdude is seeing a different signature? I cannot help notice that:

avrdude: Device signature = 0x1e9489
avrdude: Expected signature for AT90USB162 is 1E 94 82
~/windows/avr8-gnu-toolchain-linux_x86_64/avr/include/avr$ grep SIGNA iom16u2.h
#define SIGNATURE_0 0x1E
#define SIGNATURE_1 0x94
#define SIGNATURE_2 0x89

so the chip is actually a mega16U2 not a at90usb162.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for your response Clawson!

Since I'm new to this I got a lot of questions.

You're saying that the file does not exist in the directory where I'm running avrdude. 

I've checked the folder I was searching in and I did find it, does this mean the code is wrong?

If yes, what should I write? 

 

I also tried to change the at90usb162 part into mega16U2, then I got this message: 

 

Last login: Mon Jan  9 09:48:46 on console
lennards-mbp:~ Lennard$ /Users/Lennard/Downloads/hiduino-master/LUFA-140928/Projects/arduino_midi
-bash: /Users/Lennard/Downloads/hiduino-master/LUFA-140928/Projects/arduino_midi: is a directory
lennards-mbp:~ Lennard$ avrdude -p mega16U2 -P usb -c avrispmkii -U flash:w:arduino_midi.hex -v -F

avrdude: Version 6.0.1, compiled on Dec 16 2013 at 17:26:24
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf"
         User configuration file is "/Users/Lennard/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

avrdude: AVR Part "mega16U2" not found.

Valid parts are:
  uc3a0512 = AT32UC3A0512       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13747]
  c128     = AT90CAN128         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:3136]
  c32      = AT90CAN32          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:3520]
  c64      = AT90CAN64          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:3328]
  pwm2     = AT90PWM2           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:8371]
  pwm2b    = AT90PWM2B          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:8564]
  pwm3     = AT90PWM3           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:8554]
  pwm316   = AT90PWM316         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:8591]
  pwm3b    = AT90PWM3B          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:8578]
  1200     = AT90S1200          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:1597]
  2313     = AT90S2313          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:1826]
  2333     = AT90S2333          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:1939]
  2343     = AT90S2343          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:2067]
  4414     = AT90S4414          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:1713]
  4433     = AT90S4433          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:2191]
  4434     = AT90S4434          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:2315]
  8515     = AT90S8515          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:2398]
  8535     = AT90S8535          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:2512]
  usb1286  = AT90USB1286        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:11081]
  usb1287  = AT90USB1287        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:11271]
  usb162   = AT90USB162         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:11284]
  usb646   = AT90USB646         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:10878]
  usb647   = AT90USB647         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:11068]
  usb82    = AT90USB82          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:11470]
  m103     = ATmega103          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:2633]
  m128     = ATmega128          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:2956]
  m1280    = ATmega1280         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9380]
  m1281    = ATmega1281         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9570]
  m1284p   = ATmega1284P        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:4332]
  m1284rfr2 = ATmega1284RFR2     [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9935]
  m128rfa1 = ATmega128RFA1      [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9790]
  m128rfr2 = ATmega128RFR2      [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9859]
  m16      = ATmega16           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:3713]
  m161     = ATmega161          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:5664]
  m162     = ATmega162          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:4524]
  m163     = ATmega163          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:4722]
  m164p    = ATmega164P         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:3892]
  m168     = ATmega168          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:7410]
  m168p    = ATmega168P         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:7599]
  m169     = ATmega169          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:4880]
  m16u2    = ATmega16U2         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:11845]
  m2560    = ATmega2560         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9583]
  m2561    = ATmega2561         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9777]
  m2564rfr2 = ATmega2564RFR2     [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9925]
  m256rfr2 = ATmega256RFR2      [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9844]
  m32      = ATmega32           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:5487]
  m324p    = ATmega324P         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:3916]
  m324pa   = ATmega324PA        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:4108]
  m325     = ATmega325          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12213]
  m3250    = ATmega3250         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12594]
  m328     = ATmega328          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:7800]
  m328p    = ATmega328P         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:7985]
  m329     = ATmega329          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:5062]
  m3290    = ATmega3290         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:5261]
  m3290p   = ATmega3290P        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:5275]
  m329p    = ATmega329P         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:5247]
  m32u2    = ATmega32U2         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:11658]
  m32u4    = ATmega32U4         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:10688]
  m406     = ATMEGA406          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:14085]
  m48      = ATmega48           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:7010]
  m48p     = ATmega48P          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:7197]
  m64      = ATmega64           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:2773]
  m640     = ATmega640          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9190]
  m644     = ATmega644          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:4124]
  m644p    = ATmega644P         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:4315]
  m644rfr2 = ATmega644RFR2      [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9945]
  m645     = ATmega645          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12404]
  m6450    = ATmega6450         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12606]
  m649     = ATmega649          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:5288]
  m6490    = ATmega6490         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:5474]
  m64rfr2  = ATmega64RFR2       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9872]
  m8       = ATmega8            [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:5804]
  m8515    = ATmega8515         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:5965]
  m8535    = ATmega8535         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:6123]
  m88      = ATmega88           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:7210]
  m88p     = ATmega88P          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:7397]
  m8u2     = ATmega8U2          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12032]
  t10      = ATtiny10           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:14040]
  t11      = ATtiny11           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:1092]
  t12      = ATtiny12           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:1156]
  t13      = ATtiny13           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:1289]
  t15      = ATtiny15           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:1464]
  t1634    = ATtiny1634         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13773]
  t20      = ATtiny20           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:14050]
  t2313    = ATtiny2313         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:7998]
  t24      = ATtiny24           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9956]
  t25      = ATtiny25           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:8644]
  t26      = ATtiny26           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:6281]
  t261     = ATtiny261          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:6438]
  t4       = ATtiny4            [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13996]
  t40      = ATtiny40           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:14067]
  t4313    = ATtiny4313         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:8187]
  t43u     = ATtiny43u          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:10509]
  t44      = ATtiny44           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:10140]
  t45      = ATtiny45           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:8826]
  t461     = ATtiny461          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:6629]
  t5       = ATtiny5            [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:14013]
  t84      = ATtiny84           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:10324]
  t85      = ATtiny85           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:9007]
  t861     = ATtiny861          [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:6820]
  t88      = ATtiny88           [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:7612]
  t9       = ATtiny9            [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:14023]
  x128a1   = ATxmega128A1       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13078]
  x128a1d  = ATxmega128A1revD   [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13094]
  x128a1u  = ATxmega128A1U      [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13104]
  x128a3   = ATxmega128A3       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13114]
  x128a3u  = ATxmega128A3U      [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13124]
  x128a4   = ATxmega128A4       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13134]
  x128a4u  = ATxmega128A4U      [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13192]
  x128b1   = ATxmega128B1       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13244]
  x128b3   = ATxmega128B3       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13302]
  x128c3   = ATxmega128C3       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13006]
  x128d3   = ATxmega128D3       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13058]
  x128d4   = ATxmega128D4       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13068]
  x16a4    = ATxmega16A4        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12744]
  x16a4u   = ATxmega16A4U       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12672]
  x16c4    = ATxmega16C4        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12724]
  x16d4    = ATxmega16D4        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12734]
  x16e5    = ATxmega16E5        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13642]
  x192a1   = ATxmega192A1       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13374]
  x192a3   = ATxmega192A3       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13390]
  x192a3u  = ATxmega192A3U      [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13400]
  x192c3   = ATxmega192C3       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13312]
  x192d3   = ATxmega192D3       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13364]
  x256a1   = ATxmega256A1       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13472]
  x256a3   = ATxmega256A3       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13488]
  x256a3b  = ATxmega256A3B      [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13508]
  x256a3bu = ATxmega256A3BU     [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13518]
  x256a3u  = ATxmega256A3U      [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13498]
  x256c3   = ATxmega256C3       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13410]
  x256d3   = ATxmega256D3       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13462]
  x32a4    = ATxmega32A4        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12832]
  x32a4u   = ATxmega32A4U       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12760]
  x32c4    = ATxmega32C4        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12812]
  x32d4    = ATxmega32D4        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12822]
  x32e5    = ATxmega32E5        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13694]
  x384c3   = ATxmega384C3       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13528]
  x384d3   = ATxmega384D3       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13580]
  x64a1    = ATxmega64A1        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12930]
  x64a1u   = ATxmega64A1U       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12946]
  x64a3    = ATxmega64A3        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12956]
  x64a3u   = ATxmega64A3U       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12966]
  x64a4    = ATxmega64A4        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12976]
  x64a4u   = ATxmega64A4U       [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12848]
  x64b1    = ATxmega64B1        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12986]
  x64b3    = ATxmega64B3        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12996]
  x64c3    = ATxmega64C3        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12900]
  x64d3    = ATxmega64D3        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12910]
  x64d4    = ATxmega64D4        [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:12920]
  x8e5     = ATxmega8E5         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13590]
  ucr2     = deprecated, use 'uc3a0512' [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:13763]

lennards-mbp:~ Lennard$ 

What's going wrong.

It can't be that hard right to make my Arduino work as a midi controller so I can trigger my relay board on/off?

Also, if I format the usb of the arduino I can't make the in and outputs for my jumpers work right? How can I fix this?

Everything I'm trying to do is related to this article, starting from step 8:

http://www.instructables.com/id/...

 

Hopefully u can help me

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1
m16u2    = ATmega16U2         [/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf:11845]

So:

-p mega16U2

is wrong.

 

Try:

-p m16u2

But also what are you trying to do with:

lennards-mbp:~ Lennard$ /Users/Lennard/Downloads/hiduino-master/LUFA-140928/Projects/arduino_midi
-bash: /Users/Lennard/Downloads/hiduino-master/LUFA-140928/Projects/arduino_midi: is a directory

Did you mean to use:

lennards-mbp:~ Lennard$ cd /Users/Lennard/Downloads/hiduino-master/LUFA-140928/Projects/arduino_midi

The "cd" command means "change directory". As you are not changing directory correctly "/Users/Lennard/Downloads/hiduino-master/LUFA-140928/Projects/arduino_midi" is not the current directory when you come to run the avrdude command - which is why the .hex file is not being found.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried to copy everything u said in the right way.

Somehow the cd part doesn't seem to work I think

Here's the code:

Last login: Mon Jan  9 12:31:23 on ttys000
lennards-mbp:~ Lennard$ cd /Users/Lennard/Downloads/hiduino-master/LUFA-140928/Projects/arduino_midi
lennards-mbp:arduino_midi Lennard$ avrdude -p m16u2 -P usb -c avrispmkii -U flash:w:arduino_midi.hex -v -F

avrdude: Version 6.0.1, compiled on Dec 16 2013 at 17:26:24
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf"
         User configuration file is "/Users/Lennard/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : avrispmkii
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200212995
         AVR Part                      : ATmega16U2
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC6
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no        512    4    128  9000  9000 0x00 0x00
           flash         65     6   128    0 yes     16384  128    128  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500V2
         Description     : Atmel AVR ISP mkII
         Programmer Model: AVRISP mkII
         Hardware Version: 1
         Firmware Version Master : 1.23
         Vtarget         : 5.1 V
         SCK period      : 8.00 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9489
avrdude: safemode: lfuse reads as EF
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as F4
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "arduino_midi.hex"
avrdude: error opening arduino_midi.hex: No such file or directory
avrdude: input file arduino_midi.hex auto detected as invalid format
avrdude: can't open input file arduino_midi.hex: No such file or directory
avrdude: read from file 'arduino_midi.hex' failed

avrdude: safemode: lfuse reads as EF
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as F4
avrdude: safemode: Fuses OK (H:F4, E:D9, L:EF)

avrdude done.  Thank you.

lennards-mbp:arduino_midi Lennard$ 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just show the output of the pwd and ls commands after you cd to that directory.