PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : WinAVR, Atmel AVR Studio und Asuro Lib verbinden



pinsel120866
07.01.2008, 07:31
Hallo Miteinander,

ich habe

- WinAVR auf Orginal-CD
- das neueste AVR Studio 4.13 von der Atmel Homepage heruntergeladen
- die Asuro Lib 2.70 von hier aus dem Download-Bereich.

Wie muss ich nun installieren bzw. konfigurieren um diese 3 Teile unter Windows XP harmonisch zusammenzufügen?

Danke und Gruß
Pinsel

m.a.r.v.i.n
07.01.2008, 09:20
Hallo pinsel,

ich würde dir empfehlen, die neueste WinAVR Version zu verwenden.
http://sourceforge.net/projects/winavr/

Ebenso die neueste Version der AsuroLib von Sourceforge:
http://sourceforge.net/project/showfiles.php?group_id=155217

Die Reihenfolge bei der Installation ist:
1. WinAVR
2. AVRStudio
3. AsuroLib (keine Installation notwendig, nur Zip-File entpacken)

Zur Verwendung von AVRStudio mit der AsuroLib gibt es einen Artikel im AsuroWiki (http://www.asurowiki.de/pmwiki/pmwiki.php/Main/AVRStudio)

pinsel120866
07.01.2008, 10:37
Hallo m.a.r.v.i.n,

danke für die Antwort. Ich habe jetzt alles installiert und lt. Wiki - Anleitung ein Projekt im FirstTry erstellt. Beim Drücken von F7 kommt:

gcc plug-in: Error: Object file not found on expected location C:\ASURO_SRC\asurolib\examples\FirstTry\test.elf
Make sure your makefile specifies the output .elf file as test.elf

Was ist falsch?

m.a.r.v.i.n
07.01.2008, 12:03
Hallo Pinsel,

in welches Verzeichnis hast du denn die AsuroLib ausgepackt?
C:\ASURO_SRC\AsuroLib

Wenn nicht, mußt du natürlich den korrekten Pfad angeben.

Falls ja, versuch es mal mit 'Build Clean' oder 'Build Rebuild'

pinsel120866
07.01.2008, 12:22
Hallo m.a.r.v.i.n,

der Pfad stimmt , glaube ich: z.B. c:\ASURO_SRC\asurolib\examples

Muss ich unter "asurolib" nochmals ein asurolib-Verzeichnis haben, wie in meinem Fall "asuro_libv271", damit ich mehrere Libs verwenden kann?

Bei clean erhalte ich:

make: clean: No such file or directory
make: *** No rule to make target `clean'. Stop.
Build failed with 2 errors and 0 warnings...

bei rebuild:

gcc plug-in: Error: Object file not found on expected location C:\ASURO_SRC\asurolib\examples\FirstTry\test.elf
Make sure your makefile specifies the output .elf file as test.elf

m.a.r.v.i.n
07.01.2008, 13:29
der Pfad stimmt , glaube ich: z.B. c:\ASURO_SRC\asurolib\examples


wenn du dir nicht sicher bist, klickst du unter 'Location' auf den Button mit den 3 Punkten, dann kann man das Verzeichnis direkt auswählen.
http://www.asurowiki.de/pmwiki/uploads/Main/avrstudio2.jpg



Muss ich unter "asurolib" nochmals ein asurolib-Verzeichnis haben, wie in meinem Fall "asuro_libv271", damit ich mehrere Libs verwenden kann?


Das sollte man tun, wenn man verschiedene Libs verwenden will.

pinsel120866
07.01.2008, 13:51
Hab ich alles so, bin ich wirklich zu dämlich? Anscheinend, denn jetzt kommt bei F7:

Loaded plugin STK500
Loaded plugin AVR GCC
gcc plug-in: Error: Object file not found on expected location C:\ASURO_SRC\asurolib\examples\FirstTry\test.elf
Make sure your makefile specifies the output .elf file as test.elf


Verzeichnis von C:\ASURO_SRC\asurolib\examples\FirstTry

07.01.2008 14:42 <DIR> .
07.01.2008 14:42 <DIR> ..
22.05.2007 09:56 91 FirstTry.pnproj
18.11.2007 17:34 7.664 Makefile
19.01.2007 21:31 8 Test-all.bat
19.01.2007 21:31 10 Test-clean.bat
07.01.2008 14:42 2.300 test.aps
09.04.2007 15:00 633 test.c
[/img]

m.a.r.v.i.n
07.01.2008, 14:04
Probier erst mal, ob sich die Projekte ohne Fehler in der Kommandozeile ausführen lassen. (test_all.bat)
AVRStudio zeigt leider nicht an, warum das compilieren scheitert.

pinsel120866
07.01.2008, 14:13
OK, schaut gut aus:


C:\ASURO_SRC\asurolib\examples\FirstTry>make all
set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -I../../lib/inc -funsigned-char -fu
nsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahl
ms=../../lib/asuro.lst ../../lib/asuro.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > asuro.d; \
[ -s asuro.d ] || rm -f asuro.d
set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -I../../lib/inc -funsigned-char -fu
nsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahl
ms=test.lst test.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > test.d; \
[ -s test.d ] || rm -f test.d
-------- begin --------
avr-gcc --version
avr-gcc (GCC) 4.2.2 (WinAVR 20071221)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

avr-gcc -c -mmcu=atmega8 -I. -g -Os -I../../lib/inc -funsigned-char -funsigned-b
itfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.l
st test.c -o test.o
avr-gcc -c -mmcu=atmega8 -I. -g -Os -I../../lib/inc -funsigned-char -funsigned-b
itfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=../../
lib/asuro.lst ../../lib/asuro.c -o asuro.o
avr-gcc -mmcu=atmega8 -I. -g -Os -I../../lib/inc -funsigned-char -funsigned-bitf
ields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.o te
st.o asuro.o --output test.elf -Wl,-Map=test.map,--cref -L../../lib -lm -lasur
o
avr-objcopy -O ihex -R .eeprom test.elf test.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex test.elf test.eep
c:\WinAVR\bin\avr-objcopy.exe: --change-section-lma .eeprom=0x00000000 never use
d
avr-objdump -h -S test.elf > test.lss
Size after:
test.elf :
section size addr
.text 662 0
.bss 18 8388704
.stab 888 0
.stabstr 95 0
.debug_aranges 128 0
.debug_pubnames 289 0
.debug_info 1112 0
.debug_abbrev 561 0
.debug_line 1290 0
.debug_frame 224 0
.debug_str 455 0
.debug_loc 117 0
Total 5839


Errors: none
-------- end --------


Übrigens - danke für deine Geduld!

m.a.r.v.i.n
07.01.2008, 19:22
Übrigens - danke für deine Geduld!

Kein Problem.

Ich habe dein Problem jetzt nachvollziehen können. In der Beschreibung fehlte ein kleines aber wichtiges Detail. Es genügt nicht den Haken bei 'use external Makefile' zu setzten. Man muß zudem auch noch das Makefile auswählen (Button '...' und dann die Datei 'Makefile' auswählen).

Dann klappt es auch mit AVR Studio. O:)

pinsel120866
08.01.2008, 06:18
Vielen Dank, jetzt hat's geklappt!

Schönen Tag wünscht
Pinsel