Access winIDEA settings via option URL
In this topic:
•Use CIDEController to stall the RH850/F1H PE1 core when trace FIFO is full
winIDEA SDK interface features sets of classes that can be used to configure winIDEA. However, not all settings can be set using the provided classes. This is why the winIDEA SDK interface offers a couple of functions as the part of the CConfigurationController and CIDEController classes (e.g. getOptionStr, setOption), which enable you to read or modify any winIDEA setting which can be accessed through an option URL.
Most commonly used optionURLs can be obtained with CConfigurationController and one of its methods, while CIDEController provides access to any option, but we need to provide a full URL. For settings, which are supported by CConfigurationController it is recommended to use CConfigurationController instead of CIDEController, because it provides more robust ways of accessing settings. If the URL changes in a future version of winIDEA, the code using CConfigurationController will still work.
The easiest method to obtain the option URL is to open the Help / Display Option dialog.
Depending on the type of the option, it is necessary to select the appropriate type:
IDE - Covers settings found in Debug menu (Files for download, Operating System, Debug Options), Test menu (winIDEA test SDK options), FLASH menu (FLASH Setup), Tools menu (Options).
iOPEN - Covers hardware related settings (BlueBox tools, CPU settings).
Document - Covers document settings, most commonly used for configuring CPU-specific analyzer settings.
Plugin - Covers plugin-specific settings.
This example is written for winIDEA SDK for Python.
Use CConfigurationController.ide_SoC_files method. |
To see names of available SoCs, either open Help / Display Option dialog and type in filter ''soc username'' or select Debug / Configure Sessions / SoCs in winIDEA.
Get the list of download files. |
The name of SoC is myMCU. To get the list of its download files, use the Python console to get the missing pieces:
>>> import isystem.connect as ic; cm = ic.ConnectionMgr(); cm.connectMRU()
>>> cc = ic.CConfigurationController(cm)
>>> files = soccc.ide_SoC_files("myMCU")
>>> files.URL()
'/IDE/System.Debug.SoCs[0].DLFs_Program.File'
View properties of download files. |
To see available properties of download files, open the Display Options dialog again and filter for DLFs_. If needed, use longer parts of the URL printed above:
You can see that the URL refers to a list (because of []). Use the method at() to access a specific item, and then option name Path to get the download file path. For example:
>>> for i in range(files.size()): … print(files.at(i).get("Path")) … C0\Debug\sample.elf C1\Debug\sample.elf |
Configure the RH850/F1H PE1 core to stall when the trace FIFO is full:
Open Help / Display Option. |
Check URL option. |
Search for Stall. |
Search for Stall in the list of option strings for traceFile.trd.
Click Display button. |
Choose the setting that depicts the StallCPU. |
Choose the setting that depicts the StallCPU for PE1 core: /Document/traceFile.trd/Trigger.Items[0].HW.RH850.HW.SRC[PE1].StallCPU.
This string can now be used in the winIDEA SDK to change its value to TRUE.