Skip to content

[feature] New logging system in preparation for an intended stlink library approach #1474

@Nightwalker-87

Description

@Nightwalker-87

This issue attempts to give STLink project a proper logging system in preparation for a library approach, to enable users incorporate stlink-lib into their projects.
Proposal: Main changes (in a nutshell)

  • The project may use libusb-cmake project as its libusb provider, which in turn allows for custom-built libusb, tailored to each system's needs.
  • All included headers may be placed into appropriate stlink sub-folders that are included into the project as system includes, to allow for system-like includes. This change requires the change of all inclusions in the project to change from #include "%HEADER%.h" to #include <stlink/%HEADER%.h>
  • Several headers have exposed functionality which could be used by custom software, using extern "C" blocks.

Much needed prior additions that are missing:

  1. Changing the logging infrastructure to allow programmatically managed logging, instead of STDOUT logs.
  2. Help to accommodate the appropriate cmake modifications for other BSD/*NIX based systems, as well as verify/implement a proper handling of pre-installed libusb followed by exhaustive testing
  3. Documentation of the exported functions (and of course evaluate whether the overall exposure is excessive or too limited).

This issue succeeds PR #1437 in order to continue the open discussion.

A.M.

Metadata

Metadata

Projects

Status

In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions