Re: [avr-gcc-list] agv-gcc with AVR Studio 4

From:

David Kelly

Subject:

Re: [avr-gcc-list] agv-gcc with AVR Studio 4

Date:

Thu, 9 Dec 2004 09:54:50 -0600 (CST)

> Interesting. Which version/build of AVR Studio are you using that has
> this icon?
Version 4.09 build 338. I install on F: rather than C: so its at:
F:\Program Files\Atmel\AVR Tools\AvrStudio4\Resources\avrgcc.bmp
> It's unclear what you are doing here. Are you generating DWARF2
> debugging info, then converting to COFF? If so, then you should know
> that both of these are mutually exclusive.
Have tried most everything. But have a better understanding of my
fundamental errors now.
> You can do one of the following:
> 1. Build ELF file with stabs debugging info, convert to COFF/Extended
> COFF, debug in AVR Studio (or alternatively VMLab [payware]).
> 2. Build ELF file with DWARF2 debugging info, debug in AVR Studio 4.10
> (which contains a new parser for ELF/DWARF2 in beta). No converting
> necessary.
Ah! I haven't dotted my i's and crossed my t's and am at least one (beta)
version behind. Silly me for using the CDROM rather than download.
Still, am being tripped by the GUI in not finding a way to load a
precompiled binary into the simulator. The menu items simply will not
un-dim. Can't debug until I can load my binary.
>> Not that it really matters but avr-gcc hosted on FreeBSD 5.3 450 MHz
>> PII is about 3 times faster than WinAVR on XP Pro 2 GHz P4 and 10
>> times faster than XP when the XP's working directory is on the
>> company's stupid Windows fileserver.
>
> I'm not totally surprised, given the that the working directory resides
> on a server. However, how does it perform on a local directory? Compared
> to FreeBSD?
That is what I was trying to say. Disk to disk my slow FreeBSD box is 3x
faster than my fast XP box, and XP is another 3x slower when the working
files are on fileserver no matter (or likely because of) the aggressive
local caching/mirroring. And this is with an essentially trivial project
of 4 files which compile to about 1k of binary. Does XP have a utility
similar to Unix time(1)? Otherwise my XP timings are only "1-Mississippi
2-Mississippi ..."
AndrAIa 116% gmake clean
rm -f *~ *.elf *.cof *.bin *.hex *.srec *.s *.o *.pdf *core
AndrAIa 117% time gmake
avr-gcc -O -gdwarf-2 -Wall -ffreestanding -mmcu=atmega128 -c -o main.o
main.c
avr-gcc -O -gdwarf-2 -Wall -ffreestanding -mmcu=atmega128 -c -o rtc.o rtc.c
avr-gcc -O -gdwarf-2 -Wall -ffreestanding -mmcu=atmega128 -c -o uart_0.o
uart_0.c
avr-gcc -O -gdwarf-2 -Wall -ffreestanding -mmcu=atmega128 -c -o uart_1.o
uart_1.c
avr-gcc -o project.elf -O -gdwarf-2 -Wall -ffreestanding -mmcu=atmega128
main.o rtc.o uart_0.o uart_1.o
avr-objcopy -O binary project.elf project.bin
avr-objcopy --debugging -O coff-ext-avr \
--change-section-address .data-0x800000 \
--change-section-address .bss-0x800000 \
--change-section-address .noinit-0x800000 \
--change-section-address .eeprom-0x810000 \
project.elf project.cof
Warning: file /var/tmp//cc4z5ZfB.s not found in symbol table, ignoring
Warning: ignoring function __vectors() outside any compilation unit
Warning: ignoring function __bad_interrupt() outside any compilation unit
0.319u 0.156s 0:00.48 95.8% 1880+596k 0+0io 0pf+0w
AndrAIa 118%
The above isn't totally fair as it was about the 3rd time the command was
executed in a short time. First time when the I/O cache was empty was
about 1 second wall clock and 45% CPU. Repeating doesn't help XP.
For those who tuned in late the FreeBSD machine is PII at 450 MHz and XP
is P4 at 2 GHz. And be sure to carefully note my opening statement, "It
doesn't really matter..." You know you are a geek when you find these
things interesting.