Bug 688645 - delay's bug
delay's bug
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: avr-binutils (Show other bugs)
14
Unspecified Linux
unspecified Severity high
: ---
: ---
Assigned To: Thibault North
Fedora Extras Quality Assurance
:
: 734855 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-17 11:58 EDT by Peque
Modified: 2012-04-05 04:15 EDT (History)
8 users (show)

See Also:
Fixed In Version: avr-binutils-2.20-2.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-11-22 19:56:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Blink source (508 bytes, application/octet-stream)
2011-03-17 11:58 EDT, Peque
no flags Details

  None (edit)
Description Peque 2011-03-17 11:58:37 EDT
Created attachment 486046 [details]
Blink source

Description of problem:
I guess it's a problem related to the "delay" function.

Version-Release number of selected component (if applicable):
avr-binutils-2.21-1.fc14

How reproducible:
Upload the "blink" example code to the Arduino platform.

Steps to Reproduce:
1. Compile de code.
2. Uplaod it to Arduino.
3. See how it doesn't work.
  
Actual results:
The Arduino test LED doesn't blink at all.

Expected results:
The Arduino test LED should blink.

Additional info:
It worked with previous version avr-binutils-2.20.
Comment 1 Thibault North 2011-03-19 11:05:27 EDT
Hi,

Thanks for your report. I'll file a bug upstream about that.

Best,
Thibault
Comment 2 M. Hamzah Khan 2011-05-25 17:34:44 EDT
Has this been fixed yet?

I just ran into this problem too.
Comment 3 Thibault North 2011-05-27 17:54:36 EDT
Not yet. Here is the bug report.
http://sourceware.org/bugzilla/show_bug.cgi?id=12757

You may have to downgrade :(
Comment 4 Peter Oliver 2011-09-12 18:08:11 EDT
*** Bug 734855 has been marked as a duplicate of this bug. ***
Comment 5 Peque 2011-10-15 14:31:38 EDT
Any news? :-S
Comment 6 Thibault North 2011-10-15 15:46:59 EDT
Please check this bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=737950
Maybe the new packages work for you ?
Comment 7 Thibault North 2011-10-15 17:12:51 EDT
Hmm also please try this scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3433707

Does it fix the problem ?
Comment 8 Tom Georgoulias 2011-11-02 18:32:35 EDT
The Blink example sketch does not work on Fedora 16 beta.  Here's the RPM I'm using:

$ rpm -q avr-binutils
avr-binutils-2.21-2.fc15.i686
Comment 9 Thibault North 2011-11-03 09:18:47 EDT
Which avr-gcc version are you using ? And avr-libc?
Does it work if you downgrade avr-binutils to 2.20 ?
A similar problem was reported here: http://code.google.com/p/arduino/issues/detail?id=689
Comment 10 Tom Georgoulias 2011-11-03 19:10:43 EDT
I'm using avr-gcc-4.6.1-3.fc16.i686 and avr-libc-1.7.1-1.fc16.noarch.

It does work when I downgrade avr-binutils to 2.20.  I built avr-binutils-2.20-2.fc16.i386 using the srpm from koji and the blink sketch worked the first time.
Comment 11 Tom Georgoulias 2011-11-03 19:11:50 EDT
Just to clarify, I mean that the problem immediately went away when I downgraded avr-binutils and it hasn't returned since.
Comment 12 Tom Georgoulias 2011-11-10 20:45:32 EST
Is it reasonable to consider making avr-binutils 2.20 the official release for Fedora 16, downgrading from 2.21?
Comment 13 Thibault North 2011-11-10 21:38:09 EST
Yes, I think this would make more sense.
Last try before that: can you please test this build, which is a snapshot of avr-binutils-2.22 ?
http://koji.fedoraproject.org/koji/taskinfo?taskID=3506784
If it fixes the problem, we may go with that one instead.

Thanks,
Thibault
Comment 14 Tom Georgoulias 2011-11-10 22:24:13 EST
I just downloaded and installed that RPM, but it didn't fix the problem.  The LED stays lit, it doesn't blink. 

I downgraded to the avr-binutils-2.20-2.fc16.i386.rpm I built myself and the LED is blinking again.

I think a downgrade is the best option at this time.
Comment 15 Fedora Update System 2011-11-11 10:31:00 EST
avr-binutils-2.20-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/avr-binutils-2.20-2.fc16
Comment 16 Fedora Update System 2011-11-11 10:31:09 EST
avr-binutils-2.20-2.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/avr-binutils-2.20-2.fc15
Comment 17 Thibault North 2011-11-11 10:32:41 EST
Please comment on it (if it works for you) so that it reaches stable faster.
Thanks for your feedback, and sorry for this issue.
Comment 18 Fedora Update System 2011-11-11 10:48:11 EST
avr-binutils-2.20-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/avr-binutils-2.20-2.fc14
Comment 19 Fedora Update System 2011-11-11 22:24:13 EST
Package avr-binutils-2.20-2.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing avr-binutils-2.20-2.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-15770
then log in and leave karma (feedback).
Comment 20 Peque 2011-11-14 08:19:40 EST
Package avr-binutils-2.20 in Fedora 16 fixed the problem :-).
Comment 21 Fedora Update System 2011-11-22 19:56:35 EST
avr-binutils-2.20-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 22 Fedora Update System 2011-11-22 20:02:01 EST
avr-binutils-2.20-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 23 Fedora Update System 2011-11-22 20:03:11 EST
avr-binutils-2.20-2.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 24 Michal Hlavinka 2012-02-02 07:02:07 EST
Seems everyone can't be happy. With avr-binutils 2.20 I get:
avr-objdump -h -S project.elf > project.lss
BFD: Dwarf Error: mangled line number section.
BFD: Dwarf Error: mangled line number section.
BFD: Dwarf Error: mangled line number section.

with avr-binutils 2.22 this message is gone (and output is usable compared to 2.20 output). I hope that one day... we will have working build tools without any bug. One day... :)
Comment 25 Thibault North 2012-04-04 12:02:51 EDT
I am preparing a new release with avr-gcc-4.7.0 and avr-binutils 2.22:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3963662 (required for avr-gcc)
http://koji.fedoraproject.org/koji/taskinfo?taskID=3963735

Would you mind testing it ? I hope that delay bug will be gone finally.
Comment 26 Thibault North 2012-04-04 12:12:07 EDT
Hmm, of course the last one didn't build...
f-15 build here:
http://tnorth.fedorapeople.org/avr-gcc-4.7.0-1.fc15.x86_64.rpm
f-16 build (to come)
http://tnorth.fedorapeople.org/avr-gcc-4.7.0-1.fc16.x86_64.rpm
Comment 27 Michal Hlavinka 2012-04-05 04:15:32 EDT
Hi Thibault,
gcc 4.7 has serious regression, I'd not recommend using it.

If you copy struct in avr-gcc 4.7.0, you'll get unexpected result (see the #else section for the example of broken code). There is known workaround for this:

#if ((__GNUC__ > 4 || __GNUC__ == 4) && (__GNUC_MINOR__ > 7 || __GNUC_MINOR__ == 7))
  DirEnt tmp;
  __builtin_memcpy(&tmp, __builtin_assume_aligned(&eeFs.files[i_fileId1], sizeof(DirEnt)), sizeof(DirEnt));
  __builtin_memcpy(&eeFs.files[i_fileId1], __builtin_assume_aligned(&eeFs.files[i_fileId2], sizeof(DirEnt)), sizeof(DirEnt));
  __builtin_memcpy(&eeFs.files[i_fileId2], __builtin_assume_aligned(&tmp, sizeof(DirEnt)), sizeof(DirEnt));
#else
  DirEnt            tmp = eeFs.files[i_fileId1];
  eeFs.files[i_fileId1] = eeFs.files[i_fileId2];
  eeFs.files[i_fileId2] = tmp;
#endif

Upstream bug report should be: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52415

Note You need to log in before you can comment on or make changes to this bug.