Bug 688645 - delay's bug
Summary: delay's bug
Alias: None
Product: Fedora
Classification: Fedora
Component: avr-binutils
Version: 14
Hardware: Unspecified
OS: Linux
Target Milestone: ---
Assignee: Thibault North
QA Contact: Fedora Extras Quality Assurance
: 734855 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2011-03-17 15:58 UTC by Peque
Modified: 2012-04-05 08:15 UTC (History)
8 users (show)

Fixed In Version: avr-binutils-2.20-2.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-11-23 00:56:35 UTC
Type: ---

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

Description Peque 2011-03-17 15:58:37 UTC
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):

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 15:05:27 UTC

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


Comment 2 M. Hamzah Khan 2011-05-25 21:34:44 UTC
Has this been fixed yet?

I just ran into this problem too.

Comment 3 Thibault North 2011-05-27 21:54:36 UTC
Not yet. Here is the bug report.

You may have to downgrade :(

Comment 4 Peter Oliver 2011-09-12 22:08:11 UTC
*** Bug 734855 has been marked as a duplicate of this bug. ***

Comment 5 Peque 2011-10-15 18:31:38 UTC
Any news? :-S

Comment 6 Thibault North 2011-10-15 19:46:59 UTC
Please check this bug report:
Maybe the new packages work for you ?

Comment 7 Thibault North 2011-10-15 21:12:51 UTC
Hmm also please try this scratch build:

Does it fix the problem ?

Comment 8 Tom Georgoulias 2011-11-02 22:32:35 UTC
The Blink example sketch does not work on Fedora 16 beta.  Here's the RPM I'm using:

$ rpm -q avr-binutils

Comment 9 Thibault North 2011-11-03 13:18:47 UTC
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 23:10:43 UTC
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 23:11:50 UTC
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-11 01:45:32 UTC
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-11 02:38:09 UTC
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 ?
If it fixes the problem, we may go with that one instead.


Comment 14 Tom Georgoulias 2011-11-11 03:24:13 UTC
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 15:31:00 UTC
avr-binutils-2.20-2.fc16 has been submitted as an update for Fedora 16.

Comment 16 Fedora Update System 2011-11-11 15:31:09 UTC
avr-binutils-2.20-2.fc15 has been submitted as an update for Fedora 15.

Comment 17 Thibault North 2011-11-11 15:32:41 UTC
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 15:48:11 UTC
avr-binutils-2.20-2.fc14 has been submitted as an update for Fedora 14.

Comment 19 Fedora Update System 2011-11-12 03:24:13 UTC
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:
then log in and leave karma (feedback).

Comment 20 Peque 2011-11-14 13:19:40 UTC
Package avr-binutils-2.20 in Fedora 16 fixed the problem :-).

Comment 21 Fedora Update System 2011-11-23 00:56:35 UTC
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-23 01:02:01 UTC
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-23 01:03:11 UTC
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 12:02:07 UTC
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 16:02:51 UTC
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)

Would you mind testing it ? I hope that delay bug will be gone finally.

Comment 26 Thibault North 2012-04-04 16:12:07 UTC
Hmm, of course the last one didn't build...
f-15 build here:
f-16 build (to come)

Comment 27 Michal Hlavinka 2012-04-05 08:15:32 UTC
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));
  DirEnt            tmp = eeFs.files[i_fileId1];
  eeFs.files[i_fileId1] = eeFs.files[i_fileId2];
  eeFs.files[i_fileId2] = tmp;

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.