<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Arial'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Zdravim,</DIV>
<DIV>Vedeli by ste mi prosim poradit preco sa nedaju sledovat premene v AVR
studiu vo watch windov ked je kod napisany v C. V cecku nerobim.... tak sa moc
nevyznam ako to tam funguje. Potrebujem napisat program kt. bude zapisovat na sd
kartu a este komunikovat po 1wire zbernici. V asm. sa mi to pisat nechce, tak
som si to naklikal vo flowcode AVR. to mi skompilovalo aj prelozilo do C. ten
som potom nacital a skompiloval v AVR studiu. lenze pri krokovani mi to nechce
vypisovat hodnoty premennych (not in scope). da sa stim nieco urobit? Niekde som
nasiel popis ze treba nastavit optimalizacu kompilatora na –O0 lenze to mi potom
v tom AVR studiu neskompiluje ked ponecham –Os tak ano. Vo Flowcode to
kompiluje. gcc je to iste ta ista verzia aj kniznice (z flowcode som nakopiroval
do winavr)</DIV>
<DIV>Vo FC to kompiluje takto: </DIV>
<DIV>avr-gcc.exe" -mmcu=atmega64 -O0 -Wall -funsigned-char -o
"E:\_AVR\PRIETO~1\p1.elf" "E:\_AVR\PRIETO~1\p1.c" –lm </DIV>
<DIV>s toho vytvori elf a z toho potom hex:</DIV>
<DIV>avr-objcopy" -O ihex -R .eeprom "E:\_AVR\PRIETO~1\p1.elf"
"E:\_AVR\PRIETO~1\p1.hex</DIV>
<DIV> </DIV>
<DIV>Ale v AVR studiu najprv vytvori nejaky .o subor. a ked s toho vytvara .elf
tak to skoci... Ono mi pripada ze tam prilinkovava vsetky kniznice, pretoze v
map subore, ak tomu spravne rozumiem (ze tam su adresi v pamati aka cast kodu
bude kde ulozena) ked je bez optimalizacie tak je tam vela kniznic ale pri
optimalizacii je ich tam len par.... </DIV>
<DIV> </DIV>
<DIV>pri kompilacii to vypise toto:</DIV>
<DIV>avr-gcc -mmcu=atmega128 -Wl,-Map=p1.map p1.o -o
p1.elf</DIV>
<DIV>c:/program
files/atmel/winavr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr51\libc.a(log.o):
In function `log':</DIV>
<DIV>(.text.fplib+0x46): relocation truncated to fit: R_AVR_13_PCREL against
symbol `__addsf3' defined in .text section in c:/program
files/atmel/winavr/bin/../lib/gcc/avr/4.3.2/avr51\libgcc.a(_addsub_sf.o)</DIV>
<DIV>c:/program
files/atmel/winavr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr51\libc.a(log.o):
In function `log':</DIV>
<DIV>(.text.fplib+0x4e): relocation truncated to fit: R_AVR_13_PCREL against
symbol `__addsf3' defined in .text section in c:/program
files/atmel/winavr/bin/../lib/gcc/avr/4.3.2/avr51\libgcc.a(_addsub_sf.o)</DIV>
<DIV>c:/program
files/atmel/winavr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr51\libc.a(pow.o):
In function `pow':</DIV>
<DIV>(.text.fplib+0x94): relocation truncated to fit: R_AVR_13_PCREL against
symbol `__mulsf3' defined in .text section in c:/program
files/atmel/winavr/bin/../lib/gcc/avr/4.3.2/avr51\libgcc.a(_mul_sf.o)</DIV>
<DIV>c:/program
files/atmel/winavr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr51\libc.a(inverse.o):
In function `inverse':</DIV>
<DIV>(.text.fplib+0xc): relocation truncated to fit: R_AVR_13_PCREL against
symbol `__divsf3' defined in .text section in c:/program
files/atmel/winavr/bin/../lib/gcc/avr/4.3.2/avr51\libgcc.a(_div_sf.o)</DIV>
<DIV>c:/program
files/atmel/winavr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr51\libc.a(modf.o):
In function `modf':</DIV>
<DIV>(.text.fplib+0x3e): relocation truncated to fit: R_AVR_13_PCREL against
symbol `__subsf3' defined in .text section in c:/program
files/atmel/winavr/bin/../lib/gcc/avr/4.3.2/avr51\libgcc.a(_addsub_sf.o)</DIV>
<DIV>make: *** [p1.elf] Error 1</DIV>
<DIV>Build failed with 1 errors and 112 warnings...</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>dik za pomoc</DIV>
<DIV>michal</DIV></DIV></DIV></BODY></HTML>