How to make new xPack GNU Arm Embedded GCC releases
This page is intended for those who maintain the xPack GNU Arm Embedded GCC project and documents how to make new releases.
Prerequisites
The build scripts run on GNU/Linux and macOS. The Windows binaries are compiled on x64 GNU/Linux, using mingw-w64.
For details on installing the prerequisites, please read the XBB prerequisites page.
Get project sources
The project is hosted on GitHub:
To clone the stable branch (xpack
), run the following commands in a
terminal (on Windows use the Git Bash console):
rm -rf ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git && \
git clone https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack.git \
~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git
For development purposes, clone the xpack-development
branch:
rm -rf ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git && \
mkdir -p ~/Work/xpack-dev-tools && \
git clone \
--branch xpack-development \
https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack.git \
~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git
Or, if the repo was already cloned:
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull
Get the writable helper sources
The project has a dependency to a common helper, that is
normally installed as a read-only dependency; for development
purposes, to be able to make changes to the scripts located inside the helper,
clone the xpack-development
branch and link it to
the user global xPacks store:
rm -rf ~/Work/xpack-dev-tools/xbb-helper-xpack.git && \
mkdir -p ~/Work/xpack-dev-tools && \
git clone \
--branch xpack-development \
https://github.com/xpack-dev-tools/xbb-helper-xpack.git \
~/Work/xpack-dev-tools/xbb-helper-xpack.git && \
xpm link -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git
Or, if the repo was already cloned:
git -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git pull
xpm link -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git
Other repositories in use are:
- https://github.com/xpack-dev-tools/binutils-gdb - for the binutils & gdb sources
- git://sourceware.org/git/binutils-gdb.git - a fork of the upstream, with tags added to the commits used by the Arm Toolchain distribution; this allows direct archive downloads instead of git clone.
Release schedule
This distribution generally follows the official Arm GNU Toolchain release schedule (about 2 times per year).
Prepare the new releases
Before starting the build, perform some checks and tweaks.
Download the build scripts
The build scripts are available in the build-assets/scripts
folder of the
xpack-dev-tools/arm-none-eabi-gcc-xpack
Git repo.
To download them on a new machine, clone the xpack-development
branch,
as seen above.
Check Git
In the xpack-dev-tools/arm-none-eabi-gcc-xpack
Git repo:
- switch to the
xpack-development
branch - pull new changes
- if necessary, merge the
website
branch
This is really important, otherwise the next steps will build again the previous release!
The xpack
branch should be unchanged since the previous release
and will be updated when the new release is out.
Update helper & other dependencies
Check the latest versions at https://github.com/xpack-dev-tools/ and
update the dependencies in build-assets/package.json
.
Increase the version and update it in the top package.json
- determine the version (like
13.3.1-1.1
) - update the version in top
package.json
- use the new version, suffixed by
.pre
, like13.3.1-1.1.1.pre
.
Update the customFields
in build-assets/package.json
(if necessary)
If the project uses customFields
in build-assets/package.json
,
update them.
Start the local web server
Execute the npm script clean
then start
in the website sub-project,
or run the following in a terminal:
(cd ~/Work/xpack-dev-tools/xbb-helper-xpack.git/website; npm run clean; npm run start)
Navigate to the Maintainer Info page, the Update the version specific code section.
Increase the version and update VERSION
Determine the version (like 13.3.1-1.1
)
and update the build-assets/scripts/VERSION
file; the format
is 13.3.1-1.1
.
The fourth & fifth numbers are the xPack release number of this version. A sixth number will be added to the version in `package.json` when the package is published to the `npm` server.
Check the latest upstream release
The latest releases must have been announced in Arm GNU Toolchain Downloads. Compare the latest Arm release with the latest xPack release. If necessary, update the triplet, otherwise increase the fourth & fifth numbers, as below.
Update to the latest Arm release
- download the new Source code archive (like
arm-gnu-toolchain-src-snapshot-13.3.rel1.tar.xz
) from Arm GNU Toolchain Downloads - the GCC version is in
gcc/gcc/BASE-VER
- the GDB version is in
binutils-gdb--gdb/gdb/version.in
- the newlib version is in
newlib-cygwin/newlib/configure
, search forVERSION=
- download the latest macOS (x86_64) hosted cross toolchains archive (like
arm-gnu-toolchain-13.3.rel1-darwin-x86_64-arm-none-eabi.tar.xz
) - unpack the archive
- create a folder
build-assets/extras/13.3.rel1
- copy the file with the configurations
(
13.3.rel1-darwin-x86_64-arm-none-eabi-manifest.txt
) to the new folder in extras - download the ABE manifest with the individual source URLs
(
arm-gnu-toolchain-arm-none-eabi-abe-manifest.txt
) - copy to the new folder in extras
Update the customFields
(if necessary)
If the project uses customFields
in build-assets/package.json
- update the release specific properties (if any)
- restart the local web server
Update the version specific code
- open the
build-assets/scripts/versioning.sh
file - add a new
if
with the new version before the existing code
Update local binutils-gdb fork
With a Git client:
- checkout the branch mentioned in the release notes
(like
binutils-2_42-branch
) - push it to origin with the same name
- identify the commit ID (search back in time)
- add a tag like
binutils-2.42-arm-none-eabi-13.3.rel1
- push the tag to origin
- check the tag at https://github.com/xpack-dev-tools/binutils-gdb/tags/
Similarly for GDB:
- checkout the branch mentioned in the release notes
(like
gdb-14-branch
) - identify the commit ID (search back in time)
- add a tag like
gdb-14-arm-none-eabi-13.3.rel1
- push the tag to origin
- check the tag at https://github.com/xpack-dev-tools/binutils-gdb/tags/
Update the local gcc fork (if the commit ID present in manifest.txt)
With a Git client:
- checkout the branch mentioned in the release notes
(like
ARM/arm-13
) - identify the commit ID (filter by branch and search downwards)
- create a branch like
arm-14-arm-none-eabi-13.3.rel1
Update the gdb-*-cross.git.patch in helper
Copy/paste a previous one; adjust if necessary.
Check configure options
Verify if the configure options used in
the arm-gnu-toolchain-arm-none-eabi-abe-manifest.txt
file
are used in the build scripts.
Fix possible open issues
Check GitHub issues and pull requests:
and fix them; assign them to a milestone (like 13.3.1-1.1
).
Update CHANGELOG.md
- open the
CHANGELOG.md
file - check if all previous fixed issues are in
- check the latest commits
xpm run git-log
; if necessary, copy/paste lines, group by dates and edit them using the below regular expressions - add a new entry like * v13.3.1-1.1 prepared
- commit with a message like prepare v13.3.1-1.1
To turn the dates into headings, change from:
([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]) [*]
to:
## $1
*
To remove the rest of the dates, change from:
^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [*]
to:
*
Push the changes to the xpack-development
branch
Be sure that the latest commit that updates VERSION
is pushed
to the xpack-development
branch!
This is really important, otherwise the next steps will build again the previous release!
Run the development builds
The builds currently run on 5 dedicated machines (x64 GNU/Linux, x64 macOS, arm64 macOS, arm64 GNU/Linux, arm GNU/Linux).
Before the real build, run test/development builds on all platforms.
Do a first development run without the multi-libs
It is recommended to do a first development run without the multi-libs.
In the application.sh
file, set:
XBB_APPLICATION_WITHOUT_MULTILIB="y"
Visual Studio Code extension
All actions are defined as xPack actions and can be conveniently triggered via the VS Code graphical interface, using the xPack C/C++ Managed Build Tools extension.
Patches
This project uses the upstream Arm sources, without patches.
Restart the docker daemons
If, for any reasons, the docker builds need to be canceled, it is very likely that some processes will continue to run in the background.
To completely terminate them, and ensure that docker runs from a clean slate, restart the docker daemons on all GNU/Linux machines:
sudo systemctl restart docker
Check if both projects are pushed
Check if both the current project and the helper are
on the xpack-development
branch and the latest
commits are pushed to GitHub.
Build the x64 macOS binaries
For x64 macOS, first run the build on the development machine
(wksi
, a recent macOS):
export XBB_ENVIRONMENT_SKIP_CHECKS="y"
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets/package-lock.json
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
git -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git pull
xpm link -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git
xpm run link-deps -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
xpm run deep-clean --config darwin-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm install --config darwin-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run build-development --config darwin-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
For a debug build:
xpm run build-development-debug --config darwin-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
The build takes about 96 minutes (1h36m), without multi-libs, 295 minutes (4h55m) with multi-libs to complete.
When functional, push the xpack-development
branch to GitHub.
Run the native build on the production machine
(xbbmi
, an older macOS);
start a VS Code remote session, or connect with a terminal:
caffeinate ssh xbbmi
To check the available space:
xpm run check-space -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
To free the space used by all previous builds of all xpack-dev-tools
packages:
xpm run clear-all-project-builds -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
To update the build scripts and build the development binaries:
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets/package-lock.json && \
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull && \
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
git -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git pull && \
xpm link -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git && \
xpm run link-deps -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
\
xpm run deep-clean --config darwin-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm install --config darwin-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run build-development --config darwin-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
About 76 minutes (1h16m) later, 240 minutes (4h00m) with multi-libs, the output of the build script is a compressed
archive and its SHA signature, created in
the buils-assets/build/darwin-x64/deploy
folder:
-
xpack-arm-none-eabi-gcc-13.3.1-1.1-darwin-x64.tar.gz
-
xpack-arm-none-eabi-gcc-13.3.1-1.1-darwin-x64.tar.gz.sha
To update the build scripts and build the release binaries:
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/package-lock.json && \
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull && \
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
\
xpm run deep-clean --config darwin-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm install --config darwin-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run build --config darwin-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
Build the arm64 macOS binaries
Run the native build on the production machine
(xbbma
, an older macOS);
start a VS Code remote session, or connect with a terminal:
caffeinate ssh xbbma
To check the available space:
xpm run check-space -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
To free the space used by all previous builds of all xpack-dev-tools
packages:
xpm run clear-all-project-builds -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
To update the build scripts and build the development binaries:
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets/package-lock.json && \
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull && \
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
git -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git pull && \
xpm link -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git && \
xpm run link-deps -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
\
xpm run deep-clean --config darwin-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm install --config darwin-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run build-development --config darwin-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
About 49 minutes later, 132 minutes (2h12m) with multi-libs, the output of the build script is a compressed
archive and its SHA signature, created in
the buils-assets/build/darwin-arm64/deploy
folder:
-
xpack-arm-none-eabi-gcc-13.3.1-1.1-darwin-arm64.tar.gz
-
xpack-arm-none-eabi-gcc-13.3.1-1.1-darwin-arm64.tar.gz.sha
To update the build scripts and build the release binaries:
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/package-lock.json && \
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull && \
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
\
xpm run deep-clean --config darwin-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm install --config darwin-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run build --config darwin-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
Build the x64 GNU/Linux binaries
Run the docker build on the production machine (xbbli
);
start a VS Code remote session, or connect with a terminal:
caffeinate ssh xbbli
To check the available space:
xpm run check-space -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
To free the space used by all previous builds of all xpack-dev-tools
packages:
xpm run clear-all-project-builds -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
To update the build scripts and build the development binaries:
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets/package-lock.json && \
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull && \
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
git -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git pull && \
xpm link -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git && \
xpm run link-deps -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
\
xpm run deep-clean --config linux-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-prepare --config linux-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-link-deps --config linux-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-build-development --config linux-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
About 51 minutes later, 142 minutes (2h22m) with multi-libs, the output of the build script is a compressed
archive and its SHA signature, created in
the buils-assets/build/linux-x64/deploy
folder:
-
xpack-arm-none-eabi-gcc-13.3.1-1.1-linux-x64.tar.gz
-
xpack-arm-none-eabi-gcc-13.3.1-1.1-linux-x64.tar.gz.sha
To update the build scripts and build the release binaries:
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/package-lock.json && \
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull && \
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
\
xpm run deep-clean --config linux-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-prepare --config linux-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-build-development --config linux-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
Build the x64 Windows binaries
Run the docker build on the production machine (xbbli
);
start a VS Code remote session, or connect with a terminal:
caffeinate ssh xbbli
To check the available space:
xpm run check-space -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
To free the space used by all previous builds of all xpack-dev-tools
packages:
xpm run clear-all-project-builds -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
To update the build scripts and build the development binaries:
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets/package-lock.json && \
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull && \
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
git -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git pull && \
xpm link -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git && \
xpm run link-deps -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
\
xpm run deep-clean --config win32-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-prepare --config win32-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-link-deps --config win32-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-build-development --config win32-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
About 39 minutes later, 134 minutes (2h14m) with multi-libs, the output of the build script is a compressed
archive and its SHA signature, created in
the buils-assets/build/win32-x64/deploy
folder:
-
xpack-arm-none-eabi-gcc-13.3.1-1.1-win32-x64.zip
-
xpack-arm-none-eabi-gcc-13.3.1-1.1-win32-x64.zip.sha
To update the build scripts and build the release binaries:
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/package-lock.json && \
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull && \
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
\
xpm run deep-clean --config win32-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-prepare --config win32-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-build-development --config win32-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
Build the arm64 GNU/Linux binaries
Run the docker build on the production machine (xbbla
);
start a VS Code remote session, or connect with a terminal:
caffeinate ssh xbbla
To check the available space:
xpm run check-space -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
To free the space used by all previous builds of all xpack-dev-tools
packages:
xpm run clear-all-project-builds -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
To update the build scripts and build the development binaries:
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets/package-lock.json && \
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull && \
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
git -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git pull && \
xpm link -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git && \
xpm run link-deps -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
\
xpm run deep-clean --config linux-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-prepare --config linux-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-link-deps --config linux-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-build-development --config linux-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
About 353 minutes (5h53m) later, or 90 minutes (1h30m) on ampere, 239 minutes (3h59m) on ampere with multi-libs, the output of the build script is a compressed
archive and its SHA signature, created in
the buils-assets/build/linux-arm64/deploy
folder:
-
xpack-arm-none-eabi-gcc-13.3.1-1.1-linux-arm64.tar.gz
-
xpack-arm-none-eabi-gcc-13.3.1-1.1-linux-arm64.tar.gz.sha
To update the build scripts and build the release binaries:
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/package-lock.json && \
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull && \
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
\
xpm run deep-clean --config linux-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-prepare --config linux-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-build-development --config linux-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
Build the arm GNU/Linux (32-bit) binaries
Run the docker build on the production machine (xbbla32
);
start a VS Code remote session, or connect with a terminal:
caffeinate ssh xbbla32
To check the available space:
xpm run check-space -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
To free the space used by all previous builds of all xpack-dev-tools
packages:
xpm run clear-all-project-builds -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
To update the build scripts and build the development binaries:
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets/package-lock.json && \
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull && \
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
git -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git pull && \
xpm link -C ~/Work/xpack-dev-tools/xbb-helper-xpack.git && \
xpm run link-deps -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
\
xpm run deep-clean --config linux-arm -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-prepare --config linux-arm -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-link-deps --config linux-arm -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-build-development --config linux-arm -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
About 345 minutes (5h45m) later, the output of the build script is a compressed
archive and its SHA signature, created in
the buils-assets/build/linux-arm/deploy
folder:
-
xpack-arm-none-eabi-gcc-13.3.1-1.1-linux-arm.tar.gz
-
xpack-arm-none-eabi-gcc-13.3.1-1.1-linux-arm.tar.gz.sha
To update the build scripts and build the release binaries:
rm -f ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/package-lock.json && \
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull && \
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
\
xpm run deep-clean --config linux-arm -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-prepare --config linux-arm -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets && \
xpm run docker-build-development --config linux-arm -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
Update the trees in the Install Guide page
Copy the trees displayed at the end of the test builds and paste to Folder hierarchy section in the web file:
website/docs/install/_miscellaneous.mdx
If present, replace the actual version (like 13.3.1-1.1) with the following expression:
${customField('xpackVersion')}
macOS does not have a tree
command; either compile it from
sources, or install it
via HomeBrew, and make a link to /usr/local/bin
.
Update the list of links in top package.json
Copy/paste the full list of links displayed at the end of the build, in sequence, for each platform (Windows, macOS, GNU/Linux), and check the differences compared to the repository.
Commit if necessary.
Update the durations of the development builds
In website/docs/maintainer/_development-durations.mdx
, update
the durations of the builds.
Commit if necessary.
How to build a debug version
In some cases it is necessary to run a debug session with the binaries.
For these cases, the build script accepts the --debug
options.
There are also xPack actions that use this option (build-development-debug
and docker-build-development-debug
).
Files cache
The XBB build scripts use a local cache such that files are downloaded only during the first run, later runs being able to use the cached files.
However, occasionally some servers may not be available, and the builds may fail.
The workaround is to manually download the files from alternate
locations (like
https://github.com/xpack-dev-tools/files-cache/tree/master/libs),
place them in the XBB cache (Work/cache
) and restart the build.
Run the production builds
The automation is provided by GitHub Actions and three self-hosted runners.
Start the self-hosted runners
- on the development machine (
wksi
) open ssh sessions to the build machines (xbbli
,xbbmi
,xbbma
,xbbla
,xbbla32
):
caffeinate ssh xbbli
caffeinate ssh xbbmi
caffeinate ssh xbbma
caffeinate ssh xbbla
caffeinate ssh xbbla32
Create a screen
session, to provide a persistent standard output for
the runners:
screen -S ga
To quit it, use # Ctrl-a Ctrl-d
.
For xbbli
& xbbla
, which have more memory, start two runners:
~/actions-runners/xpack-dev-tools/1/run.sh &
~/actions-runners/xpack-dev-tools/2/run.sh &
On all other machines start a single runner:
~/actions-runners/xpack-dev-tools/run.sh &
To check the status of the runners locally:
ps -a | grep 'Runner.Listener'
To kill them:
killall Runner.Listener
Check the status of the runners
The status of all self-hosted runners is available at the GitHub Runners page.
Publish the helper
Publish a new release of the helper on npmjs.
Update the dependency to the new helper
In build-assets/package.json
, update the reference
to "@xpack-dev-tools/xbb-helper":
(possibly in all xPack projects).
Commit the changes to build-assets/package.json
Use the message build-assets/package.json: bump deps.
Check for disk space
Check if the build machines have enough free space and eventually do some cleanups:
xpm run check-space -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
This is equivalent to running a df
command.
- macOS
- GNU/Linux
df -gH /
df -BG -H /
To free the space used by all previous builds of all xpack-dev-tools
packages:
xpm run clear-all-project-builds -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
This is equivalent to running a wide rm
to remove the build
folders:
rm -rf ~/Work/xpack-dev-tools/*/build-assets/build
Generate the GitHub workflows
Run the generate-workflows xPack action to update the GitHub workflow files.
xpm run generate-workflows -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
Commit and push
- commit with the message Re-generate workflows
- push the
xpack-development
branch to GitHub
Do a first run without the multi-libs
It is recommended to do a first run without the multi-libs
(see the application.sh
file), test it,
and, when ready, rerun the full build (no kidding,
this usually saves time, given that a full build takes
more than half day).
Manually trigger the build GitHub Actions
To trigger the GitHub Actions builds, use the xPack actions:
- trigger-workflow-build-darwin-x64
- trigger-workflow-build-darwin-arm64
- trigger-workflow-build-linux-x64
- trigger-workflow-build-win32-x64
- trigger-workflow-build-linux-arm64
- trigger-workflow-build-linux-arm
xpm run trigger-workflow-build-darwin-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
xpm run trigger-workflow-build-darwin-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
xpm run trigger-workflow-build-linux-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
xpm run trigger-workflow-build-win32-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
xpm run trigger-workflow-build-linux-arm64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
xpm run trigger-workflow-build-linux-arm -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
The scripts behind these actions require the GITHUB_API_DISPATCH_TOKEN
variable to be present
in the environment, and the organization PUBLISH_TOKEN
to be visible in the
Settings → Action →
Secrets
page.
These commands use the xpack-development
branch of this repo.
Durations & resulting binaries
The builds take almost XX hours to complete:
darwin-x64
: 4h24m / 1h21m (nuc)darwin-arm64
: 2h17m / 45m (m1)linux-x64
: 2h42m / 60m (amd)win32-x64
: 2h35m / 53m (amd)linux-arm64
: 14h15m / 5h38m (rpi4)linux-arm
: 13h44m / 5h34m (rpi4)
The workflow results and logs are available from the GitHub Actions page.
Update the values in website/docs/maintainer/_github-actions-durations.mdx
with those shown by GitHub Actions.
The resulting binaries are available for testing from pre-releases/test.
Run the tests
Automated tests
The automation is provided by GitHub Actions.
To trigger the GitHub Actions tests, run the xPack actions:
- trigger-workflow-test-prime
- trigger-workflow-test-docker-linux-x64
- trigger-workflow-test-docker-linux-arm
xpm run trigger-workflow-test-prime -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
xpm run trigger-workflow-test-docker-linux-x64 -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
xpm run trigger-workflow-test-docker-linux-arm -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
The scripts behind these accesible require the GITHUB_API_DISPATCH_TOKEN
variable to be present
in the environment.
These actions use the xpack-development
branch of this repo and the
pre-releases/test
binaries.
The tests results are available from the GitHub Actions page.
After running the prime tests, download the test results and compare with previous runs.
More macOS tests
Since GitHub Actions provides a limited range of versions for the macOS runner, the multi-version macOS tests run on Travis.
To trigger the Travis test, run the trigger-travis-macos xPack action:
xpm run trigger-travis-macos -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
This script requires the TRAVIS_COM_TOKEN
variable to be present
in the environment.
The test results are available from Travis CI.
Manual tests
To download the pre-released archive for the specific platform and run the tests, use:
git -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git pull
xpm run install -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
xpm run test-pre-release -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
For even more tests, on each platform, download the archive from pre-releases/test and check the binaries.
On macOS, remove the com.apple.quarantine
flag:
xattr -cr ${HOME}/Downloads/xpack-*
- check version:
.../arm-none-eabi-13.3.1-1.1/bin/arm-none-eabi-gcc --version
arm-none-eabi-gcc (xPack GNU Arm Embedded GCC x86_64) 13.3.1
- in a separate workspace, Import → General → Existing Projects into Workspace
the Eclipse projects available in the
tests/eclipse
folder of the build repo; more details in the README.md - in Preferences... → MCU, define the Workspace Arm Toolchain path to use
the
Downloads
temporary location - to test the compiler: for all projects (start with
arm-f4b-fs-lib
)- remove all build folders, or Clean all
- build all configs, with the hammer, not with Build all, to be sure errors are not missed
- to test the debugger: for all QEMU debug configurations (start with
arm-f4b-fs-debug-lto-qemu
)- start the QEMU debug session,
- single step a few lines (Step Over)
- start continuous run (Resume)
- halt (Suspend)
- start (Resume)
- stop (Terminate)
- (don't miss the LTO cases, since in the past they had problems)
- to test the Python debugger, start it with
--version
Re-enable multi-lib, build and test again
Once the simple build passed tests, enable multi-lib and rerun:
- comment out
XBB_APPLICATION_WITHOUT_MULTILIB
inapplication.sh
- commit and push the
xpack-development
branch to the repo - go back to Manually trigger the build GitHub Actions, build and test again.
Publish the release
Create a new GitHub pre-release
- in
CHANGELOG.md
, add the release date and a message like * v13.3.1-1.1 released - commit with CHANGELOG update
- check and possibly update the
build-assets/templates/body-github-release-liquid.mdx
- push the
xpack-development
branch to GitHub - run the trigger-workflow-publish-release xPack action:
xpm run trigger-workflow-publish-release -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
The workflow result and logs are available from the GitHub Actions page.
The result is a draft pre-release tagged like v13.3.1-1.1 (mind the dash in the middle!) and named like xPack GNU Arm Embedded GCC v13.3.1-1.1 (mind the dash), with all binaries attached.
- edit the draft and be sure it is attached to the
xpack-development
branch (important!) - perform the final edits (maintenance vs. new release) and check if everything is fine
- keep the pre-release button enabled
- do not enable Discussions yet
- click the Publish release button
Note: at this moment the system should send a notification to all clients watching this project.
Prepare a new blog post
- check and possibly update the
website/blog/_templates/blog-post-release-part-[12]-liquid.md
- run the generate-website-blog-post xPack action;
this will add a file in the
website/blog
folder:
xpm run generate-website-blog-post -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
- edit the front matter properties
- select the correct summary
- commit with blog post release 13.3.1-1.1 published
Update the web install page
- check and possibly update the output of the
--version
runs inwebsite/docs/install/_automatic-install-quick-test.mdx
website/docs/install/_manual-install-quick-test.mdx
- commit changes
Check the list of links in top package.json
- open the
package.json
file - check if the links in the
bin
property cover the actual binaries - if necessary, also check on Windows
Update the package.json list of binaries
- select the
xpack-development
branch - be sure that the binaries were attached to the pre-release
- run the update-package-binaries xPack action:
xpm run update-package-binaries -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
- open the top
package.json
file - check the
baseUrl:
it should match the file URLs (including the tag/version); no terminating/
is required - from the release, check the SHA & file names
- compare the SHA sums with those shown by
cat *.sha
- check the executable names
- commit all changes, use a message like package.json: update urls for 13.3.1-1.1.1 release
Publish on the npmjs.com server
- select the
xpack-development
branch - check the latest commits
xpm run git-log
- update
CHANGELOG.md
, add a line like * v13.3.1-1.1 published on npmjs.com - commit with a message like CHANGELOG: publish npm v13.3.1-1.1.1
npm pack
and check the content of the archive, which should list only thepackage.json
, theREADME.md
,LICENSE
andCHANGELOG.md
; possibly adjust.npmignore
- configure the version; the first 4 numbers are the same as the GitHub release; the fifth number is the npm specific version:
npm version 13.3.1-1.1.1
- the commits and the tag should have been pushed by the
postversion
script; if not, push them withgit push origin --tags
to GitHub - publish and add the
test
tag:
npm publish --tag test
- when publishing for the first time, use:
npm publish --access public
After a few moments the version will be visible at npmjs.com.
Test if the binaries can be installed with xpm
Run the trigger-workflow-test-xpm xPack action:
xpm run trigger-workflow-test-xpm -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
This will install the package via xpm install
on all supported platforms.
The tests results are available from the GitHub Actions page.
Tag the npm package as latest
When the release is considered stable, promote it as latest
:
npm dist-tag ls @xpack-dev-tools/arm-none-eabi-gcc
npm dist-tag add @xpack-dev-tools/arm-none-eabi-gcc@13.3.1-1.1.1 latest
npm dist-tag ls @xpack-dev-tools/arm-none-eabi-gcc
In case the release proves problematic and needs to be unpublished:
npm unpublish @xpack-dev-tools/arm-none-eabi-gcc@13.3.1-1.1.1
Build the static website locally
Validate the web site content in a local build via the npm build
script:
npm --prefix website run build
Publish the website
- merge
xpack-development
intowebsite
- push the
website
branch to GitHub
At this moment an automated GitHub Action will generate and publish the website.
- the new release blog post is in https://xpack-dev-tools.github.io/arm-none-eabi-gcc-xpack/blog/
- remember the post URL, since it must be used to update the release page and the X/Twitter announcement
The website
branch may be subsequently updated, as long as the
version in package.json
is not changed.
Update the xpack
branch
- merge
xpack-development
intoxpack
- push the
xpack
branch to GitHub
Avoid further updates to the xpack
branch until the next release.
Create the final GitHub release
- go to the GitHub Releases page
- check the download counter, it should match the number of tests
- add a link to the Web blog
[Continue reading »]()
; use an same blog URL - remove the tests only notice
- disable the pre-release button
- click the Update Release button
Check SourceForge mirror
Cleanups
Remove the pre-release binaries
- go to https://github.com/xpack-dev-tools/pre-releases/releases/tag/test/
- remove the test binaries
Clean the work area
Run the trigger-workflow-deep-clean xPack action
xpm run trigger-workflow-deep-clean -C ~/Work/xpack-dev-tools/arm-none-eabi-gcc-xpack.git/build-assets
This will remove the build folders on all self-hosted runners.
The results are available from the GitHub Actions page.
Share on Twitter
- in a separate browser windows, open X/Twitter
- using the
@xpack_project
account - paste the release name like xPack GNU Arm Embedded GCC v13.3.1-1.1 released
- paste the link to the blog post release
- click the Tweet button
Announce to the Arm community
Add a new topic in the Compilers and Libraries forum of the Arm Developer Community.
Click the + New button.
When released simultaneously with AArch64 Embedded GCC, use the following content:
- Title: xPack GNU Arm & AArch64 Embedded GCC v13.3.1-1.1 released
- Description; switch Tools -> Source code:
<p>The <strong>xPack GNU Arm Embedded GCC</strong> and <strong>xPack GNU AArch64 Embedded GCC</strong> packages are part of the alternate xPack binary distribution that complements the official Arm GNU Toolchains maintained by Arm.</p>
<p>The latest release is 13.3.1-1.1 following Arm release 13.3.rel1 from 4 Jul 2024:</p>
<ul>
<li><a href="https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/tag/v13.3.1-1.1/" rel="noopener noreferrer" target="_blank">xPack GNU Arm Embedded GCC v13.3.1-1.1</a></li>
<li><a href="https://github.com/xpack-dev-tools/aarch64-none-elf-gcc-xpack/releases/tag/v13.3.1-1.1/" rel="noopener noreferrer" target="_blank">xPack GNU AArch64 Embedded GCC v13.3.1-1.1</a></li>
</ul>
- Tags: xpack, gnu, gcc, arm, aarch64, toolchain
NOTE: do not use markdown, but format the text with the blog editor.
When released separately, use the following content:
- Title: xPack GNU Arm Embedded GCC v13.3.1-1.1 released
- Description; switch Tools -> Source code:
<p>The <strong>xPack GNU Arm Embedded GCC</strong> package is part of the alternate xPack binary distribution that complements the official Arm GNU Toolchains maintained by Arm.</p>
<p>The latest release is 13.3.1-1.1 following Arm release 13.3.rel1 from 4 Jul 2024:</p>
<ul>
<li><a href="https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/tag/v13.3.1-1.1/" rel="noopener noreferrer" target="_blank">xPack GNU Arm Embedded GCC v13.3.1-1.1</a></li>
</ul>
- Tags: xpack, gnu, gcc, arm, toolchain
Analytics
- GitHub
xpack-dev-tools/arm-none-eabi-gcc-xpack
repo- latest xPack release
- all xPack releases
- previous GNU MCU Eclipse all releases
- individual file counters (grouped by release)
- npmjs.com
@xpack-dev-tools/arm-none-eabi-gcc
xPack
Credit to Shields IO for the badges and to Somsubhra/github-release-stats for the individual file counters.