Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions source/linux/Overview/GCC_ToolChain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@

.. code-block:: console

host# export CROSS_COMPILE_32="${SDK_INSTALL_DIR}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick, since you are removing host# prefix, better to add a comment on top of the code block saying to run the commands on the host.

host# export SYSROOT_32="${SDK_INSTALL_DIR}/linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi"
host# export CFLAGS="-march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard"
host# export CC_32="${CROSS_COMPILE_32}gcc ${CFLAGS} --sysroot=${SYSROOT_32}"
export CROSS_COMPILE_32="${SDK_INSTALL_DIR}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-"

Check warning on line 19 in source/linux/Overview/GCC_ToolChain.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Headings] Use sentence-style capitalization in 'linux-devkit'. Raw Output: {"message": "[RedHat.Headings] Use sentence-style capitalization in 'linux-devkit'.", "location": {"path": "source/linux/Overview/GCC_ToolChain.rst", "range": {"start": {"line": 19, "column": 51}}}, "severity": "INFO"}

Check warning on line 19 in source/linux/Overview/GCC_ToolChain.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.CaseSensitiveTerms] Use 'Linux' rather than 'linux'. Raw Output: {"message": "[RedHat.CaseSensitiveTerms] Use 'Linux' rather than 'linux'.", "location": {"path": "source/linux/Overview/GCC_ToolChain.rst", "range": {"start": {"line": 19, "column": 51}}}, "severity": "WARNING"}
export SYSROOT_32="${SDK_INSTALL_DIR}/linux-devkit/sysroots/armv7at2hf-neon-oe-linux-gnueabi"

Check warning on line 20 in source/linux/Overview/GCC_ToolChain.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.CaseSensitiveTerms] Use 'Linux' rather than 'linux'. Raw Output: {"message": "[RedHat.CaseSensitiveTerms] Use 'Linux' rather than 'linux'.", "location": {"path": "source/linux/Overview/GCC_ToolChain.rst", "range": {"start": {"line": 20, "column": 45}}}, "severity": "WARNING"}
export CFLAGS="-march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard"
export CC_32="${CROSS_COMPILE_32}gcc ${CFLAGS} --sysroot=${SYSROOT_32}"

.. ifconfig:: CONFIG_part_variant not in ('AM335X', 'AM437X', 'AM57X')

.. code-block:: console

host# export CROSS_COMPILE_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-"
host# export SYSROOT_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/aarch64-oe-linux"
host# export CC_64="${CROSS_COMPILE_64}gcc --sysroot=${SYSROOT_64}"
host# export CFLAGS64="--sysroot=${SYSROOT_64}"
host# export KCFLAGS="--sysroot=${SYSROOT_64}"
host# export LDFLAGS="--sysroot=${SYSROOT_64}"
export CROSS_COMPILE_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-"
export SYSROOT_64="${SDK_INSTALL_DIR}/linux-devkit/sysroots/aarch64-oe-linux"
export CC_64="${CROSS_COMPILE_64}gcc --sysroot=${SYSROOT_64}"
export CFLAGS64="--sysroot=${SYSROOT_64}"
export KCFLAGS="--sysroot=${SYSROOT_64}"
export LDFLAGS="--sysroot=${SYSROOT_64}"

.. ifconfig:: CONFIG_part_variant not in ('AM335X', 'AM437X', 'AM57X', 'AM62LX')

.. code-block:: console

host# export CROSS_COMPILE_32="${SDK_INSTALL_DIR}/k3r5-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-oe-eabi/arm-oe-eabi-"
host# export SYSROOT_32="${SDK_INSTALL_DIR}/k3r5-devkit/sysroots/armv7at2hf-vfp-oe-eabi"
host# export CFLAGS32="--sysroot=${SYSROOT_32}"
export CROSS_COMPILE_32="${SDK_INSTALL_DIR}/k3r5-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-oe-eabi/arm-oe-eabi-"

Check warning on line 39 in source/linux/Overview/GCC_ToolChain.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] reported by reviewdog 🐶 [RedHat.Headings] Use sentence-style capitalization in 'k3r5-devkit'. Raw Output: {"message": "[RedHat.Headings] Use sentence-style capitalization in 'k3r5-devkit'.", "location": {"path": "source/linux/Overview/GCC_ToolChain.rst", "range": {"start": {"line": 39, "column": 51}}}, "severity": "INFO"}
export SYSROOT_32="${SDK_INSTALL_DIR}/k3r5-devkit/sysroots/armv7at2hf-vfp-oe-eabi"
export CFLAGS32="--sysroot=${SYSROOT_32}"

If the Processor SDK is not installed, the Arm GNU toolchains can be downloaded and setup.
Refer to :ref:`external-arm-toolchain` section for more details on usage.
Expand Down Expand Up @@ -336,12 +336,12 @@

.. code-block:: console

host# COMPILER_PATH=/opt/arm-toolchain
host# mkdir -p $COMPILER_PATH
host# wget -c https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-linux-gnueabihf.tar.xz -O - | tar -xv -J -C $COMPILER_PATH
host# wget -c https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz -O - | tar -xv -J -C $COMPILER_PATH
host# export CROSS_COMPILE_64=$COMPILER_PATH/arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
host# export CROSS_COMPILE_32=$COMPILER_PATH/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-
host# export CC_64="${CROSS_COMPILE_64}gcc"
host# export CC_32="${CROSS_COMPILE_32}gcc"
COMPILER_PATH=/opt/arm-toolchain
mkdir -p $COMPILER_PATH
wget -c https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-linux-gnueabihf.tar.xz -O - | tar -xv -J -C $COMPILER_PATH
wget -c https://developer.arm.com/-/media/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz -O - | tar -xv -J -C $COMPILER_PATH
export CROSS_COMPILE_64=$COMPILER_PATH/arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
export CROSS_COMPILE_32=$COMPILER_PATH/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-
export CC_64="${CROSS_COMPILE_64}gcc"
export CC_32="${CROSS_COMPILE_32}gcc"

Loading