Forum: Mikrocontroller und Digitale Elektronik AVR STudio geht nicht mehr!! brauche dringend hilfe


von Jörn A. (joern_)


Lesenswert?

Hy

Nutze aVR Studio seid längerem aber jetzt kann ich nicht mehr 
kompilieren! (auf mehreren PCs....)

wo liegt der Fehler... ffrüher kam an Ende immer so viel Prozent benutzt 
u.s.w....

jetzt kommt folgende Meldung :

rm -rf LFTSALABVIEW.o  LFTSALABVIEW.elf dep/* LFTSALABVIEW.hex 
LFTSALABVIEW.eep
Build succeeded with 0 Warnings...
avr-gcc.exe  -mmcu=atmega16 -Wall -gdwarf-2 -O0 -MD -MP -MT 
LFTSALABVIEW.o -MF dep/LFTSALABVIEW.o.d  -c  ../LFTSALABVIEW.c
avr-gcc.exe -mmcu=atmega16  LFTSALABVIEW.o     -o LFTSALABVIEW.elf
avr-objcopy -O ihex -R .eeprom  LFTSALABVIEW.elf LFTSALABVIEW.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" 
--change-section-lma .eeprom=0 -O ihex LFTSALABVIEW.elf LFTSALABVIEW.eep
c:\WinAVR-20070525\bin\avr-objcopy.exe: there are no sections to be 
copied!
c:\WinAVR-20070525\bin\avr-objcopy.exe: --change-section-lma 
.eeprom=0x00000000 never used
make: *** [LFTSALABVIEW.eep] Error 1
Build succeeded with 0 Warnings...

woher kommt das, bzw was kann ich tun!

von Jörn A. (joern_)


Lesenswert?

lustiger weise kann ich die neueste Version 4.13 b528 nicht mal 
installieren!!
gleich beim Setup.exe ein error!

was ist das eigentlich für eine Software? gibt es da keine Alternative? 
das ist ja furchtbar!

hab es jetzt auf 3 PCs installiert. WIn 2000, Win XP und Vista!

versuche es mit Version  4.12 & SP...


von Kai S. (Firma: ZeuSWarE GmbH) (zeusosc)


Lesenswert?

Probiers mal mit der zusätzlichen option
--no-change-warnings
Denn anscheinend wird der eeprom sector nicht genutzt und exisitert 
dementsprechend auch nicht in der elf file,..
daher der error,..
für weitere informationen:
http://www.gnu.org/software/binutils/manual/html_chapter/binutils_3.html
(obwohl avr-gcc ein no gnu compiler ist, sind sie sehr sehr sehr sehr 
ähnlich)

grüüße

von Kai S. (Firma: ZeuSWarE GmbH) (zeusosc)


Lesenswert?

Achso,. zu deiner Alternative:

Dev-Cpp,.. ist ne kostenlose IDE,..
anleitung zur benutzung von avr-gcc gibts unter
www.roboternetz.de

grüüße

von Jörn A. (joern_)


Lesenswert?

so?

Build started 27.6.2007 at 20:53:20
avr-gcc.exe  -mmcu=atmega16 -Wall -gdwarf-2 -O0  -no-change-warnings 
-MD -MP -MT Prog.o -MF dep/Prog.o.d  -c  ../Prog.c
../Prog.c: In function 'main':
../Prog.c:17: warning: control reaches end of non-void function
avr-gcc.exe: unrecognized option '-no-change-warnings'
avr-gcc.exe -mmcu=atmega16  Prog.o     -o Prog.elf
avr-objcopy -O ihex -R .eeprom  Prog.elf Prog.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" 
--change-section-lma .eeprom=0 -O ihex Prog.elf Prog.eep
c:\WinAVR-20070525\bin\avr-objcopy.exe: there are no sections to be 
copied!
c:\WinAVR-20070525\bin\avr-objcopy.exe: --change-section-lma 
.eeprom=0x00000000 never used
make: *** [Prog.eep] Error 1
Build succeeded with 1 Warnings...


irgendwie das selbe! also unabhängig vom Inhalt des Programs...

von Jörn A. (joern_)


Lesenswert?

und noch ne Frage:

wenn ich versuche zu debuggen, kommt nur Runtime Error und es wird 
geschlossen!

gibt es noch eine ältere Stabile Version? mehr als installieren kann ich 
doch niche oder?

von Spess53 (Gast)


Lesenswert?

Hi

Bist du sicher, daß es am AVR-Studio liegt? Sieht mir mehr nach AVR-GCC 
aus. Versuch doch mal ein reines Assemblerprogramm.

MfG Spess

von Jörn A. (joern_)


Lesenswert?

hab bis jetzt nur in C programmiert :D

kann mir jemand ein laufendes Beispiel posten?

von Kai S. (Firma: ZeuSWarE GmbH) (zeusosc)


Lesenswert?

Er benutzt das Avr-Studio mit avr-gcc wie es aussieht,..

ähm das commando muss ins makefile,...
und zwar:
%.eep: %.elf
  @echo
  @echo $(MSG_EEPROM) $@
  -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
  --change-section-lma .eeprom=0 -O $(FORMAT) $< $@

vor dem -j wenn ich nicht falsch liege,...

Die message die du bekommst sieht in ordnung aus,...
>###################################
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load"
--change-section-lma .eeprom=0 -O ihex Prog.elf Prog.eep
c:\WinAVR-20070525\bin\avr-objcopy.exe: there are no sections to be
copied!
c:\WinAVR-20070525\bin\avr-objcopy.exe: --change-section-lma
.eeprom=0x00000000 never used
>###################################
aber vlt helfen dir die nachfolgenden infos ein wenig,..

>###
-j sectionname
--only-section=sectionname
    Copy only the named section from the input file to the output file. 
This option may be given more than once. Note that using this option 
inappropriately may make the output file unusable.
>###
Damit seperiert man eine section,.. hier die section .eeprom

>###
--set-section-flags section=flags
    Set the flags for the named section. The flags argument is a comma 
separated string of flag names. The recognized names are `alloc', 
`contents', `load', `noload', `readonly', `code', `data', `rom', 
`share', and `debug'. You can set the `contents' flag for a section 
which does not have contents, but it is not meaningful to clear the 
`contents' flag of a section which does have contents--just remove the 
section instead. Not all flags are meaningful for all object file 
formats.
>###

Da beziehe ich mich mal auf folgendes:
>>just remove the section instead

........
vlt. auch einfach mal das commando in der mfile ausmarkieren,..

grüüße

von Jörn A. (joern_)


Lesenswert?

also ich muss ehrlich sagen, das verstehe ich nicht!
Es klappte vorher immer wunderbar. ich brauchte vorher auch nichts 
ändern...

aber hier die makefile:

da steht bei mir was anderes...
1
###############################################################################
2
# Makefile for the project calibration
3
###############################################################################
4
5
## General Flags
6
PROJECT = calibration
7
MCU = atmega16
8
TARGET = calibration.elf
9
CC = avr-gcc.exe
10
11
## Options common to compile, link and assembly rules
12
COMMON = -mmcu=$(MCU)
13
14
## Compile options common for all C compilation units.
15
CFLAGS = $(COMMON)
16
CFLAGS += -Wall -gdwarf-2 -O0 -no-change-warnings 
17
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d 
18
19
## Assembly specific flags
20
ASMFLAGS = $(COMMON)
21
ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2
22
23
## Linker flags
24
LDFLAGS = $(COMMON)
25
LDFLAGS += 
26
27
28
## Intel Hex file production flags
29
HEX_FLASH_FLAGS = -R .eeprom
30
31
HEX_EEPROM_FLAGS = -j .eeprom
32
HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
33
HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0
34
35
36
## Objects that must be built in order to link
37
OBJECTS = calibration.o 
38
39
## Objects explicitly added by the user
40
LINKONLYOBJECTS = 
41
42
## Build
43
all: $(TARGET) calibration.hex calibration.eep size
44
45
## Compile
46
calibration.o: ../calibration.c
47
  $(CC) $(INCLUDES) $(CFLAGS) -c  $<
48
49
##Link
50
$(TARGET): $(OBJECTS)
51
   $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET)
52
53
%.hex: $(TARGET)
54
  avr-objcopy -O ihex $(HEX_FLASH_FLAGS)  $< $@
55
56
%.eep: $(TARGET)
57
  avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@

von Kai S. (Firma: ZeuSWarE GmbH) (zeusosc)


Lesenswert?

## Intel Hex file production flags
HEX_FLASH_FLAGS = -R .eeprom

HEX_EEPROM_FLAGS = -j .eeprom
HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0

daraus mache mal:
## Intel Hex file production flags
HEX_FLASH_FLAGS = -R .eeprom
HEX_EEPROM_FLAGS =--no-change-warnings
HEX_EEPROM_FLAGS += -j .eeprom
HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0

falls das dann immer noch net klappt einfach mal auskommentieren,..
also

## Intel Hex file production flags
##HEX_FLASH_FLAGS = -R .eeprom
##HEX_EEPROM_FLAGS =--no-change-warnings
##HEX_EEPROM_FLAGS += -j .eeprom
##HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
##HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0


und warum ich auf diesem commando ganze zeit rumhacke, dafür ist:
>c:\WinAVR-20070525\bin\avr-objcopy.exe: there are no sections to be
>copied!
>c:\WinAVR-20070525\bin\avr-objcopy.exe: --change-section-lma
>.eeprom=0x00000000 never used
verantwortlich,...


ansonsten müsstest du mir mal bitte den quellcode zeigen,...
grüüüße

von FBI (Gast)


Lesenswert?

Hi,

WinAVR20070525 und AVRStudio4.12 sind NICHT kompatibel! Genau daher 
kommt auch das beschriebene Problem. Man brauchst unbedingt 
AVRStudio4.13!

Leider gibt es im Moment wohl ein Problem auf atmel.com, wenn man 
versucht AVRStudio4.13 mit Firefox oder Opera (IE geht angeblich, andere 
weis ich nicht) zu laden. Nachdem man auf der Registrierungsseite auf 
den Download-Button geklickt hat, muß man den aufpoppenden 
Speicherdialog unbedingt abbrechen(!!!), sonst ist die Datei kaputt. 
Wenn man dann auf der folgenden Seite den "please click here"-Link 
benutzt, dann klappts auch mit der Installation :)
Zu erkennen ist das Problem auch an der Dateigröße. Die korrekte Datei 
hat 77414298 Bytes, die kaputte 77414772.
Alternativ kann man AVRStudio4.13 auch von http://www.atmel.no/beta_ware 
herunterladen, da gibts keine Probleme.
Mehr Infos dazu (in Englisch) gibts hier: 
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=51040&start=all

CU FBI

von Kai S. (Firma: ZeuSWarE GmbH) (zeusosc)


Lesenswert?

Was hat das problem mit dem avr studio zu tun??
die meldung kommt ausm avr-gcc,..
winavr isn zwar ne ide für avr-gcc aber NICHT das gleiche,...
ich wette wenn du das die schritte manuell per kommandozeile machst wird 
das gleiche herauskommen,...
bitte sag wenn ich mich irre,..

grüüüüße

von Simon K. (simon) Benutzerseite


Lesenswert?

Übrigens, das da oben ist kein Fehler. Also das geschriebene Programm 
konnte zu 100% erfolgreich kompiliert und gelinkt werden. Das einzige 
"Problem" ist, dass du keine EEPROM Sections benutzt hast (Vermutlich, 
weil du das EEPROM nicht brauchst). Daher der eine Fehler, der aber zu 
vernachlässigen ist in diesem Falle.

Das Programm muss nach dieser Meldung zu 100% erfolgreich übersetzt 
worden sein. Sonst stände dort nicht:

> Build succeeded with 0 Warnings...

von FBI (Gast)


Lesenswert?

Hi,

also WinAVR ist ja nu alles andere als eine IDE und schon gar nicht für 
avr-gcc (OK 'Programmers Notepad' ist Bestandteil von WinAVR und das 
könnte man eventuell als IDE bezeichnen).
WinAVR ist die Windowsportierung von avr-gcc (+binutils +avr-libc 
+etliches andere). Wenn schon, dann ist AVRStudio (unter anderem) eine 
IDE für WinAVR. Und wenn man AVRStudio als IDE für WinAVR benutzt (wie 
es der OP offensichtlich tut), dann wird das Makefile für WinAVR 
dynamisch vom AVRStudio erzeugt (es sei denn man schaltet dies explizit 
ab). Und genau hier liegt das Problem (ja Problem, nicht Fehler). Das 
vom alten AVRStudio 4.12 erzeugte Makefile passt nicht zu WinAVR ab 
Version 20070122 aufwärts, also auch nicht zur Version 20070525. Und die 
Fehlermeldung kommt auch nicht von avr-gcc sondern von avr-objcopy. Und 
das ist Bestanteil der binutils und diese sind wiederum Bestandteil von 
WinAVR.

Fazit: WinAVR 20070525 und AVRStudio 4.12 PASSEN NICHT ZUSAMMEN !!!
Für WinAVR20070525 benötigt man AVRStudio4.13 sonst hat man Probleme!

CU

PS: Außerdem führt die Kombination AVRStudio 4.12 und WinAVR 20070122 
(und neuer) auch zu einem Crash von AVRStudio beim Aufruf des 
Debuggers/Simulators, da das alte AVRStudio nicht mehr mit den von den 
neueren WinAVR Versionen erzeugten hex-Files klarkommt.

von Jörn A. (joern_)


Lesenswert?

vielen Dank. es scheint wirklich mit inkompatibiliäten zwischen 
AVR-Studio und AVR-GCC zusammenzuhängen.

Studio 4.13 geht mit der neuesten WINAVR

Studio 4.12 Build  460 & SP 498 geht nur mit WINAVR 20060421

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.