Forum: Mikrocontroller und Digitale Elektronik Probleme mit KontrollerLab und Assembler


von Alex A. (alex44)


Angehängte Dateien:

Lesenswert?

Hallo

ich bin gerade dabei mich mit Mikrocontrollern anzufreunden.
Ich habe mir dazu dauzu das Kontrollerlab installiert, da ich unter 
Linux arbeite. Über USB habe ich einen Atmel AVR ISP mkII angeschlossen. 
Mein Übungskontroller ist ein Atmel AtMega32.

Bei C-Programmen geht auch alles reibungslos nur mit Assembler seh ich 
keinen Stich mehr. Habe schon etliche Treats gelesen und einiges 
versucht, aber es kommen immer wieder neue Fehler, und ich weiß echt 
nicht weiter.

Ich habe meine Versuchsdateien mal angehängt. Ich denke, dass vielleicht 
das Makefile falsch ist, aber davon habe ich (noch) keine Ahnung.
Ich habe mal die ersten Zeilen der Fehlermeldung abgelichtet (Mit c&p 
gehts leider nicht)

Wäre schön, wenn mir jemand weiterhelfen könnte. Vielleicht sind ja auch 
nur Einstellungen falsch oder so...

Gruß
Alex

von spess53 (Gast)


Lesenswert?

Hi

>out  DDRF, mp

Der ATMega32 hat kein DDRF.

MfG Spess

von Alex A. (alex44)


Angehängte Dateien:

Lesenswert?

Ja, habe ich geändert. In der Makefile habe ich auch aus "avr-gcc" 
"avra" gemacht. Die Fehlermeldung ist jetzt schon kürzer, aber 
funktionieren tuts immer noch nicht...

von holger (Gast)


Lesenswert?

>In der Makefile habe ich auch aus "avr-gcc" "avra" gemacht.

Na klasse, du rufst AVRA mit AVR-GCC Style Parametern auf.
Warum sollte das klappen?

von Alex A. (alex44)


Lesenswert?

Wenn ich wüsste, was ich da täte...

es war nur ein Versuch

von Alex A. (alex44)


Lesenswert?

So geht es...

in Geany und dann mit der Konsole:

######################################################################## 
############
1.Schritt - Assembler-Datei assemblieren mit avra
        *.hex     -> für den Flash
        *.eep.hex -> für den EEPROM
------------------------------------------------------------------------ 
------------

nutzer@PC:~$ avra *.s

AVRA: advanced AVR macro assembler Version 1.2.3 Build 1 (15. November 
2007)
Copyright (C) 1998-2007. Check out README file for more info

   AVRA is an open source assembler for Atmel AVR microcontroller family
   It can be used as a replacement of 'AVRASM32.EXE' the original 
assembler
   shipped with AVR Studio. We do not guarantee full compatibility for 
avra.

   AVRA comes with NO WARRANTY, to the extent permitted by law.
   You may redistribute copies of avra under the terms
   of the GNU General Public License.
   For more information about these matters, see the files named 
COPYING.

Pass 1...
Pass 2...
done

Used memory blocks:
   Code      :  Start = 0x0000, End = 0x0004, Length = 0x0005

Assembly complete with no errors.
Segment usage:
   Code      :         5 words (10 bytes)
   Data      :         0 bytes
   EEPROM    :         0 bytes

######################################################################## 
############
2.Schritt - Speicher löschen mit AVRDUDE
        Parameter:
                -c Programmer ID (avrdude -c?)
                -p Kontrollerkürzel (avrdude -p?)
                -P Portkenzeichnung
                -e Speicher löschen
------------------------------------------------------------------------ 
------------

nutzer@PC:~$ avrdude -c avrispmkII -p m32 -P usb -e

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 
0.01s

avrdude: Device signature = 0x1e9502
avrdude: erasing chip

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

######################################################################## 
############
3.Schritt - Speicher schreiben mit AVRDUDE
        Parameter:
                -c Programmer ID (avrdude -c?)
                -p Kontrollerkürzel (avrdude -p?)
                -P Portkenzeichnung
                -U Speichertyp:Operation:Datei
                        Speichertyp - welcher Speicher soll bearbeitet 
werden
                        Operation - lesen(r) / schreiben(w) / 
vergleichen(v)
                        Datei - Ziel- oder Quelldatei der Daten, bzw 
Bytes
------------------------------------------------------------------------ 
------------

nutzer@PC:~$ avrdude -c avrispmkII -p m32 -P usb -U flash:w:main.s.hex 
-U eeprom:w:main.s.eep.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 
0.01s

avrdude: Device signature = 0x1e9502
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.s.hex"
avrdude: input file main.s.hex auto detected as Intel Hex
avrdude: writing flash (10 bytes):

Writing | ################################################## | 100% 
0.02s

avrdude: 10 bytes of flash written
avrdude: verifying flash memory against main.s.hex:
avrdude: load data flash data from input file main.s.hex:
avrdude: input file main.s.hex auto detected as Intel Hex
avrdude: input file main.s.hex contains 10 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 
0.01s

avrdude: verifying ...
avrdude: 10 bytes of flash verified
avrdude: reading input file "main.s.eep.hex"
avrdude: input file main.s.eep.hex auto detected as Intel Hex
avrdude: writing eeprom (0 bytes):

Writing | ################################################## | 100% 
0.00s

avrdude: 0 bytes of eeprom written
avrdude: verifying eeprom memory against main.s.eep.hex:
avrdude: load data eeprom data from input file main.s.eep.hex:
avrdude: input file main.s.eep.hex auto detected as Intel Hex
avrdude: input file main.s.eep.hex contains 0 bytes
avrdude: reading on-chip eeprom data:

Reading | ################################################## | 100% 
0.53s

avrdude: verifying ...
avrdude: 0 bytes of eeprom verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

######################################################################## 
############
FERTIG

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
Noch kein Account? Hier anmelden.