1. Select the CM0+ project and open the Options dialog.

  2. On the dialog, select the

    Debugger

    category in the

    Setup

    tab, and then select the applicable

    Driver

    (I-jet, CMSIS-DAP, J-Link):


    ../figures/image39.png

  3. Switch to the

    Images

    tab to specify the extra image to be downloaded prior to debugging in order to download images of all projects in one process.

    • Select the

      Download extra image

      check box.

    • Provide a

      Path

      to the CM4/CM7's

      HEX

      image.

    • Enter 0 for

      Offset

      .


    ../figures/image43.png

    If you provide an OUT file instead of a HEX file, the IAR IDE will fail to halt at the beginning of

    main()

    due to the main function present in both the CM0+ and CM4/CM7 OUT files.


    Note: For triple-core MCUs you should download two extra images.


  4. Switch to the

    Build Actions

    category.



    • Click the

      New

      button to open the Build Action dialog.

    • Paste the following command to build the CM7_0 (or CM4) project in the

      Command line

      field as single line (edit the file name for your project)

      iarbuild.exe "..\proj_cm7_0[project-name].ewp" -make Debug

    • Select

      Build Order

      “Run before linking”.

    • Click

      OK

      to close the Build Action dialog.

    • Click the

      New

      button again.

    • Paste the following command to build the CM7_1 project (if applicable) in the

      Command line

      field as single line (edit the file name for your project)

      iarbuild.exe "..\proj_cm7_1[project-name].ewp" -make Debug

    • Select

      Build Order

      “Run before linking”.

    • Click

      OK

      to close the Build Action dialog.

    The final list should look similar to this:



  5. Enable hex file generation. In the

    Runtime Checking > Output Converter

    category:

    • Select the

      Generate additional output

      check box.

    • Ensure

      Output format

      is set to

      Intel Extended hex

      .


    ../figures/image45.png

  6. Click

    OK

    , and then select

    File > Save All

    to save all the changes.

  7. Build the project.