Setting up the license for a Docker image in such a way only needs to be performed once per DOCKER_HOST. The Docker Engine will never erase this (or any other) named volume, even after the containers which made use of it are stopped or removed. For manually removing a named volume, remove all containers using it and then use docker volume rm .

For questions or suggestions related to this tutorial: try the wiki or check earlier issues. If those don't help, create a new issue with detailed information.

Docker is generally recognized as best practice for achieving automatically reproducible build environments. It provides the means for containerizing self-sufficient build environments that result from the requirements described in a Dockerfile.

Now build the application project that is linked against the library for the same selected target. In this example, targets/arm was selected for demonstration:

Finally build the library project for the selected (e.g. arm, avr, riscv, rl78, rx, rh850). In the following example, "arm" was selected and iarbuild was used to build the project:

The SHA256 hash number shown in the last line is dynamically attributed by Docker to any new container while uniquely identifying it.

The Docker image only needs to be built once. If you use multiple packages for different targets/versions, repeat the process to build a dedicated docker image for each package.

Before you can run a Docker container, you need a Docker image that contains the required environment. A Dockerfile contains instructions that describe how to build an image .

A IAR Build Tools installer package of your choice for Ubuntu(/Debian) in the .deb format. IAR customers with a license can download directly from IAR MyPages. If you do not have a license yet, contact IAR Sales.

Invoke /opt/iarsystems/bx/common/bin/iarbuild with no parameters for a detailed description of available options.

The analysis results are stored in an SQLite database named cstat.db. Use icstat to retrieve the warnings and display them on the terminal. For example:

Using the provided scripts, Dockerfile, and official Docker Documentation, you can either use this setup as-is or customize it to ensure the containers operate according to your specific requirements. This setup can serve as a fundational element for your organization.

3rd Gen 4Runner headlights

In this section, you will run an interactive container locally, clone and build a project with the image you have created.

A x86_64/amd64 platform supported by the Docker Engine (supported platforms) capable of accessing the Internet for downloading the necessary packages.

where [fs] and [.build] in the package names show up to distinguish tools that come pre-certified for Functional Safety.

The build script will use the docker build command with the Dockerfile, together with an installer package (bx-.deb), to create one image.

You will find all your project files generated in this example under ~/bx-workspaces-ci. However they belong to root as it was the default user for the container. In order to get ownership of all generated files, perform:

For this example we will clone a public repository with projects created in the IAR Embedded Workbench IDE for the supported target architectures:

The IAR License Server ready to serve, up and running, with activated license(s) for the network nodes with the IAR Build Tools of your choice -and- reachable from the platform in which the DOCKER_HOST is running as described above.

BX Builtheadlights GX470

The same database can be used for generating an analysis report with warnings about coding violations for the project's ruleset selection. Use ireport to generate an HTML report. In this example:

In the bash shell, perform the following step (replace iarsystems/bx: and by the actual ones):

The following command line will bind the home directory ($HOME) to the "my-iar-bx-container" container's working directory (/build) for the iarsystems/bx: image.

Depending on your system's properties, it might take a while to build the image. The build time ranges from seconds to a few minutes. In the end, the build script will automatically tag the image as iarsystems/bx:.

Thanks to running the container with the --volume $HOME:/build parameter, all existing files from the home directory and below are bound to the container's /build working directory. In this case, once you exit the container, any files within the /build directory will remain in their correspondent locations under the home directory.

The setup-license script prepares a named Docker volume for storing persistent license configuration for any containers belonging to the same DOCKER_HOST.

Additionally, IAR C-STAT is an add-on to the IAR Build Tools that can perform static code analysis. It helps you ensure code quality in your applications. If you have C-STAT, iarbuild can drive the analysis with the -cstat_analyze command to analyze the project.

This tutorial provides a Dockerfile and helper scripts that provide the means for building embedded applications with the IAR Build Tools from a Linux container.

Since the container was run with the --restart=unless-stopped option, it will remain available for reattaching to it when desired, by using docker exec -it my-iar-bx-container bash, until it is manually stopped with docker stop my-iar-bx-container. The docker run --help command provides more information on different ways of running docker containers.

Disclaimer The information in this repository is subject to change without notice and does not constitute a commitment by IAR. While it serves as a valuable reference for DevOps Engineers implementing Continuous Integration with IAR Tools, IAR assumes no responsibility for any errors, omissions, or specific implementations.