-
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
Headers needed for compiling with libstlink.so.1.6.1 not included in installed headers #982
Comments
I ran into the exact same problem on FreeBSD 12.1/amd64 in stlink 1.5 all headers required to use the shared library were installed into /usr/local/include. In stlink 1.6.1 these are missing. At the time i assumed this to be an operating system specific packaging problem and filed the bug report here: FreeBSD PR #247225. At least these headers from
|
They are included in our top-level
@tabemann @Crest : Your gcc include flags are wrong. This is likely the reason why it fails. Please let me know where these settings come from so we are able to fix it. |
The include options I am using are |
Yes, but there were changes to that, this is why I asked where they come from. |
What do you mean by "there were changes to that" - the include options were directly provided to gcc without any intermediary |
The include directories changed. However compilation was successfully tested on several systems before releasing v1.6.1 as long as instructions in |
I followed the instructions in /doc/compiling.md for compilation from
source on Linux up until `make release`. After that point, as there were no
apparent directions for installation aside from by generating a Debian
package and installing that, I ran `make install` as that is the typical
means of installing programs written in C that are compiled from source,
and it appeared to work, except that it omitted some include files. Note
that this is not solely my problem as not only does Crest have this
problem, but also the official Debian package for stlink 1.6.1 has this
very same problem. The instances of `sudo cp` I mentioned were my attempts
to fix the header files to make compilation work, which should not be
necessary by any means.
…On Sat, Jun 13, 2020 at 2:42 PM nightwalker-87 ***@***.***> wrote:
The include directories changed. However compilation was successfully
tested on several systems before releasing v1.6.1 as long as instructions
in /doc/compiling.md are being followed. As the command sudo cp is not
part of it and the destination directory is not correct for this version,
it is likely the reason why compilation fails on your side. Please follow
our documentation when installing from source. Any custom changes may not
see any support as they are unofficial and not tested.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#982 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDMC2EWU52X2R2U3KGU7J3RWPJAXANCNFSM4N4Z6QVQ>
.
|
Thanks for the more detailed description.
Well this should not be the case of course, but did not appear to be the case during testing or was not noticed at all - I can't tell. I just found that the code excerpt posted earlier was from our |
I ran I expect the libraries to install all headers required use them. The stlink programs (st-flash, st-info, st-util) build just fine. The problem is I want to make use of libstlink in my own code. The headers installed by stlink 1.6.1 are unusable for code that's not part of the stlink repo because they unconditionally |
This is the code I wrote calling into libstlink swd2.c. It uses the STLINK/V2 programmer a a fast console for the Mecrisp Stellaris Forth system. The terminal functions are in terminal.s. This approach has several advantages over the normal USART console:
The code works great with stlink 1.5.0 and I wanted to keep up with stlink development. |
As mentioned before, please test with Before v1.6.1 not all headers were included via the top-level |
I did uninstall the stlink package, cloned the stlink link repo, found myself already in the develop branch, compiled and installed it. Next I tried to build my own code that makes use of libstlink and got this error:
The |
Please note that we don't provide support for any external use of the stlink-library. (There hasn't been any in the past either.) Thus I'd recommend you to stay with the old version for your project, as this may not be addressed anytime soon - unless there are more active contributors to this project that help maintaining the code. |
The fix would be to simply as install the required headers from |
@Crest: You can implement changes on your own fork for testing purposes and I can have a look, if you tell me to do so. Please don't open a PR yet. You can do so as soon as it appears to be compatible with all supported platforms and the recently updated project structure. I'd like to avoid several patches and a (possible) lengthy discussion of consecutive changes along a PR. If you intend to take action related to this topic, please take a look at the current state of the |
@Crest I have checked the debian package as well, and can confirm that there are missing header files, namely:
Also the debian package
which is not the case currently. |
@Nightwalker-87 I compiled and installed the developer branch. All header files installed correctly:
Also checked the compilation of the simplest application which used the library. All is well.
test.c:
|
Fixed in 31b1fa1. |
Thank you for giving feedback to the stlink project.
In order to allow developers and other contributors to isolate and target your respective issue, please take some time to fill out each of the following items appropriate to your specific problem:
Futher we kindly ask you to describe the detected problem as detailed as possible and to add debug output if available, by using the following template:
Commandline-Output:
Expected/description:
Header files should not have to be copied from src to /usr/local/include/stlink in order for code using libstlink to compile.
NOTICE: This bug report may be closed without further notice, if not enough information is provided!
Thank you for your support.
The stlink project maintainers
The text was updated successfully, but these errors were encountered: