- Обзор «вспомогательных» утилит из GCC toolchain. Часть 1.
- GNU Arm Embedded Toolchain Downloads
- GNU Arm Embedded Toolchain
- Version 10-2020-q4-major
- What’s new in 10-2020-q4-major
- In this release:
- Features:
- Known changes and issues:
- Release Note for GNU Arm Embedded Toolchain 10-2020-q4-major
- What’s new in 9-2020-q2-update
- In this release
- Features:
- Known Changes and Issues:
- Release Note for GNU Arm Embedded Toolchain 9-2020-q2-update
- What’s new in 10-2020-q2-preview
- In this release
- Features:
- Known Changes and Issues:
- Release Note for GNU Arm Embedded Toolchain 10-2020-q2-preview
Обзор «вспомогательных» утилит из GCC toolchain. Часть 1.
Думаю каждый, кто использует GCC, знает, что представляет из себя GCC toolchain. В данный комплект, помимо собственно компиляторов и линкера, входит ряд «вспомогательных» утилит из пакета GNU binutils. Эти утилиты отлично описаны в контексте применения в UNIX системах. А вот о «тонкостях» применения этих утилит при корос-компиляции под МК — информации немного. Предлагаю восполнить данный пробел.
Прежде всего, давайте вспомним, как выглядит «типичная» сборка GCC toolchain. Для примера возьмем yagarto (хотя в данном случае это не принципиально). Вот содержание каталога bin:
«arm-none-eabi-» — это префикс, который позволяет отличить один установленный набор утилит для корос-компиляции от другого. На одном ПК может быть установлено несколько разных toolchain’ов под разные платформы и чтобы избежать конфликта имен (и не играться с переопределением PATH) все инструменты toolchain’a принято называть с определенного префикса. Например, в WINAVR название всех утилит начинается с «avr-» либо с «avr32-» (для семейств AVR и AVR32 соответственно).
Инструменты, предназначенные непосредственно для генерации кода (as, gcc, g++, ld), мы трогать не будем – это тема для отдельных статей. Также, пока, опустим отладчик (gdb). Давайте по порядку пройдемся по оставшимся утилитам.
addr2line
Как следует из названия, данная утилита позволяет получить номер сроки в С файле по абсолютному адресу в коде. На входе утилита принимает имя ELF-файла и абсолютный адрес.
arm-none-eabi-addr2line.exe -e LcdTest.elf 0x08001400
Теперь мы знаем, что по адресу 0x08001400 в нашей прошивке содержится код, полученный при компиляции строки 666 файла system_stm32f10x.c.
Практическая полезность данной утилиты (IMHO) сомнительна. Для того чтобы утилита работала ELF файл должен содержать отладочную информацию (опция –g в GCC).
Данная утилита предназначена для создания статических библиотек (*.а). На самом деле, статическая библиотека – это просто архив из объектных файлов (*.о). Соответственно, «ar» в названии утилиты – сокращение от archiver.
Например, мы хотим создать библиотеку с набором функций реализованных в файлах LED.c Font.c. Сначала компилируем эти файлы и получаем объектные файлы LED.o Font.o соответственно.
Теперь вызываем утилиту ar с ключом «q» (q – быстрое добавление в архив).
arm-none-eabi-ar.exe q liblcd.a Font.o LCD.o
liblcd.a – это имя библиотеки, которую мы хотим создать. Если библиотека с таким именем уже существует – то Font.o LCD.o будут добавлены в существующую библиотеку. В противном случае – будет создана новая библиотека.
Теперь можно подключить библиотеку к проекту, указав линкеру опцию –llcd.
Здесь следует обратить внимание, что отцы основатели (K&R) заложили следующую логику: имя библиотеки всегда начинается с префикса «lib», а в параметры линкера передается название библиотеки БЕЗ префикса и расширения. Вот такая «фича».
Рассмотрим еще несколько полезных ключей данной утилиты.
Ключ «t» позволяет просмотреть содержание архива (библиотеки):
arm-none-eabi-ar.exe t liblcd.a
Ключ «x» позволяет распаковать архив – извлечь объектные файлы из библиотеки.
arm-none-eabi-ar.exe x liblcd.a
Иногда это полезно при изучении сторонних библиотек.
На практике, в программировании под МК, библиотеки обычно распространяются в исходниках, которые программист просто включает в свой проект. Однако статические библиотеки иногда полезны. Например, таким образом можно спрятать свой «быдлокод» 🙂
c++filt
Утилита предназначена для декодирования имен С++ методов. Дело в том, что в С++ допускается «перегрузка» методов класса. В одном классе могут быть несколько методов с одинаковым именем (но они должны отличаться числом/типом принимаемых аргументов). При создании объектного файла компилятор кодирует имена методов определенным образом, в результате закодированные имена становятся уникальными (не повторятся в пределах объектного файла), но теряется «читабельность» имен. Вот утилита c++filt и позволяет декодировать такие имена.
Например, мы видим, что объектный файл содержит символ (метод/функцию) «getCount__7AverageFv». Вызываем c++filt и передаем ей на вход этот «шифр».
Все просто и понятно 🙂
elfedit
Утилита позволяет модифицировать некоторые поля в заголовке ELF файла. В нашем контексте – вещь абсолютно бесполезная.
gcov и gprof
Утилиты предназначены для анализа выполнения кода в рантайме. Другими словами – profiler.
Сразу скажу – во всех известных мне toolchain’ах эта, безусловно полезная, вещь не работает 🙁
Идея в следующем – мы компилируем нашу программу с опцией компилятора «-pg».
При этом компилятор генерирует дополнительный код при входе в каждую функцию. Этот код обирает статистику вызовов по каждой функции (сколько раз вызывалась функция, суммарное время выполнения функции).
Далее мы запускаем нашу программу, и вся статистика выгружается в специальный файл. Полученный файл мы скармливаем gprof и получаем детальный отчет по каждой функции – сколько раз она вызывалась, сколько времени выполнялась и т. д.
Например, из отчета следует, что функция А() выполнялась 90% времени от общего времени выполнения программы. Ура! Вот он кандидат для оптимизации №1! Вообще, profiler – очень полезная вещь при оптимизации.
Но, как уже было сказано, вся эта красота в нашем применении не работает. Компилятор просто не генерирует тот самый дополнительный код для сбора статистики. В этом я убедился, дизассемблируя код собранный с опцией «-pg». Об этом также пишут на форумах.
UPD: После комментария grand1987 решил еще раз все перепроверить. Оказалось компилятор (по крайней мере из yagarto ) генерирует дополнительный код (вставляет вызовы __gnu_mcount_nc() в начале каждой функции).
Попробую написать реализацию __gnu_mcount_nc() и собрать статистику.
Огромное спасибо grand1987, и извиняюсь за то, что ввел читателей в заблуждение.
Утилита для анализа объектных файлов.
Сразу рассмотрим пример с ключом «-S» (S – показать размер для каждого символа):
arm-none-eabi-nm.exe -S LCD.o
00000000 00000016 t ClrCS
00000000 00000016 t ClrRS
00000000 00000016 t ClrReset
00000000 00000016 t ClrWR
U GPIO_Init
U GPIO_ResetBits
U GPIO_SetBits
U GPIO_WriteBit
00000000 00000052 T LCD_Clear
00000000 0000004e t LCD_Delay
00000000 000000ba T LCD_DrawChar
00000000 00000158 T LCD_DrawCircle
00000000 000000d4 T LCD_DrawLine
00000000 0000003e T LCD_DrawStr
00000000 000003be T LCD_Init
00000000 00000056 t LCD_PortOutDir
00000000 0000006a t LCD_PortWrite
00000000 0000002e t LCD_SetCursor
00000000 0000002a T LCD_SetLine
00000000 00000032 T LCD_SetPoint
00000000 00000026 t LCD_WriteData
00000000 00000026 t LCD_WriteIndex
00000000 0000001a T LCD_WriteLine
00000000 00000026 t LCD_WriteReg
U RCC_APB2PeriphClockCmd
00000000 00000016 t SetRD
00000000 00000016 t SetRS
00000000 00000016 t SetReset
00000000 00000016 t SetWR
Мы видим все символы содержащиеся в данном объектном фале. Во второй колоне показан размер символа (переменной или функции) в HEX, далее идет тип символа (t – «text», функция НЕ экспортируемая из файла, static-функция; T – «text», функция экспортируемая из файла; U – внешя зависимость), далее идет собственно имя символа.
Например: 00000000 00000016 t ClrCS означает, что в данном обектном файле содержится не експортируемая (недоступная извне) функция с именем ClrCS, реализация функция занимает 16 HEX = 22 байта.
Данная утилита вполне юзабельна, более детально ознакомится с возможностями утилиты можно здесь.
В следующей статье мы рассмотрим оставшиеся утилиты из набора.
GNU Arm Embedded Toolchain Downloads
The GNU Arm Embedded Toolchain is a ready-to-use, open-source suite of tools for C, C++ and assembly programming. The GNU Arm Embedded Toolchain targets the 32-bit Arm Cortex-A, Arm Cortex-M, and Arm Cortex-R processor families. The GNU Arm Embedded Toolchain includes the GNU Compiler (GCC) and is available free of charge directly from Arm for embedded software development on Windows, Linux, and Mac OS X operating systems.
Follow the links on this page to download the right version for your development environment.
See the downloaded package readme.txt file for full installation instructions. For the Linux, Mac, and source packages, readme.txt is in the share/doc/gcc-arm-none-eabi folder. For Windows packages, readme.txt is in the top-level folder
Recent releases are available on this page. You can download older releases from Launchpad, and view a timeline of older releases on Launchpad.
GNU Arm Embedded Toolchain
Version 10-2020-q4-major
Released: December 11, 2020
What’s new in 10-2020-q4-major
In this release:
- gcc-arm-none-eabi-10-2020-q4-major-win32.exe Windows 32-bit Installer (Signed for Windows 10 and later) (Formerly SHA2 signed binary) MD5: 41e9514904a1ee43d4f7882b47bc0294
- gcc-arm-none-eabi-10-2020-q4-major-win32.zip Windows 32-bit ZIP package MD5: 5ee6542a2af847934177bc8fa1294c0d
- gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 Linux x86_64 Tarball MD5: 8312c4c91799885f222f663fc81f9a31
- gcc-arm-none-eabi-10-2020-q4-major-aarch64-linux.tar.bz2 Linux AArch64 Tarball MD5: 1c3b8944c026d50362eef1f01f329a8e
- gcc-arm-none-eabi-10-2020-q4-major-mac.tar.bz2 Mac OS X 64-bit Tarball MD5: e588d21be5a0cc9caa60938d2422b058
- gcc-arm-none-eabi-10-2020-q4-major-mac.pkg Mac OS X 64-bit Package (Signed and notarized) MD5: 2682bbf49f1ff87cd0eda9364090b460
- gcc-arm-none-eabi-10-2020-q4-major-src.tar.bz2 Source Tarball MD5: 0cc79529934703e16ec25a8915028897
Features:
Known changes and issues:
- Doing IPA on CMSE generates a linker error:
The linker will error out when resulting object file contains a symbol for the clone function with the __acle_se prefix that has a non-local binding. Issue occurs when compiling binaries for M-profile Secure Extensions where the compiler may decide to clone a function with the cmse_nonsecure_entry attribute. Although cloning nonsecure entry functions is legal, as long as the clone is only used inside the secure application, the clone function itself should not be seen as a secure entry point and so it should not have the __acle_se prefix. A possible workaround for this is to add a ‘noclone’ attribute to functions with the ‘cmse_nonsecure_entry’. This will prevent GCC from cloning such functions. - GCC can hang or crash if the input source code uses MVE Intrinsics polymorphic variants in a nested form. The depth of nesting that triggers this issue might vary depending on the host machine. This behaviour is observed when nesting 7 times or more on a high-end workstation. On less powerful machines, this behaviour might be observed with fewer levels of nesting. This issue is reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91937
Release Note for GNU Arm Embedded Toolchain 10-2020-q4-major
GNU Arm Embedded Toolchain 10-2020-q4-major
This release includes bare metal pre-built binaries for AArch32 EABI targets,
which can be hosted on:
* Windows 10 or later on IA-32 or x86_64
* Linux
— on AArch64 (RHEL 7, Ubuntu 14.04 or later)
— on x86_64 (RHEL 7, Ubuntu 16.04 or later)
* Mac OS X 10.14 or later on x86_64
For Windows, the binaries are provided with an installer and as a zip file.
For Linux, the binaries are provided as tarball files.
For Mac OS X, the binaries are provided as tarball and pkg files.
The release also contains source code package (together with build scripts and
instructions to setup the build environment), which is composed of:
* gcc : refs/vendors/ARM/heads/arm-10
git://gcc.gnu.org/git/gcc.git commit 3b91aab15443ee150b2ba314a4b26645ce8d713b
* binutils : binutils-2_35-branch
git://sourceware.org/git/binutils-gdb.git commit d9a444bca66bf4b0d328acb547ca114081f3fd87
* newlib and newlib-nano : newlib-3.3.0
git://sourceware.org/git/newlib-cygwin.git commit 6d79e0a58866548f435527798fbd4a6849d05bc7
* gdb : gdb-10-branch
git://sourceware.org/git/binutils-gdb.git commit f3fb4a77f29a99ffa2e1460dfa652081cdbd38be
Note that some or all of the following prerequisites are downloaded when
building from source:
* EnvVarUpdate NSIS script :
http://nsis.sourceforge.net/mediawiki/images/a/ad/EnvVarUpdate.7z
* expat 2.1.1 :
https://downloads.sourceforge.net/project/expat/expat/2.1.1/expat-2.1.1.tar.bz2
* gmp 6.1.0 :
https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2
* isl 0.18 :
http://isl.gforge.inria.fr/isl-0.18.tar.xz
* libelf 0.8.13 :
https://fossies.org/linux/misc/old/libelf-0.8.13.tar.gz
* libiconv 1.15 :
https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz
* mpc 1.0.3 :
ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
* mpfr 3.1.4 :
http://www.mpfr.org/mpfr-3.1.4/mpfr-3.1.4.tar.bz2
* python 2.7.7 :
https://www.python.org/ftp/python/2.7.7/python-2.7.7.msi
* zlib 1.2.8 :
http://www.zlib.net/fossils/zlib-1.2.8.tar.gz
Features:
* All GCC 10.2 features
Tests:
* Targets:
+ Variety of Cortex-M0/M0+/M3/M4/M7/A9 boards
+ Qemu
+ Arm Fast Models
Notable changes in 2020-q4-major release:
* Added support for:
+ M-profile Vector Extension (MVE) assembler and intrinsics
+ Custom Datapath Extension (CDE)
+ Cortex-M55
* Fixed issue where load or store of __fp16 type together with MVE
might generate invalid code.
* Fixed issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91816
where the compiler was generating a conditional branch in Thumb2,
which was too far for b
* Fixed internal errors in arm and aarch64 GAS when assembling code
that attempts a negative .org.
* Fixed issue https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96191
where the -fstack-protector option was leaving the canary value
in a temporary register on return from the function.
Known issues:
* Doing IPA on CMSE generates a linker error:
The linker will error out when resulting object file contains a symbol for
the clone function with the __acle_se prefix that has a non-local binding.
Issue occurs when compiling binaries for M-profile Secure Extensions where
the compiler may decide to clone a function with the cmse_nonsecure_entry
attribute.
Although cloning nonsecure entry functions is legal, as long as the clone
is only used inside the secure application, the clone function itself should
not be seen as a secure entry point and so it should not have the __acle_se
prefix.
A possible workaround for this is to add a ‘noclone’ attribute to
functions with the ‘cmse_nonsecure_entry’. This will prevent GCC from cloning
such functions.
* GCC can hang or crash if the input source code uses MVE Intrinsics polymorphic variants in a nested form. The depth of nesting that triggers this issue might vary depending on the host machine. This behaviour is observed when nesting 7 times or more on a high-end workstation. On less powerful machines, this behaviour might be observed with fewer levels of nesting. This issue is reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91937
What’s new in 9-2020-q2-update
In this release
- gcc-arm-none-eabi-9-2020-q2-update-win32.exe Windows 32-bit Installer (Signed for Windows 10 and later) (Formerly SHA2 signed binary) MD5: 62d2b385da1550d431c9148c6e06bd44
- gcc-arm-none-eabi-9-2020-q2-update-win32.zip Windows 32-bit ZIP package MD5: 184b3397414485f224e7ba950989aab6
- gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 Linux x86_64 Tarball MD5: 2b9eeccc33470f9d3cda26983b9d2dc6
- gcc-arm-none-eabi-9-2020-q2-update-aarch64-linux.tar.bz2 Linux AArch64 Tarball MD5: 000b0888cbe7b171e2225b29be1c327c
- gcc-arm-none-eabi-9-2020-q2-update-mac.tar.bz2 Mac OS X 64-bit Tarball MD5: 75a171beac35453fd2f0f48b3cb239c3
- gcc-arm-none-eabi-9-2020-q2-update-mac.pkg Mac OS X 64-bit Package (Signed and notarized) MD5: 53c2f70d57fbdd7b2caeeeb66659f361
- gcc-arm-none-eabi-9-2020-q2-update-src.tar.bz2 Source Tarball MD5: 50729355f3fa20d4dc26ef41b85acf69
Features:
- All GCC 9.3.1 features, plus latest mainline features.
Known Changes and Issues:
- Doing IPA on CMSE generates a linker error:
The linker will error out when resulting object file contains a symbol for the clone function with the __acle_se prefix that has a non-local binding. Issue occurs when compiling binaries for M-profile Secure Extensions where the compiler may decide to clone a function with the cmse_nonsecure_entry attribute. Although cloning nonsecure entry functions is legal, as long as the clone is only used inside the secure application, the clone function itself should not be seen as a secure entry point and so it should not have the __acle_se prefix. A possible work around for this is to add a ‘noclone’ attribute to functions with the ‘cmse_nonsecure_entry’. This will prevent GCC from cloning such functions.
Release Note for GNU Arm Embedded Toolchain 9-2020-q2-update
This release includes bare metal pre-built binaries for AArch32 EABI targets,
which can be hosted on:
* Windows 10 or later on 32/64-bit architecture
* Linux
— on AArch64 (RHEL 7, Ubuntu 14.04 or later)
— on x86_64 (RHEL 7, Ubuntu 16.04 or later)
* Mac OS X 10.14 or later on 64-bit architecture
For Windows, the binaries are provided with an installer and as a zip file.
For Linux, the binaries are provided as tarball files.
For Mac OS X, the binaries are provided as tarball and pkg files.
The release also contains source code package (together with build scripts and
instructions to setup the build environment), which is composed of:
* gcc : refs/vendors/ARM/heads/arm-9-branch
git://gcc.gnu.org/git/gcc.git commit 13861a80750d118fbdca6006ab175903bacbb7ec
* binutils : binutils-2_34-branch
git://sourceware.org/git/binutils-gdb.git commit f75c52135257ea05da151a508d99fbaee1bb9dc1
* newlib and newlib-nano : newlib-3.3.0
git://sourceware.org/git/newlib-cygwin.git commit 6d79e0a58866548f435527798fbd4a6849d05bc7
* gdb : gdb-8.3-branch
git://sourceware.org/git/binutils-gdb.git commit fc94da0a253e925166bbb1a429c190200dc5778d
Note that some or all of the following prerequisites are downloaded when
building from source:
* EnvVarUpdate NSIS script :
http://nsis.sourceforge.net/mediawiki/images/a/ad/EnvVarUpdate.7z
* expat 2.1.1 :
https://downloads.sourceforge.net/project/expat/expat/2.1.1/expat-2.1.1.tar.bz2
* gmp 6.1.0 :
https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2
* isl 0.18 :
http://isl.gforge.inria.fr/isl-0.18.tar.xz
* libelf 0.8.13 :
https://fossies.org/linux/misc/old/libelf-0.8.13.tar.gz
* libiconv 1.15 :
https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz
* mpc 1.0.3 :
ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
* mpfr 3.1.4 :
http://www.mpfr.org/mpfr-3.1.4/mpfr-3.1.4.tar.bz2
* python 2.7.7 :
https://www.python.org/ftp/python/2.7.7/python-2.7.7.msi
* zlib 1.2.8 :
http://www.zlib.net/fossils/zlib-1.2.8.tar.gz
Features:
* All GCC 9.3.1 features, plus latest mainline features
Tests:
* Targets:
+ Variety of Cortex-M0/M0+/M3/M4/M7/A9 boards
+ Qemu
+ Arm Fast Models
Notable changes in 2020-q2-update release:
* Bumped binutils to version 2.34.
* Bumped newlib to version 3.3.0.
* Fixed https://bugs.launchpad.net/gcc-arm-embedded/+bug/1848002
Parallel builds fail on Windows due to bug in MinGW-w64 used to build binutils.
* Fixed https://community.arm.com/developer/tools-software/tools/f/arm-compilers-forum/46294/macos-objdump-reading-section-bss-failed-because-memory-exhausted
objdump: Reading section .bss failed because: memory exhausted.
* Fixed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93188
Fix rmprofile multilibs when architecture includes +mp or +sec.
* Fixed https://bugs.launchpad.net/gcc-arm-embedded/+bug/1415310
Extend the —skip_steps to enable skipping the target library strip step.
* Additional v7-a multilib directories:
thumb/v7-a+fp/softfp
thumb/v7-a+fp/hard
thumb/v7-a+simd/softfp
thumb/v7-a+simd/hard
thumb/v7-a/nofp
* Additional v7ve multilib directories:
thumb/v7ve+simd/softfp
thumb/v7ve+simd/hard
* Additional v8-a multilib directories:
thumb/v8-a/nofp
thumb/v8-a+simd/softfp
thumb/v8-a+simd/hard
Known issues:
* Doing IPA on CMSE generates a linker error:
The linker will error out when resulting object file contains a symbol for
the clone function with the __acle_se prefix that has a non-local binding.
Issue occurs when compiling binaries for M-profile Secure Extensions where
the compiler may decide to clone a function with the cmse_nonsecure_entry
attribute.
Although cloning nonsecure entry functions is legal, as long as the clone
is only used inside the secure application, the clone function itself should
not be seen as a secure entry point and so it should not have the __acle_se
prefix.
A possible work around for this is to add a ‘noclone’ attribute to
functions with the ‘cmse_nonsecure_entry’. This will prevent GCC from cloning
such functions.
What’s new in 10-2020-q2-preview
In this release
- gcc-arm-none-eabi-10-2020-q2-preview-win32.exe Windows 32-bit Installer (Signed for Windows 10 and later) (Formerly SHA2 signed binary) MD5: a05d4ca196d5d3a2e4e6d34e0b1cdbfb
- gcc-arm-none-eabi-10-2020-q2-preview-win32.zip Windows 32-bit ZIP package MD5: 61df33ef4b9b0469a6ad54f95d8992b9
- gcc-arm-none-eabi-10-2020-q2-preview-x86_64-linux.tar.bz2 Linux x86_64 Tarball MD5: 2d19775c5aa091b7f55a68727c5d7d76
- gcc-arm-none-eabi-10-2020-q2-preview-aarch64-linux.tar.bz2 Linux AArch64 Tarball MD5: 4427a44c1012213b0f89e19457809c1d
- gcc-arm-none-eabi-10-2020-q2-preview-mac.tar.bz2 Mac OS X 64-bit Tarball MD5: 3a33028d2db63b3b8393f392dbc88b5f
- gcc-arm-none-eabi-10-2020-q2-preview-mac.pkg Mac OS X 64-bit Package (Signed and notarized) MD5: 8f19aa682a3b979e3ca3b2c3dd7e1150
- gcc-arm-none-eabi-10-2020-q2-preview-src.tar.bz2 Source Tarball MD5: bb61ada842400ef3d2e41d685012348a
Features:
Known Changes and Issues:
- Doing IPA on CMSE generates a linker error:
The linker will error out when resulting object file contains a symbol for the clone function with the __acle_se prefix that has a non-local binding. Issue occurs when compiling binaries for M-profile Secure Extensions where the compiler may decide to clone a function with the cmse_nonsecure_entry attribute. Although cloning nonsecure entry functions is legal, as long as the clone is only used inside the secure application, the clone function itself should not be seen as a secure entry point and so it should not have the __acle_se prefix. A possible workaround for this is to add a ‘noclone’ attribute to functions with the ‘cmse_nonsecure_entry’. This will prevent GCC from cloning such functions. - Load or Store of __fp16 type together with MVE might generate invalid code:
If you use __fp16 type together with MVE enabled, then when the compiler needs to generate an instruction to load a Floating-point Extension register (S register) from memory or an instruction to store a Floating-point Extension register (S register) to memory, then the compiler generates the wrong assembly instruction. The wrong assembly instruction is generated by the front-end for any optimization other than -O0. The wrong instruction causes an error during assembly, for example:
«Error: instruction does not support writeback — `vstr.16 s15,[r0]!'»
«Error: instruction does not support writeback — `vldr.16 s15,[r0]!'»
The workaround is to use the -O0 command line option to generate the correct instruction when loading or storing of __fp16 type together with MVE. - Uncompressing the Windows zip file requests permission to overwrite file:
When you decompress the windows zip file, gcc-arm-none-eabi-10-2020-q2-preview-win32.zip, the decompression requests permission to overwrite the file frame-apply.html. This is because the GDB documentation within the folder share/doc/gcc-arm-none-eabi/html/gdb contains files that are named frame-apply.html and Frame-Apply.html, which are treated as identical names on a Windows host.
You can choose to overwrite the file frame-apply.html with Frame-Apply.html. If you decompress the zip file using a command-line tool, you can use a command-line option to automatically overwrite the file, for example by using the -y command-line option with 7zip. - Readme.txt links to version 9.3 of the GCC online docs:
Readme.txt contains the following links to version 9.3 of the GCC online docs:
https://gcc.gnu.org/onlinedocs/gcc-9.3.0/gcc/ARM-Options.html#index-mcpu-2
https://gcc.gnu.org/onlinedocs/gcc-9.3.0/gcc/ARM-Options.html#index-mfloat-abi
The correct links to version 10.1 of the GCC online docs are:
https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/ARM-Options.html#index-mcpu-2
https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/ARM-Options.html#index-mfloat-abi
Release Note for GNU Arm Embedded Toolchain 10-2020-q2-preview
GNU Arm Embedded Toolchain 2020-q2-preview
This is a preview release for M-profile Vector Extension (MVE) and
Custom Datapath Extension (CDE) features, and is not a production release.
For a production quality toolchain, use the GNU Arm Embedded Toolchain
9-2020-q2-update release.
This release includes bare metal pre-built binaries for AArch32 EABI targets,
which can be hosted on:
* Windows 10 or later on 32/64-bit architecture
* Linux
— on AArch64 (RHEL 7, Ubuntu 14.04 or later)
— on x86_64 (RHEL 7, Ubuntu 16.04 or later)
* Mac OS X 10.14 or later on 64-bit architecture
For Windows, the binaries are provided with an installer and as a zip file.
For Linux, the binaries are provided as tarball files.
For Mac OS X, the binaries are provided as tarball and pkg files.
The release also contains source code package (together with build scripts and
instructions to setup the build environment), which is composed of:
* gcc : refs/vendors/ARM/heads/arm-10
git://gcc.gnu.org/git/gcc.git commit 58ae4fa0f1563eacac56291c00c876e6594f9925
* binutils : master
git://sourceware.org/git/binutils-gdb.git commit cceb53b8849bc76f522931890b585b41e6662fa5
* newlib and newlib-nano : newlib-3.3.0
git://sourceware.org/git/newlib-cygwin.git commit 6d79e0a58866548f435527798fbd4a6849d05bc7
* gdb : master
git://sourceware.org/git/binutils-gdb.git commit cceb53b8849bc76f522931890b585b41e6662fa5
Note that some or all of the following prerequisites are downloaded when
building from source:
* EnvVarUpdate NSIS script :
http://nsis.sourceforge.net/mediawiki/images/a/ad/EnvVarUpdate.7z
* expat 2.1.1 :
https://downloads.sourceforge.net/project/expat/expat/2.1.1/expat-2.1.1.tar.bz2
* gmp 6.1.0 :
https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2
* isl 0.18 :
http://isl.gforge.inria.fr/isl-0.18.tar.xz
* libelf 0.8.13 :
https://fossies.org/linux/misc/old/libelf-0.8.13.tar.gz
* libiconv 1.15 :
https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz
* mpc 1.0.3 :
ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
* mpfr 3.1.4 :
http://www.mpfr.org/mpfr-3.1.4/mpfr-3.1.4.tar.bz2
* python 2.7.7 :
https://www.python.org/ftp/python/2.7.7/python-2.7.7.msi
* zlib 1.2.8 :
http://www.zlib.net/fossils/zlib-1.2.8.tar.gz
Features:
* All GCC 10.1 features
Tests:
* Targets:
+ Variety of Cortex-M0/M0+/M3/M4/M7/A9 boards
+ Qemu
+ Arm Fast Models
Notable changes in 2020-q2-preview release:
* Added support for:
+ M-profile Vector Extension (MVE) assembler and intrinsics
+ Custom Datapath Extension (CDE)
+ Cortex-M55
Known issues:
* Doing IPA on CMSE generates a linker error:
The linker will error out when resulting object file contains a symbol for
the clone function with the __acle_se prefix that has a non-local binding.
Issue occurs when compiling binaries for M-profile Secure Extensions where
the compiler may decide to clone a function with the cmse_nonsecure_entry
attribute.
Although cloning nonsecure entry functions is legal, as long as the clone
is only used inside the secure application, the clone function itself should
not be seen as a secure entry point and so it should not have the __acle_se
prefix.
A possible workaround for this is to add a ‘noclone’ attribute to
functions with the ‘cmse_nonsecure_entry’. This will prevent GCC from cloning
such functions.
* Load or Store of __fp16 type together with MVE might generate invalid code:
If you use __fp16 type together with MVE enabled, then when the compiler needs
to generate an instruction to load a Floating-point Extension register
(S register) from memory or an instruction to store a Floating-point Extension
register (S register) to memory, then the compiler generates the wrong assembly
instruction.
The wrong assembly instruction is generated by the front-end for any
optimization other than -O0. The wrong instruction causes an error during
assembly, for example:
«Error: instruction does not support writeback — `vstr.16 s15,[r0]!'»
«Error: instruction does not support writeback — `vldr.16 s15,[r0]!'»
The workaround is to use the -O0 command line option to generate the correct
instruction when loading or storing of __fp16 type together with MVE.