2019-02-21 12:40 AM
hi,
I'm trying to run STM32CubeProgrammer_api project, I could build the STM32CubePrgAPI.exe with no error, but I got the 0xc000007B error when I run it; it seems that missing some runtime DLLs, I tried to install vs2015, vs2013, vs2010 runtime, but got the mistake;
my environment as blow:
os: win7 64bit
build with VS2017 version 15.6.6 and Windows SDK version 10.0.16299.0;
2019-03-17 08:04 AM
Hi,
same problem here. I've tried both with VisualStudio and Qt Creator, with STM32CubeProgrammer 2.0 APIs.
I could compile, but execution leads to 0xC000007B error.
2019-03-17 08:44 AM
0xC000007B is STATUS_INVALID_IMAGE_FORMAT.
A.k.a. running 64-bit executable on 32-bit machine, or running on WinXP executable built without backward compatibility. With Windows specific issues, you're welcome to the MSDN forums.
-- pa
2019-03-17 09:36 AM
indeed, I was able to compile and run with MinGW32.
Thanks,
Alberto
2019-03-18 03:35 AM
Ok, going a bit further... I was able to compile and run with MinGW32, as long as I don't connect an ST-Link.
Also, I've noticed that on different machines (both Win7, 64-bit) STM32CubeProgrammer gets installed in different fodlers:
I've compared the DLLs in the "api" folder and they are different, despite the STM32CubeProgrammer version is the same on both PCs!
Any ideas?
Thank you,
Alberto
2019-03-18 04:37 AM
About my previous point 2, setDisplayCallbacks() MUST be called. By doing so, ST Link finally gets enumerated.
2019-10-14 01:24 AM
Hello,
I'm facing the same error when try to start the application. Can you tell me some solution, different from using MINGW32? Is it mandatory to install the STM32CubeProgrammer.exe in the "Program files (x86)" directory?
2019-10-14 01:50 AM
Well, it seems to be related to the DLL you use.
Depending on the Java version you installed (either 32 or 64 bit), you obtain a 32 or 64 bit DLL. Then, of course, your exe must comply with the architecture.
I've managed to make it work (with Msys2/MinGW64) by making sure that everything was 64 bit.
Haven't tried with VisualStudio, but I think it's the same.
2019-10-14 05:02 AM
Thank you for the response, Alberto!
I'm running Windows 7 64 bit. On my PC STM32CubeProgrammer is installed in the Program files directory. In the same directory is and the Java (JRE). I try with mingw32-g++ without success - the program executes successfully but nothing is seen in the console. It is possible to have problem with the console printing here, but currently I'm busy with another urgent task and will continue after. Below is the mingw-32 build command:
mingw32-g++.exe src/DisplayManager.cpp src/Example1.cpp src/main.cpp -I include/ -L lib/ -o lib/out.exe -lCubeProgrammer_API
You mention the DLL file (CubeProgrammer_API.dll), but it is provided by ST and I don't know is it 32 or 64 bit compiled.
I'll continue struggle that problem after few days. Meanwhile attached is the Visual studio output when the exe crashes.
2019-10-21 03:32 AM
Dear Martin,
what I meant is:
From you screenshot, I guess you're compiling (and executing) a 32 bit application that opens a 64 bit dll. This shouldn't be done.
I've tried to download the latest version (2.2), but it's still a mess: the VisualStudio example project is setup for a 32 bit build even if the installed dll is 64 bit...
In my case, since I'm used to MinGW, I've succeeded in generating a 64 bit exe by not using the provided .lib and manually loading the dll.
You'll find attached the "stLink" subfolder of my project: maybe you can use it as a guideline.
Please also note that it is mandatory to duplicate the folder structure exactly, that is (folders are marked with square brackets):
<your project>
|-- [bin]
| |-- [ExternalLoader]
| |-- [FlashLoader]
| |-- CubeProgrammer_API.dll
| |-- STLinkUSBDriver.dll
| |-- <other DLLs>
| \-- <your executable>
|
\-- [Data_Base]
Hope this helps...