Hi Ich habe bis jetzt immer nur mit der Arduino-IDE rumgespielt, wollte aber mal den obligatorischen Schritt zur Programmierung in C gehen. Jetzt hab ich mir das tut von ubunutuusers mal angeschaut: https://wiki.ubuntuusers.de/AVR/ Ist ja alles nicht soo kompliziert.. Jedoch gibt es folgendes Problem: Die Datei kann ich problemlos kompilieren. Beim build Befehl mit make all bekomme ich aber folgende Meldung: make program (im Verzeichnis: /home/markus/Schreibtisch/Alles/µCs) avrdude -p atmega328p -P usb -c avrispmkII -V -U flash:w:main.hex avrdude done. Thank you. Makefile:322: recipe for target 'program' failed make: *** [program] Error 1 Kompilierung fehlgeschlagen. In der Line 322 vom Makefile sind halt die Parameter für avrdude angegeben, aber die scheinen zu stimmen. Wenn ich die .hex Datei mit avrdude einfach so hochladen will, bekomme ich ein AVRdude done thank you zurück, ohne das das Programm tatsächlich etwas hochgeladen hätte... Hat jmd ne Idee?
Markus schrieb: > Hat jmd ne Idee? … du könntest nun die gesamte Fehlermeldung posten, oder, wenn du nicht weißt, was genau zur Fehlermeldung gehört, die gesamte Ausgabe auf irgend’nem Pastebin veröffentlichen und hier verlinken. Damit kann man dann schauen, woran es liegen mag. Das konkret benutzte Makefile wäre sicher auch hilfreich.
Jack V. schrieb: > die gesamte Ausgabe auf > irgend’nem Pastebin veröffentlichen und hier verlinken. Oder besser in eine Textdatei, und die dann hier an den Beitrag anhängen.
Ich rate jetzt mal: Der Name des Hauptprogramms ist im makefile nicht eingetragen.
Hier make program (im Verzeichnis: /home/markus/Schreibtisch/Alles/µCs) avrdude -p atmega328p -P usb -c avrispmkII -V -U flash:w:main.hex avrdude done. Thank you. Makefile:322: recipe for target 'program' failed make: *** [program] Error 1 Kompilierung fehlgeschlagen. Makefile ist drangehangen.
Markus schrieb: > avrdude -p atmega328p -P usb -c avrispmkII -V -U flash:w:main.hex Hast du einen avrispmkII? Oliver
Kommentiere im Makefile die Zeile "AVRDUDE_VERBOSE = -v -v" ein. Aber ein -v genügt. Dann bekommst du Infos zum Fehler.
Ah danke diese Zeile habe ich selber gesucht... War wohl zu blöde Danke. Hier die Fehlermeldung make program (im Verzeichnis: /home/markus/Schreibtisch/Alles/µCs) avrdude -p atmega328p -P usb -c avrispmkII -V -v -v -U flash:w:main.hex avrdude: Version 6.3 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch System wide configuration file is "/etc/avrdude.conf" User configuration file is "/home/markus/.avrduderc" User configuration file does not exist or is not a regular file, skipping Using Port : usb Using Programmer : avrispmkII avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104) avrdude done. Thank you. Makefile:322: recipe for target 'program' failed make: *** [program] Error 1 Kompilierung fehlgeschlagen.
Oliver S. schrieb: > Hast du einen avrispmkII? Markus schrieb: > ist doch der Arduino on board programmer oder net? Nein, der heißt "-c arduino" und benötigt einen seriellen Port "-P /dev/ttyUSB0" oder so ähnlich. Kannst du direkt nach dem Anstecken des USB Kabels mit "sudo dmesg" herausfinden.
Markus schrieb: > ist doch der Arduino on board programmer oder net? Net! Üblicherweise verwendet Arduino einen Bootloader.
markus@UNDEADPC2019:~/Schreibtisch/Alles/µCs$ sudo avrdude -p m328p -P /dev/ttyACM0 -c arduino main.hex avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude: Device signature = 0x1e950f (probably m328p) avrdude: safemode: Fuses OK (E:00, H:00, L:00) avrdude done. Thank you Brennt halt nicht...
Markus schrieb: > sudo avrdude -p m328p -P /dev/ttyACM0 -c arduino main.hex Die Kommandozeile ist unvollständig. Da fehlt jetzt "-V -U flash:w:" vor dem Dateinamen. Das hattest du vorher aber mal richtig. Irgendwas hast du kaputt gemacht.
Warum sollte der auch? Von den ganzen vielen komischen Zeichen hinter AVRDude in deinem ursprünglichen Aufruf waren nicht alle falsch, und auch nicht sinnlos. https://www.nongnu.org/avrdude/user-manual/avrdude_4.html#Option-Descriptions Oliver
make program (im Verzeichnis: /home/markus/Schreibtisch/Alles/µCs) avrdude -p atmega328p -P /dev/ttyACM0 -c arduino -V -v -v -U flash:w:main.hex avrdude: Version 6.3 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch System wide configuration file is "/etc/avrdude.conf" User configuration file is "/home/markus/.avrduderc" User configuration file does not exist or is not a regular file, skipping Using Port : /dev/ttyACM0 Using Programmer : arduino AVR Part : ATmega328P Chip Erase delay : 9000 us PAGEL : PD7 BS2 : PC2 RESET disposition : dedicated 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 1024 4 0 3600 3600 0xff 0xff flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 lock 0 0 0 0 no 1 0 0 4500 4500 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 : Arduino Description : Arduino Hardware Version: 3 Firmware Version: 4.4 Vtarget : 0.3 V Varef : 0.3 V Oscillator : 28.800 kHz SCK period : 3.3 us avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude: Device signature = 0x1e950f (probably m328p) 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 "main.hex" avrdude: input file main.hex auto detected as Intel Hex avrdude: writing flash (134 bytes): Writing | ################################################## | 100% 0.04s avrdude: 134 bytes of flash written avrdude done. Thank you. Kompilierung erfolgreich beendet. Funzt jetzt alles Fettes Dankeschön an euch (mal wieder).
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.