Skip to content

Adding the IAR Build Tools executables to the PATH

Felipe Torrezan edited this page Oct 11, 2024 · 4 revisions

Introduction

The provided Dockerfile does not change the default environment PATH.

Procedure

For adding the executables to the search PATH, which means, not requiring the full path when executing them, change the Dockerfile ENV with the following additional PATH entry:

ENV  LC_ALL=C \
     DEBIAN_FRONTEND="noninteractive" \
     HOME=/build \
     PATH=/opt/iarsystems/bx<package>/<target>/bin:/opt/iarsystems/bx<package>/common/bin:$PATH

Examples

Fill the <package> and <target> placeholders with appropriate content. Examples:

  • PATH=/opt/iarsystems/bxarm/arm/bin:/opt/iarsystems/bxarm/common/bin:$PATH
  • PATH=/opt/iarsystems/bxarmfs/arm/bin:/opt/iarsystems/bxarmfs/common/bin:$PATH
  • PATH=/opt/iarsystems/bxriscv/riscv/bin:/opt/iarsystems/bxriscv/common/bin:$PATH
  • PATH=/opt/iarsystems/bxriscvfs/riscv/bin:/opt/iarsystems/bxriscvfs/common/bin:$PATH

Outcome

An image created with this modification will enable the tools to be executed without the need of full path specification. For example, in an BXARM image, it becomes possible to execute:

$ iccarm --version
IAR ANSI C/C++ Compiler V9.60.2.399/LNX for ARM BX

Instead of specifying the full path like this:

$ /opt/iarsystems/bxarm/arm/bin/iccarm --version
IAR ANSI C/C++ Compiler V9.60.2.399/LNX for ARM BX
Clone this wiki locally