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

Logging improvements (tests / examples / impls) #294

Open
Crzyrndm opened this issue Feb 27, 2022 · 2 comments
Open

Logging improvements (tests / examples / impls) #294

Crzyrndm opened this issue Feb 27, 2022 · 2 comments

Comments

@Crzyrndm
Copy link
Contributor

Crzyrndm commented Feb 27, 2022

Examples currently use a mix of logging methods (semi-hosting / RTT / ...?). it would make sense to standardise on one here.

My past experience with semi-hosting has been "unpleasant" and Rust tooling for RTT (cargo-embed, rtt-target, rtt-logger, and derivatives of like probe-run/defmt) has been relatively easy to use with none of the sharp edges that semi-hosting has (I realise that examples are unlikely to encounter those sharp edges, but the further away people stay from semi-hosting, the better IMO)

  • I generally don't use QEMU any more (dev boards are cheap and were easy to get hold of until "recent" shortages on everything). Not sure what RTT support is like

Along similar lines, I have used probe-run and defmt in a few projects now and having defmt::Format impls for HAL types would be rather handy for ease of use.

  • Are there any other libraries that would benefit from support?
  • In many cases defmt support would involve adding an additional derive #[derive(defmt::Format)] presumably feature gated on defmt (implementing defmt::Format is documented here).
@Crzyrndm Crzyrndm changed the title Logging improvements (tests / examples) Logging improvements (tests / examples / impls) Feb 27, 2022
@korken89
Copy link
Collaborator

korken89 commented Mar 3, 2022

Moving to defmt/rtt-target would be nice IMO.

@korken89 korken89 closed this as completed Mar 3, 2022
@korken89 korken89 reopened this Mar 3, 2022
@Crzyrndm
Copy link
Contributor Author

Crzyrndm commented Mar 5, 2022

In the interest of keeping things relatively simple in the examples: probe-run / defmt::println have less setup / configuration than cargo-embed / RTT (e.g. having a logging session open by default after flashing).

There is also defmt-test which I have been considering adding to make it easier to verify changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants