5import isystem.connect
as ic
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
18 devName =
"ST STM32F4xxxG_1024KB"
19 optCtrl = ic.COptionController(connMgr, ic.CStorageDeviceFactory.DEVICES_OPT_URL)
20 devIndex = optCtrl.index_of(
"Name", devName)
21 print(
"Index of the item whose 'Name' attribute has value " + devName + f
": {devIndex}")
23 storageCtrl = ic.CStorageDeviceFactory.makeDevice(connMgr, ic.EStorageDevice_EmbeddedFlashDevice, devIndex)
25 print(f
"Writing configured data to device with index: {devIndex}")
26 storageCtrl.write(ic.IConnectUMI.wProgDevice)
28 print(f
"Writing data from a specific file to device with index: {devIndex}")
29 storageCtrl.write(ic.IConnectUMI.wProgDevice,
30 ic.IConnectUMI.wFileFormatAuto,
32 "CORE0/Debug/sdk_test.elf")
34 print(f
"Writing specific data (16 bytes) to a device with index: {devIndex}")
35 data = ic.VectorBYTE()
36 for index
in range(16):
38 storageCtrl.write(ic.IConnectUMI.wProgDevice, 0x08000000, 16, data)
41if __name__ ==
"__main__":