2020-07-28 2:48 AM
Hi,
I had tried writting my own Makefile to build the project but failed. Then I installed Qt5 unwder Ubuntu and followed your doxygen documentation except I didn't use mingw but the original g++, and it failed too. Although I add all the files you mentioned in the doc, it still has the unkown reference error.
Now I have no idea about the build environment and link configuration under linux, so I really need some help.
Best regards
2020-07-29 2:56 AM
Hello @WXiny.1 ,
Can you try please to use the predefined Qt project already included on the install package under the name "STM32CubePrgAPI.pro" ?
Can share with us the compilation errors ?
Which Linux architecture you are using, x86 or x64 ?
2020-07-29 8:13 PM
Hi weswes,
I have been worked with CubeProgrammer_API for several days, like I mentioned before, I have tried to develop my application with Qt Creator IDE and followed your documentation step by step but the IDE showed " STLinkUSBDriver.so not found" and "hsmp11.so not found". After I added these two files to the link command in the Makefile generated by qmake it worked
Then I tried to write my own Makefile bur it showed "undefined reference to 'QXmlUtils::isPublicID(Qstring const&)@Qt_5_PRIVATE_API'". It seems that the .so files provided by ST are incomplete. After comparing with Makefile generated by qmake, I found it contains a path under Qt path so I add it. Finally I can have my application pass the build process.
During the development , I found the program would block at logMessage after getDeviceGeneralInf(), and it seems that the program can't get the device information, so I have to comment them all. Then I can run to download function , but the download function failed which made me very confused because I once made it worked under windows. After then I remembered you guys update the version to 2.5.0 recently and I installed it to try to solve the build problem before. I noticed there are some changes about windows lib but none about linux lib. Inspite of this, I changed the lib folder to the one belongs to v2.4.0 and it works well. But now I am facing another question that I don't how to let the device know that the dfu process is completed.
After some easy test with Visual Studio, I didn't expect that I would pay so much effort to use this api under linux. It seems that the developers of CubeProgrammer_API didn't pay much attention to the other plateform. I really hop you can fix some problems and complete the doc at the next version.
Best regards
2023-09-29 3:50 AM - edited 2023-09-29 4:24 AM
Hello.
I'm currently have the same objective : I tried to build the api example under Linux.
But it their lib is only available for windows : ./lib/x64/CubeProgrammer_API.lib
That's an issue for me. Also doesn't make sense when downloading the linux package, does it ?
Regarding to STM32CubeProgrammer API package it should be available for windows, linux ans MACOS.
I wanted this to test the CAN flash capability, option not available with the STMCube Programmer. It seems they rely on the STLInk V3 to bridge this interface.
EDIT : I found the shared library in the installation folder, beside the API folder : /opt/st/STM32CubeProgrammer/lib/libCubeProgrammer_API.so
Just by changing the library search PATH in the Qt Pro file, and fix some issue in the code (missing cstddef include) I could have the example to build.
the embbeded documentation (chm) give full instructtions under "Application System Requirements". You should read it to get ready to developp with this library.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.