Skip to content
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] ITM functionality for ST-Link V2 and STM32Fxx chipsets #1072

Merged
merged 46 commits into from
Dec 9, 2020
Merged

[feature] ITM functionality for ST-Link V2 and STM32Fxx chipsets #1072

merged 46 commits into from
Dec 9, 2020

Conversation

simplerobot
Copy link
Collaborator

This change implements feature #136.

The main changes:

  • Adds enable/disable/read trace methods to stlink library.
  • Adds flags to stlink and chipid for trace support.
  • Adds an additional command line tool st-trace.

I did bench testing while developing this, including testing with incorrect clock speeds and with overruns. However, this testing has been done with an extremely limited number of only STM32F4 processors. I could use some help running this on a wider variety of hardware. I am currently using st-trace in a production environment that automatically runs test suites on multiple hardware devices.

This code review is larger than I would hope for my first to this project. I've tried to make the code fit in with the project, but please don't hold back if I've missed the mark anywhere.

Thanks,
John

simplerobot and others added 30 commits November 25, 2020 10:51
Adding calls to identify st-links.
Adding a log macro.
Adding logs with stlink list.
…e the configuration and to tell the user what to do if it is not configured.
…isplays a diagnositic message if it looks like we are not configured correctly.
Fixing buffer semantics.
inc/stlink.h Outdated Show resolved Hide resolved
src/stlink-lib/chipid.h Outdated Show resolved Hide resolved
src/st-trace/trace.c Outdated Show resolved Hide resolved
@simplerobot
Copy link
Collaborator Author

@Nightwalker-87 I will squash all commits into a single commit after all CR feedback has been implemented.

@simplerobot
Copy link
Collaborator Author

I had added the max_trace_freq field to the stlink structure in the middle. I've corrected that by moving it to the end.

@slyshykO
Copy link
Collaborator

slyshykO commented Dec 9, 2020

@Nightwalker-87, this PR looks good to me.

@Nightwalker-87 Nightwalker-87 requested review from Nightwalker-87 and removed request for timothytylee December 9, 2020 18:48
@Nightwalker-87 Nightwalker-87 merged commit b414ddc into stlink-org:develop Dec 9, 2020
@Nightwalker-87
Copy link
Member

@slyshykO It still fails: https://travis-ci.org/github/stlink-org/stlink/builds/748613319
Unfortunately I can only test when triggering a manual build after merging.
This Travis CI integration has become such a mess! You can't use it before merging any more. 😠

@slyshykO
Copy link
Collaborator

slyshykO commented Dec 9, 2020

@Nightwalker-87 think it is time for Github Actions

@simplerobot
Copy link
Collaborator Author

@Nightwalker-87 Sorry I was waiting for additional code review feedback and had not squashed all commits into a single commit yet.

It also looks like I broke the build in clang by mixing a 64 bit size_t type and a 32 bit int type. I will work on fixing this now and get clang installed to verify the results.

@slyshykO
Copy link
Collaborator

slyshykO commented Dec 9, 2020

There is #1076, so maybe we beg @Ant-ON to fix one more clang's warning?

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Dec 9, 2020

... he seems to collect everything up, involuntarily 🤣
@simplerobot You should be fine, it's ok to keep it in mind for future PRs.

@Nightwalker-87
Copy link
Member

@Nightwalker-87 think it is time for Github Actions

At least the recent custom triggered build of the develop branch now showed up, so there still is some hope... ⏳

@slyshykO
Copy link
Collaborator

@Nightwalker-87 Travis CI has changed its pricing model.
There is a blog post - https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing .
So somebody who has access to Travis account should check credits.

@Nightwalker-87
Copy link
Member

I know, but it is still free for OSS-Projects, so we don't pay anything for it.

@slyshykO
Copy link
Collaborator

I know, but it is still free for OSS-Projects, so we don't pay anything for it.

Free, but more limited than before. Looks like we encounter those limits.

@Nightwalker-87
Copy link
Member

I'll have an eye on it. Should we run into further problems, one may think about appropriate alternatives.
Thanks for the input. 👍

@stlink-org stlink-org locked as resolved and limited conversation to collaborators Mar 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
4 participants