はじめに
xPack の Arm Embedded GCC (arm-none-eabi-gcc) にて Apple Silicon版が追加されたようです 👏
xPack Arm Embedded GCC 10.3.1-2.3 released (2021/12/07)
https://xpack.github.io/tags/arm-none-eabi-gcc/
インストール
-
前提
-
homebrew がインストールされていること
-
npm がインストールされていること
-
xpm インストール (参考:https://xpack.github.io/xpm/install/)
$ npm install --global xpm@latest
- arm-none-eabi-gcc インストール (参考:https://xpack.github.io/arm-none-eabi-gcc/install/)
$ xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest --verbose
使い方
デフォルトで次の場所にインストールされています。
$ ~/Library/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/10.3.1-2.3.1/.content/bin/arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=/Users/mario/Library/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/10.3.1-2.3.1/.content/bin/arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/Users/mario/Library/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/10.3.1-2.3.1/.content/bin/../libexec/gcc/arm-none-eabi/10.3.1/lto-wrapper
Target: arm-none-eabi
Configured with: /Users/ilg/Work/arm-none-eabi-gcc-10.3.1-2.3/darwin-arm64/sources/gcc/configure --prefix=/Users/ilg/Work/arm-none-eabi-gcc-10.3.1-2.3/darwin-arm64/install/arm-none-eabi-gcc --infodir=/Users/ilg/Work/arm-none-eabi-gcc-10.3.1-2.3/darwin-arm64/install/arm-none-eabi-gcc/share/doc/info --mandir=/Users/ilg/Work/arm-none-eabi-gcc-10.3.1-2.3/darwin-arm64/install/arm-none-eabi-gcc/share/doc/man --htmldir=/Users/ilg/Work/arm-none-eabi-gcc-10.3.1-2.3/darwin-arm64/install/arm-none-eabi-gcc/share/doc/html --pdfdir=/Users/ilg/Work/arm-none-eabi-gcc-10.3.1-2.3/darwin-arm64/install/arm-none-eabi-gcc/share/doc/pdf --build=aarch64-apple-darwin20.6.0 --host=aarch64-apple-darwin20.6.0 --target=arm-none-eabi --with-pkgversion='xPack GNU Arm Embedded GCC arm64' --enable-languages=c,c++ --disable-mingw-wildcard --enable-plugins --enable-lto --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/Users/ilg/Work/arm-none-eabi-gcc-10.3.1-2.3/darwin-arm64/install/arm-none-eabi-gcc/arm-none-eabi --with-native-system-header-dir=/include --with-multilib-list=rmprofile --disable-build-format-warnings --with-system-zlib
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 10.3.1 20210824 (release) (xPack GNU Arm Embedded GCC arm64)
PATH を通せばOK。
$ export PATH=~/Library/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/10.3.1-2.3.1/.content/bin:$PATH
参考
何か困ったときのサポートなどはこちら
https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack