Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new
dbg_console
kernel module that introduces new logging layer that allowsprinting debug output via ITM SWO, SEGGER SystemView, or USB VCP.
The new
dbg_printf()
can now be called anywhere in the codebase (including interrupt routines, when not using the VCP target).The output target can be selected with the new
DBG_CONSOLE
argument from the command line when building the firmware. The same approach is used across all layers: coreapp, kernel, secmon, bootloader, boardloader, and prodtest.where
<xxx>
can beSWO
- logging via ITM SWO (requires ST-Link or J-Link)SYSTEM_VIEW
- logging via SEGGER SystemView (requires J-Link)VCP
- logging via USB VCPFor the
firmware
build:PYOPT=0
,DBG_CONSOLE
defaults toVCP
PYOPT=1
,DBG_CONSOLE
defaults to an empty string (logging disabled)DBG_CONSOLE
be also used when buildingboardloader
,bootloader
andprodtest
. For these targets, it defaults to an empty string (logging disabled).The following table show valid combinations:
Resolves #4253 - to enable Optiga logging,
USE_OPTIGA_LOGGING
must be defined.NOTE: Optiga logging works only with
SWO
orSYSTEM_VIEW
on T3W1 (since the Optiga driver is implemented in secmon on T3W1)