IAR Embedded Workbench

This section provides step-by step instructions to setup Imagimob Commandline Tool inside IAR Embedded Workbench. The IAR Embedded Workbench automatically compiles TensorFlow .h5 files into .c and .h files. The Imagimob Commandline Tool is compatible with Tensorflow/Keras .h5 models generated with a Tensorflow backend of version 2.x. To know the supported layers and activation functions in Studio refer to Supported layers and functions (opens in a new tab).


The models that contain unsupported layers will fail to convert.


Make sure you have installed IMAGIMOB Studio.

Sample project

Here is a pre-configured sample project that can be loaded in IAR Embedded Workbench. Click to download sample project (opens in a new tab)

Setup Imagimob Commandline Tool for IAR Embedded Workbench Sample Project

To setup the Imagimob Commandline Tool for new or existing projects, follow the steps:

  1. Go to ProjectOptionsCustom Build.

  2. In Filename extensions, enter .h5.

  3. In Command line, enter imc $FILE_PATH$ -oc $FILE_BNAME$.c -oh $FILE_BNAME$.h

  4. In Output files, enter $FILE_BNAME$.c $FILE_BNAME$.h

  5. Add the .h5 file that you want to convert to the project.

  6. Make project (make sure that the project contains a file named main.c)

    You can now find the generated .c and .h files under FilesModel.h5Output.