This section describes the first steps for creating a working program using the winIDEA SDK.
Documentation examples use Python but can be easily adapted to other supported languages. Each SDK bundle includes a sample project in the SDK-specific language for use as a starter template.
The fundamental prerequisite for using the winIDEA SDK is establishing a connection to winIDEA. Use the isys::ConnectionMgr class and its connect() method:
The connect() method without parameters connects to the most recently used winIDEA instance. If your workflow requires you to select between different winIDEA versions or instances, provide parameters to identify the specific instance. Refer to the isys::ConnectionMgr class documentation and provided examples.
After establishing a connection, use isys::ConnectionMgr to construct Controllers and call their methods. The following example uses isys::CDebugFacade to download firmware and run the target until the main() function:
For a single-core setup, create one isys::ConnectionMgr, connect it to winIDEA, and use it to construct Controllers.
In a multi-core or multi-SMP setup, start with one isys::ConnectionMgr and connect once. This root instance can be used to control the default core (typically core index 0).
To target another core, use isys::ConnectionMgr::manageCore() to obtain another isys::ConnectionMgr instance routed to that core. The returned instance is already connected to winIDEA, so no additional connect() call is required.
In a multi-SoC workspace, follow the same pattern as for multi-core sessions, but route by SoC and core index with isys::ConnectionMgr::manageSoCCore().
Regardless of the number of cores, SoCs, or processes in your workspace, use a single instance of isys::CSessionCtrl in your SDK scripts. winIDEA runs one debug session at a time, so there should be only one active isys::CSessionCtrl instance. For best backward compatibility and most reliable behavior, create isys::CSessionCtrl from the root isys::ConnectionMgr that is directly connected to winIDEA.
Use isys::CSessionCtrl for session-level operations, which include: starting or ending the debug session, reset or program or attach to all SoCs. For more detailed control of a single SoC, obtain isys::CSoCCtrl via isys::CSessionCtrl::get_SoC().
To control one core within a SoC, obtain isys::CCoreCtrl from isys::CSoCCtrl.
Other controllers are typically constructed directly from isys::ConnectionMgr (see each constructor for exact requirements). The selected isys::ConnectionMgr instance defines the routing context (SoC/core/process) for operations that require routing.
For the full list of available controllers, see Controllers.
Avoid creating multiple isys::CSessionCtrl instances from routed isys::ConnectionMgr instances.