winIDEA SDK
Automation API

For interactive work, a rich choice of IDEs is available to access all functionalities of the debugger and resources of the target. winIDEA Software Development Kit (SDK) provides the same access in the form of libraries for Python, Java, C#, and C++.
Typical SDK Use Cases
Continuous Integration
In a Continuous Integration (CI) system, winIDEA is usually used to execute tests with every version of the application code. The test environment is created on the fly (as a virtual machine) and erased after completion.
The CI script will typically:
1. Start winIDEA.
2. Create a full winIDEA configuration.
3. Start a debug session.
4. Control target via HIL or a Virtual ECU tool.
5. Verify correct operation by observing internal application states, time execution, measure coverage, etc.
Learn more about winIDEA and CI.
All winIDEA configurations are accessible via the SDK. Individual configurations can be easily manipulated, while helper classes make configuration-as-code easy with just a small number of program lines. See How to create a winIDEA workspace programmatically in Python.
Once the configuration is in place, SDK allows you to:
- Program and verify
- Set breakpoints, typically on error conditions
- Configure application parameters by writing to application memory
- Run and monitor execution
- Observe application states by reading their memory
- Inject errors via write operations
- Execute individual functions in unit test scenarios
- Measure application performance with the Profiler
- Measure application test coverage with the Coverage tool
Advanced functionalities
winIDEA provides all commonly used debugging tools functionalities, but testing your application might require more specific functions. These could be:
- Synchronized data exchange with the host (sometimes called semi-hosting).
Example: The application logs internal events in the RAM buffer - until it is full. A script will read the RAM buffer, write it to a host file, and mark the RAM buffer as free so the application can continue logging indefinitely.
- Synchronization of multiple debuggers or 3rd party tools.
Example: before a CAN message is injected by a CAN tool, the winIDEA analyzer session is started to observe the application's response to the message. A script will first start the analyzer, inject the message, wait for 1 second, stop the analyzer, and display the results.
- Data retrieval and export to 3rd party software.
Example: The engine's parameters, like RPM, temperature, fuel flow, etc. are kept in the application's variables. A script will read them out periodically at a high rate and write to a file, or render them in a timing graph.
- Error state analysis.
Example: A breakpoint is set to stop when the application encounters an unexpected state. A script will wait for the breakpoint to hit, read out and save all diagnostic data, and then resume or restart the application.
A good example of advanced functionalities realized with the SDK are the emuSync and daqIDEA applications.
Repetitive tasks
Often a fixed sequence of operations must be executed for a specific scenario. This is tedious and error-prone for a human operator. Instead, a script is created to execute all necessary steps and then just this script is invoked.
Example: the main application is loaded from FLASH to RAM by a boot loader. However, FLASH reprogramming for every application iteration is too slow and introduces too much stress on the FLASH. Instead of programming, the debugger stops the SoC at boot loader entry, the application is loaded directly into RAM with appropriate offset, the program counter is preset to the application's entry point, and execution resumes.
winIDEA distribution itself includes a few scripts that, for specific SoCs, change their boot configurations, inject ECC errors, etc.
Start with winIDEA SDK
Create a winIDEA workspace in Python
Install winIDEA SDK
Python Examples