public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/64953] Compiling sourcecode for STM32F103 causes USB errors with some optimization settings
Date: Tue, 10 Feb 2015 18:38:00 -0000	[thread overview]
Message-ID: <bug-64953-4-xTe22Xlw1D@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64953-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64953

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |INVALID

--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You need to compile with -mno-unaligned-access when compiling the firmware.
This is mentioned in https://gcc.gnu.org/gcc-4.7/changes.html:
On ARM, when compiling for ARMv6 (but not ARMv6-M), ARMv7-A, ARMv7-R, or
ARMv7-M, the new option -munaligned-access is active by default, which for some
sources generates code that accesses memory on unaligned addresses. This
requires the kernel of those systems to enable such accesses (controlled by
CP15 register c1, refer to ARM documentation). Alternatively, or for
compatibility with kernels where unaligned accesses are not supported, all code
has to be compiled with -mno-unaligned-access. Upstream Linux kernel releases
have automatically and unconditionally supported unaligned accesses as emitted
by GCC due to this option being active since version 2.6.28.


  parent reply	other threads:[~2015-02-10 18:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 19:30 [Bug c/64953] New: " manuel.reimer at gmx dot de
2015-02-05 19:34 ` [Bug c/64953] " manuel.reimer at gmx dot de
2015-02-05 19:44 ` [Bug target/64953] " trippels at gcc dot gnu.org
2015-02-06 17:59 ` manuel.reimer at gmx dot de
2015-02-06 18:23 ` trippels at gcc dot gnu.org
2015-02-06 18:27 ` manuel.reimer at gmx dot de
2015-02-06 18:28 ` manuel.reimer at gmx dot de
2015-02-08 21:23 ` manuel.reimer at gmx dot de
2015-02-08 21:33 ` trippels at gcc dot gnu.org
2015-02-08 21:45 ` manuel.reimer at gmx dot de
2015-02-09  5:51 ` trippels at gcc dot gnu.org
2015-02-10 11:41 ` rearnsha at gcc dot gnu.org
2015-02-10 16:17 ` manuel.reimer at gmx dot de
2015-02-10 16:52 ` rearnsha at gcc dot gnu.org
2015-02-10 17:17 ` manuel.reimer at gmx dot de
2015-02-10 17:23 ` manuel.reimer at gmx dot de
2015-02-10 18:38 ` pinskia at gcc dot gnu.org [this message]
2015-02-10 19:44 ` manuel.reimer at gmx dot de
2015-02-13  8:34 ` maltsevm at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-64953-4-xTe22Xlw1D@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).