Running generated code on HIL hardware

The Target Interface block downloads OUT or ELF files generated with Use selected compound edge pins for data exchange at the start of the simulation. The Target Interface block maintains connection to the target and sends and receives data in real time. The data is sent over JTAG, UART or Ethernet depending on the target. The diagram containing the Target Interface block is typically set to run in real-time, with auto restart and retain state set so that debug sessions run until the stop button is clicked.

To perform HIL, you use the Target Interface block in a debug diagram. Place the blocks you want to debug (typically your controller subsystem) into a single compound block and compile it to an OUT or ELF file. The code generator automatically generates code for the HIL data exchange.

To run the generated OUT or ELF file

      Replace the compound block in your diagram with the Target Interface block. When you place a target Interface block in the diagram, it will automatically be set up with the path to the generated OUT or ELF file.