Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.330

EmuSync

In this topic:

Configuration

Instance Workspaces

Selected Instance

All Instances

Hooks

 

 

Introduction

The EmuSync application offers coordinate use of multiple winIDEA Workspaces, synchronously starting and stopping parallel SoCs under winIDEA control. To open EmuSync, go to Test | Launch EmuSync.

 

i-icon

EmuSync is an Open Source project shared on GitHub.

 

EmuSync allows you to:

Keep track of the many different winIDEA application controlling each SoC

Provide shorthands to operations that are commonly performed in all SoCs at once (download, start, etc.)

Automate synchronous starts and stops

 

When using EmuSync, a list of winIDEA Workspaces is specified, where each can be in Master or Slave Mode. Stopping the Master Workspace causes all Slave Workspaces to stop. Optionally, all Slave Workspaces can be started when the Master Workspace runs. EmuSync can load and save different configurations.

 

Click to enlarge

EmuSync configuration example

 

 

EmuSync is a single window application divided into four parts:

Configuration

Instance workspaces

Selected Instance

All Instances

 

emuSync-running

 

 

Configuration

The Configuration section displays the path to the active configuration file. The "..." button displays a pop-up menu with file commands: New, Open, Save, Save as.

Always on top -  When checked keeps the EmuSync window above all other windows.

 

Configuration information is saved into text files with the .EmuSync extension, which can be manually edited. The file is created automatically when you start a new configuration and is saved in a location of your choosing. The file includes three main sections:

Configuration - This is where the selected winIDEA Workspaces are specified (wsPath field) and their operation mode (opMode field: master/slave) is defined.

Logging - If the “enable” field is set to true, the logging menu appears in the EmuSync main menu bar. There you can select the desired logging level and open the folder containing the log files.

Module - Each of the available hooks has its own specified file path (hookPath field), name of python hook start method/function (hookStart field), and an enable field (isActive).

 

Below is an example of a configuration file:

configuration:
- opMode: master
 wsPath: C:\winIDEADemos\Sample1.xjrf
- opMode: slave
 wsPath: C:\winIDEADemos\Sample2.xjrf
- opMode: slave
 wsPath: C:\winIDEADemos\Sample3.xjrf
logging:
 enable: false
module:
 onDownload:
   hookPath: emuSyncHooks.py
   hookStart: onDownloadHook
   isActive: false
 onReset:
   hookPath: emuSyncHooks.py
   hookStart: onResetHook
   isActive: false
 onRun:
   hookPath: emuSyncHooks.py
   hookStart: onRunHook
   isActive: false
 onStop:
   hookPath: emuSyncHooks.py
   hookStart: onStopHook
   isActive: false
 preDownload:
   hookPath: emuSyncHooks.py
   hookStart: preDownloadHook
   isActive: false
 preReset:
   hookPath: emuSyncHooks.py
   hookStart: preResetHook
   isActive: false
 preRun:
   hookPath: emuSyncHooks.py
   hookStart: preRunHook
   isActive: false
 preStop:
   hookPath: emuSyncHooks.py
   hookStart: preStopHook
   isActive: false

 

 

Instance Workspaces

Each line of the list displays the number ID of the instance, its Master and Slave mode, its status, and the path to the Workspace.

 

Status

Status

Description

EmuSyncNotAttachedStatus

Workspace not attached to a winIDEA process

EmuSyncstatusOffline

winIDEA is not connected to the debugger

EmuSyncstatusHalted

Core execution is halted

EmuSyncstatusStop

winIDEA instance is in the stop mode.

EmuSyncstatusRun

winIDEA instance is in the running mode

EmuSyncstatusDetached

winIDEA instance is detached

 

 

Selected Instance

Depending on the status of the Workspace different commands are available. To operate multiple winIDEA instances from the EmuSync application, you need to launch them first.

Launch - Launch a new winIDEA instance and attach to it.

Close - Close winIDEA instance.

Attach - Attach to an open winIDEA instance or open one if no suitable instance is found.

Detach - Detach/disconnect from winIDEA instance.

Run - Start/continue core execution.

Stop - Stop core execution.

Download - Download files to the target CPU.

Reset - Trigger a reset on the core.

Master /  Slave radio buttons-  Toggle between the modes.

 

 

All Instances

The command buttons available in the Selected Instance section are duplicated here, but they operate on all instances at the same time. The checkboxes on the bottom are global options.

Run slaves when master runs - If enabled, the Master Workspace entering running status causes all Slaves to run.

Close all on exit - If enabled causes all associated winIDEA applications to be closed when EmuSync is closed.

 

 

Options

There are additional options available in the application's menu bar:

 

EmuSync-Options

 

Use Demo mode - Toggle Demo mode across all winIDEA instances.

Module data - Provide a quick overview of the module and hook-related settings in the currently loaded configuration file. To edit these settings, edit the configuration file itself and then reload it in the EmuSync application.

 

 

Hooks

EmuSync allows you to implement custom Python hooks (or scripts) and run them according to the selected command. Hook paths and starting methods for each of the supported events are defined in the configuration EmuSync file. If a specific hook is enabled in the configuration file, then it will be executed every time the specific command is given to a winIDEA instance.

 

Supported events

onDownload (after Download)

onReset (after Reset)

onRun (after Run)

onStop (after Stop)

preDownload (before Download)

preReset (before Reset)

preRun (before Run)

preStop (before Stop)

 

Requirements

The only requirement for a hook is that it can be passed an instance of the ConnectionMgr class. This enables you to create any of the other classes and managers available in winIDEA SDK and manipulate winIDEA instances. No logging handler is passed, so you must implement your own logging solution if needed.

 

 

More resources

Multi-Core and Multi-SoC Synchronization - Overview

Implement a custom EmuSync Hook - How-to guide

 

Copyright © 2025 TASKING