avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Problem with difference between WinAVR versions - He


From: Ned Konz
Subject: Re: [avr-gcc-list] Problem with difference between WinAVR versions - Help please!
Date: Wed, 8 Sep 2004 06:39:04 -0700
User-agent: KMail/1.7

On Wednesday 01 September 2004 12:48 am, Peter Bozzay wrote:
> Hello,
>
> I have written about this problem with 1wire driver in Avrfreaks project
> #059. I would like to solve it now anyway, so I tried to examine it
> closer, and I have these experiences:
>
> I striped the code to remain only the necessary parts in ds18x20.x and
> one_wire.x files, and made a very simple project, what uses only these
> files. The makefile is the template of 20040404.
> The generated code works fine with Winavr20030115 and 20030312 versions,
> but not with 20030913 and 20040404! It seems something changed in some
> part of 20030913, what causes it.
> I tried to compare the different Winavr versions generated files. I can
> see significant difference only in one_wire.lst file of 20030312 and
> 20030913.
> The one_wire.c and .h are full of macro expressions and have some asm
> parts. 

That's an understatement. The ow_get_bit() function is almost entirely 
assembly language.

Just a data point...

When I use avr-gcc 3.4.1 (I'm on Linux) I do see differences. But using 
avr-gcc 3.4.0 (from Atmel's site, I think), I don't see any differences.

Here's the diffs I get on Linux with avr-gcc 3.4.1:

diff line1_active/1wtest.lss line2_active/1wtest.lss
205,207c205,207
<   da: c2 98        cbi 0x18, 2 ; 24
<   dc: b3 99        sbic 0x16, 3 ; 22
<   de: 21 e0        ldi r18, 0x01 ; 1
---
>   da: b3 99        sbic 0x16, 3 ; 22
>   dc: 21 e0        ldi r18, 0x01 ; 1
>   de: c2 98        cbi 0x18, 2 ; 24
411,413c411,413
<  22e: c2 98        cbi 0x18, 2 ; 24
<  230: b3 99        sbic 0x16, 3 ; 22
<  232: 81 e0        ldi r24, 0x01 ; 1
---
>  22e: b3 99        sbic 0x16, 3 ; 22
>  230: 81 e0        ldi r24, 0x01 ; 1
>  232: c2 98        cbi 0x18, 2 ; 24

diff line1_active/one_wire.c line2_active/one_wire.c
447c447
<  cbi(PORTB,2); //test line 1
---
> // cbi(PORTB,2); //test line 1
452c452
< // cbi(PORTB,2); //test line 2
---
>  cbi(PORTB,2); //test line 2
Only in line1_active: .one_wire.c.swp
diff line1_active/one_wire.lst line2_active/one_wire.lst
513,516c513
<  447:one_wire.c    ****  cbi(PORTB,2); //test line 1
<  121                .LM10:
<  122                /* #NOAPP */
<  123 0024 C298        cbi 56-0x20,2
---
>  447:one_wire.c    **** // cbi(PORTB,2); //test line 1
520,524c517,521
<  125                .LM11:
<  126 0026 B399        sbic 54-0x20,3
<  127 0028 21E0        ldi r18,lo8(1)
<  128                .L3:
<  129                .LBB4:
---
>  121                .LM10:
>  122                /* #NOAPP */
>  123 0024 B399        sbic 54-0x20,3
>  124 0026 21E0        ldi r18,lo8(1)
>  125                .L3:
526c523,526
<  452:one_wire.c    **** // cbi(PORTB,2); //test line 2
---
>  452:one_wire.c    ****  cbi(PORTB,2); //test line 2
>  127                .LM11:
>  128 0028 C298        cbi 56-0x20,2
>  129                .LBB4:
1068,1072c1068,1072
<  664 0178 C298        cbi 56-0x20,2
<  666                .LM79:
<  667 017a B399        sbic 54-0x20,3
<  668 017c 81E0        ldi r24,lo8(1)
<  669                .L41:
---
>  664 0178 B399        sbic 54-0x20,3
>  665 017a 81E0        ldi r24,lo8(1)
>  666                .L41:
>  668                .LM79:
>  669 017c C298        cbi 56-0x20,2

-- 
Ned Konz
http://bike-nomad.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]