2011-08-12 01:20 AM
Hi,
I am currently developing a PC application for STM32 using Inemo board.The PC application will be able to upgrade the firmware of the STM32 using Dfu mode. Iam using Visual studio Vb.net for the PC side application. I have succedded in enemurating my device and getting a symbolic link to the device and Im able to read the DFU Functional descriptor. However Iam unable to do upgrade because the variables used in VB are quite different somehow from the C++ ones.And since I cannot really have byte arrays in structure I have to create consequtive memory regions by placing many bytes one after each other Has anyone linked the dlls using vb.net? Iam facing problem with ''STDFUPRT_CreateMappingFromDevice'' to this function I have passed a string of symbolic device link as the first parameter and for the second parameter Iam passing a reference to a structure which has 283 bytes.On return I get a no-error response but my structure values are all corrupted and doesnot indicate any useful information.The third parameter is simply a reference to a integer and its filled with a value one so i guess this is right I have also tried filling name[] array with device symbolic link but it always returns corrupt values. After calling the function the bytes of the mapping structure are affected as under The first byte is A8 The first byte is 9a The third byte is 92 Also in the manual ''UM0384 Dfuse application programming interface'' the MAPPING structure shows that pointer to structure has 18 bytes.Whereas MAPPING SECTOR has 19 bytes in total is this a typo?2011-08-13 04:51 PM
typedef struct {
BYTE nAlternate; char Name[MAX_PATH]; DWORD NbSectors; PMAPPINGSECTOR pSectors; } MAPPING, *PMAPPING; with typedef struct { DWORD dwStartAddress; DWORD dwAliasedAddress; DWORD dwSectorIndex; DWORD dwSectorSize; BYTE bSectorType; BOOL UseForOperation; } MAPPINGSECTOR, *PMAPPINGSECTOR; I'm not familiar with VB.net, I hope that you will able to find your problem with these data. Cheers, STOne-32.2018-10-29 08:46 AM
Did you ever get it to work as it looks like I will have to do a VB Net DFU.
Andy.