-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Proper MSVC Building without needing MINGW #1424
Comments
@a-michelis: Looking at your personal branch, I see you are currently working on this topic. I am open to improvements here, as it definitely needs some rework and updates. We should drop compatibility with now unsupported versions of VS as well. I'm not happy with this MinGW stuff inherited from earlier days. So far I just tried to keep it working at best effort and still we had some compilation problems on Windows with it in the past... |
My fork is a kind-of big refactor -it attempts to give a more library-oriented approach to the project. Instead of grabbing the release
The project builds successfully for :
All mentioned distros did not have libusb installed -stlink downloaded and built it from scratch I've used it in small, demo-like projects:
All of these work properly with stlink-v3 (stm32h753zi nucleo) and stlink-v2 (stm32f401re nucleo). My testing was by no means exhaustive, as you can observe. Do you believe such refactor -or part of it, ofcourse- can be included in an iterative manner (aka next version(s))? |
Yes - of course, as long as there is some further testing. I am somehow familiar with the |
@a-michelis: Can you provide a PR (as a draft) to allow for an initial review? |
I apologize for the delayed response - my current IRL situation is a bit busy. Of course, I can totally do that - it is not ready for a merge of any kind, but, as you said, it's a great way to gauge the work needed to normalize the changes and incorporate them appropriately. |
Hello, everyone,
I attempted to build the project for native MSVC without success -as expected.
That said, I discovered that the only reason for this is the lack of proper
MSVC
handling oncmake/modules/Findlibusb.cmake
.In more detail, the original snippet for MSVC handling is the following:
If handled correctly, STLink library, as well as all tools are built properly (with some warnings, ofcourse) -at least with VS2022 which i tried.
The structure of 3rd party
.7z
contains different releases for different versions of VS. For that reason, the patch discovers the proper release to use (see the big if-elseif-else cascade).Since it seems perfectly doable but I believe I lack basic cmake knowledge to consider the patch above decent, I share it with you to further discuss it and potentially merge it to the code!
Cheers,
A.M.
The text was updated successfully, but these errors were encountered: