I am trying to read dynamic data from IC using Cyclone FX programmer/debugger and then also write back data to IC.
I am using python to load dll library and it works successfully. lib = cdll.LoadLibrary(program) I then call function inside of this to connect to the programmer. The function from dll library is: uint32_t connectToCyclone(char *nameIpOrPortIdentifier);
Python:
cyc_name = 'CYC_JF'.encode('utf-8')
cyclonefx = lib.connectToCyclone(cyc_name)
This works ok and I can detect programmer. Now I am using the dll function to read back data from IC: bool startDynamicDataProgram(uint32_t cycloneHandle, uint32_t targetAddress, uint16_t dataLength, char *buffer);
Python:
serial = ''.encode('utf-8')
lib.dynamicReadBytes (cyc_name, 0x08007000, 4, serial)
But my expected output is not correct, which would suggest I am creating my buffer incorrectly.
Question is how to create buffer which can be translated from C into python buffer?