1
2
3
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_fill():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 ideCtrl = ic.CIDEController(connMgr)
16 devName = "ST STM32F4xxxG_1024KB"
17 optCtrl = ic.COptionController(connMgr, ic.CStorageDeviceFactory.DEVICES_OPT_URL)
18 devIndex = optCtrl.index_of("Name",devName)
19 print("Index of the item whose 'Name' attribute has value " + devName + f": {devIndex}")
20
21 storageCtrl = ic.CStorageDeviceFactory.makeDevice(connMgr, ic.EStorageDevice_EmbeddedFlashDevice, devIndex)
22
23 print(f"Erasing device with index: {devIndex}")
24 storageCtrl.erase(ic.IConnectUMI.wProgDevice)
25
26 print(f"Performing device fill with a default value...")
27
28
29
30if __name__ == "__main__":
31 test_fill()