now, when putting (or actually trying to put) my mega 2560 R3 into DFU Mode, i get following results.
there is a little yellow LED which blinks just another couple of times after released the green pads (see pic in link) and then turns off.
open up arduino, tools/serial ports → my arduino is no longer is the device list, which is a good sign that my 2560 is in dfu mode.
now, when typing in termial:
sudo make dfu
i get this result:
dfu-programmer at90usb82 erase
dfu-programmer: no device present.
make: *** [dfu] Error 1
Claudio-Battistas-MacBook-Pro:libusb-1.0.8 claudiobattista$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in /Users/claudiobattista/chronome/libusb-1.0.8': configure: error: cannot run C compiled programs. If you meant to cross compile, use --host'.
See `config.log' for more details.
Claudio-Battistas-MacBook-Pro:libusb-1.0.8 claudiobattista$
Ah yes, dfu-programmer 0.5.4 does not know about the atmega16u2 and the developers don’t seem to have updated it yet.
Download the dfu-programmer source from http://sourceforge.net/projects/dfu-programmer/files, apply the attached patch and build your own:
Code:
tar xzf ~/Downloads/dfu-programmer-0.5.4.tar.gz
cd dfu-programmer-0.5.4
patch -p0 < ~/Downloads/atmega16u2.diff
I suggest you follow the steps that @dhunt suggests further down in the thread. @dhunt used macports as the package manager to get the necessary packages.
I got the dfu-programmer to build on OSX Lion 10.7.3 with the following steps:
Install Xcode 4.3 from the Appstore
Install Xcode command line tools from Xcode preferences (see https://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_3.html).
Tell Xcode where Xcode is installed: sudo xcode-select -switch /Applications/Xcode.app
Set up a link for the missing clang executable: cd /Applications/Xcode.app/Contents/Developer/usr/bin; sudo ln -s clang llvm-gcc; cd -
Install macports from http://www.macports.org/
Install autoconf tools via macports: sudo port install pkgconfig automake
Install libusb via macports: sudo port install libusb-devel
Configure and build dfu-programmer: cd dfu-programmer-0.5.4; ./bootstrap.sh; ./configure; ./make; ./sudo make install
Claudio-Battistas-MacBook-Pro:arduino-usbserial claudiobattista$ sudo port install libusb-devel
—> Computing dependencies for libusb-devel
Error: Unable to execute port: Can’t install libusb-devel because conflicting ports are installed: libusb
To report a bug, see http://guide.macports.org/#project.tickets
Claudio-Battistas-MacBook-Pro:arduino-usbserial claudiobattista$ cd dfu-programmer-0.5.4;
Claudio-Battistas-MacBook-Pro:dfu-programmer-0.5.4 claudiobattista$ /bootstrap.sh;
-bash: /bootstrap.sh: No such file or directory
Claudio-Battistas-MacBook-Pro:dfu-programmer-0.5.4 claudiobattista$ ./bootstrap.sh
Claudio-Battistas-MacBook-Pro:dfu-programmer-0.5.4 claudiobattista$ ./configure
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… m4/install-sh -c -d
checking for gawk… no
checking for mawk… no
checking for nawk… no
checking for awk… awk
checking whether make sets $(MAKE)… yes
checking whether to enable maintainer-specific portions of Makefiles… no
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… configure: error: in /Users/claudiobattista/chronome/LUFA 100807/Projects/arduino-usbserial/dfu-programmer-0.5.4': configure: error: cannot run C compiled programs. If you meant to cross compile, use –host’.
See `config.log’ for more details
Claudio-Battistas-MacBook-Pro:dfu-programmer-0.5.4 claudiobattista$
Last login: Sat Apr 7 16:35:57 on ttys005
Claudio-Battistas-MacBook-Pro:~ claudiobattista$ cd chronome_v2
Claudio-Battistas-MacBook-Pro:chronome_v2 claudiobattista$ sudo ./dfu-programmer atmega16u2 erase
sudo: ./dfu-programmer: command not found
Claudio-Battistas-MacBook-Pro:chronome_v2 claudiobattista$
attached a picture of the folder where i put the files…
when typing
sudo dfu-programmer atmega16u2 erase (without ./ – i have no clou what meany by the way) i get this
The ./ is used to make sure you execute the dfu-programmer app that is in the local directory.
When you removed the ./ , you are executing the old dfu-programmer app that does not have the patch.
If you look at the dfu-programmer file in Finder does it have an icon that shows "exec" and has a Kind of Unix Executable File?
If not, you will need to execute the command: chmod +x dfu-programmer
This will let you execute the file. Make sure your terminal's local directory is the one with the downloaded dfu-programmer and hex file.
Make sure you use the ./ when you execute the commands.
again this “cannot run C compiled programs.” error
Claudio-Battistas-MacBook-Pro:arduino-usbserial claudiobattista$ cd ~/Downloads/confuse-2.7/
Claudio-Battistas-MacBook-Pro:confuse-2.7 claudiobattista$ ./configure
checking whether to enable maintainer-specific portions of Makefiles… no
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… support/install-sh -c -d
checking for gawk… no
checking for mawk… no
checking for nawk… no
checking for awk… awk
checking whether make sets (MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/Users/claudiobattista/Downloads/confuse-2.7':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Claudio-Battistas-MacBook-Pro:confuse-2.7 claudiobattista
so mainly what i don´t understand is,
why am i not able to run C compiled programms
and
why is terminal still telling me this, when doing: sudo make dfu ? why at90usb82 ???
Claudio-Battistas-MacBook-Pro:arduino-usbserial claudiobattista$ sudo make dfu
dfu-programmer at90usb82 erase
dfu-programmer: no device present.
make: *** [dfu] Error 1