2020-02-22 10:33 AM
CubeProgrammer_API.dll is a 64bit dll while the .lib is for 32bit. Generating a new 64bit lib from the dll do not solve the issue since the other dlls are mixed.
Here's a list:
CubeProgrammer_API.dll 64 bit
libgcc_s_seh-1.dll 64 bit
libstdc++-6.dll 64 bit
Qt5Core.dll 64 bit
Qt5SerialPort.dll 64 bit
Qt5Xml.dll 64 bit
STLinkUSBDriver.dll 64 bit
FileManager.dll 32 bit
HSM_P11_Lib.dll 32 bit
libeay32.dll 32 bit
libgcc_s_dw2-1.dll 32 bit
libwinpthread-1.dll 32 bit
mfc120.dll 32 bit
msvcp120.dll 32 bit
msvcr120.dll 32 bit
stlibp11_SAM.dll 32 bit
xerces-c_3_1.dll 32 bit
Thank you in advance.
Cristian
2020-02-24 09:06 AM
I have exactly the same problem (CubeProgrammer 2.3).
For me generating a 64bit lib and using 64bit dlls (most of them can be found in "STM32CubeProgrammer/bin") works.
EXPORTS
AddedLoadersToMenu
Alloc
CloseSession
CoreReset
...
...
...
writeMemory
writeUserKey
Enter "lib /def:CubeProgrammer_API.def /machine:x64 /out:CubeProgrammer_API.lib" to create the 64bit lib.
Copy *.dll files from "STM32CubeProgrammer/bin" to "STM32CubeProgrammer/api/lib" (You might skip msvc*.dll and mfc*.dll)
Copy the following files from "C:\Windows\System32" to "STM32CubeProgrammer/api/lib" (for Visual Studio 2019):
msvcp140d.dll
ucrtbased.dll
vcruntime140d.dll
Configure the 64bit Platform in the Cube Programmer API example according to the "Win32" platform and create a Project Configuration "Debug/x64" that derives from "Win32" but uses "x64" platform.
Build.
Run.
This of course is a work-around. Is there a Win32 build of the DLL available as well?
Thanks in advance,
Philipp
2020-02-24 12:55 PM
Thank you Philipp.
I had not noticed that the missing 64bit DLLs were in the BIN folder!
Cristian