EmbDev.net

Forum: ARM programming with GCC/GNU tools Want to try out GCC 7 (experimental version) on your ARM microcontroller?


von Freddie C. (freddiechopin)


Rate this post
useful
not useful
If you're very impatient waiting for the full GCC 7.1.0 release 
(expected this month), you can try experimental GCC 7 version with your 
ARM microcontroller right now (;

1
$ arm-none-eabi-gcc --version
2
arm-none-eabi-gcc (bleeding-edge-toolchain) 7.0.1 20170402 (experimental)
3
Copyright (C) 2017 Free Software Foundation, Inc.
4
This is free software; see the source for copying conditions. There is NO
5
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

https://github.com/FreddieChopin/bleeding-edge-toolchain/tree/gcc-7-experimental

The script is able to produce a working toolchain for Linux. It is also 
possible to cross-compile a toolchain for Windows (32-bit or 64-bit) - 
either in Linux or in "Bash on Ubuntu on Windows" (I've heard it can be 
done, but the process is painfully slow - who would expect that? (; ).

I've tested that toolchain briefly and it appears to work fine (;

: Edited by User
von Johann L. (gjlayde)


Rate this post
useful
not useful
According Release Notes:

http://gcc.gnu.org/gcc-7/changes.html

von W.S. (Guest)


Rate this post
useful
not useful
Freddie C. wrote:
> If you're very impatient waiting for the full GCC 7.1.0 release

and what's the benefit?

W.S.

von Freddie C. (freddiechopin)


Rate this post
useful
not useful
The term "benefit" is highly subjective and I wouldn't want to go into a 
debate about who likes what and especially about who dislikes what and 
thinks it it stupid, worthless and useless (; ...

However GCC 7 does promise some interesting things - at least 
interesting for me (; This would be C++17 support, improved LTO and 
better warnings. It obviously fixes some bugs from the previous releases 
and I personally have a strong tendency to bump into these bugs (;

Some people may find the new "-mpure-code" option interesting - it 
allows one to generate a binary which can be used with the most strict 
"proprietary code protection" mechanisms found on some chips, which 
cause some sections of the memory to be "execute only", which means that 
all reads from that section are forbidden. This obviously also includes 
reads of literals by the very same code that is placed in that region, 
so such firmware needs this new special option.

There is also one more thing worth mentioning. This is the first GCC 
version to support ARM microcontrollers without any patching! Previously 
- for all these years - GCC had the multilib config for ARM 
microcontrollers only because the people who produced binaries patched 
the sources to add these multilibs. If you would take a "stock" GCC 
release before version 7, then without patching all you could get is a 
toolchain that produces firmware for ONE_ architecture with _ONE 
configuration of thumb/ARM and ONE FPU configuration. With GCC 7 this 
finally changes - if you examine the script that I posted, you'll notice 
that it performs absolutely no modifications to any package it 
downloads.

But - as I wrote in the first paragraph - all of that is highly 
subjective. If you are perfectly happy about your current toolchain and 
you have absolutely no urge to upgrade it - fine (; Then this topic is 
simply not for you (; But some people really like bleeding-edge 
software. I do and I think I'm not alone <:

von Freddie C. (freddiechopin)


Rate this post
useful
not useful
Stable GCC 7.1.0 was released yesterday, and you can already use it with 
your ARM microcontrollers (;

Components:
- gcc-7.1.0
- newlib-2.5.0.20170421
- binutils-2.28
- gdb-7.12.1
- expat-2.2.0
- gmp-6.1.2
- isl-0.18
- libiconv-1.15 (Windows only)
- mpc-1.0.3
- mpfr-3.1.5
- python-2.7.13 (Windows only)
- zlib-1.2.11

1
$ arm-none-eabi-gcc --version
2
arm-none-eabi-gcc (bleeding-edge-toolchain) 7.1.0
3
Copyright (C) 2017 Free Software Foundation, Inc.
4
This is free software; see the source for copying conditions. There is NO
5
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

You can download Windows binaries (both 32-bit and 64-bit) and the Linux 
script from my personal website - http://www.freddiechopin.info/en > 
Download > Software > bleeding-edge-toolchain

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.