Hi Segger Team,
it would be very nice to add APIs for the printf functions with
We currently do this by patching the files to directly exposing
As this solution isn't the right manner and we like to have this in the original release i propose following changes to SystemView:
Display All
Display All
Display All
and so on
I can provide proper patch files if you like?
Best regards
Philipp Häfele
it would be very nice to add APIs for the printf functions with
va_list* pParamList
instead of ...
for target so upper layer software can pass on parameters passed to them via ...
.We currently do this by patching the files to directly exposing
_VPrintTarget
to the header (making this function global).As this solution isn't the right manner and we like to have this in the original release i propose following changes to SystemView:
C Source Code: SEGGER_SYSVIEW.h
- /*********************************************************************
- *
- * printf-Style functions
- */
- #ifndef SEGGER_SYSVIEW_EXCLUDE_PRINTF // Define in project to avoid warnings about variable parameter list
- void SEGGER_SYSVIEW_PrintfHostEx (const char* s, U32 Options, ...);
- void SEGGER_SYSVIEW_PrintfTargetEx (const char* s, U32 Options, ...);
- void SEGGER_SYSVIEW_VPrintfTargetEx (const char* s, U32 Options, va_list* pParamList);
- void SEGGER_SYSVIEW_PrintfHost (const char* s, ...);
- void SEGGER_SYSVIEW_PrintfTarget (const char* s, ...);
- void SEGGER_SYSVIEW_VPrintfTarget (const char* s, va_list* pParamList);
- void SEGGER_SYSVIEW_WarnfHost (const char* s, ...);
- void SEGGER_SYSVIEW_WarnfTarget (const char* s, ...);
- void SEGGER_SYSVIEW_VWarnfTarget (const char* s, va_list* pParamList);
- void SEGGER_SYSVIEW_ErrorfHost (const char* s, ...);
- void SEGGER_SYSVIEW_ErrorfTarget (const char* s, ...);
- void SEGGER_SYSVIEW_VErrorfTarget (const char* s, va_list* pParamList);
- #endif
Source Code: SEGGER_SYSVIEW.c
- /*********************************************************************
- *
- * SEGGER_SYSVIEW_VPrintfTargetEx()
- *
- * Function description
- * Print a string which is formatted on the target before sent to
- * the host with Additional information.
- *
- * Parameters
- * s - String to be formatted.
- * Options - Options for the string. i.e. Log level.
- * pParamList - Pointer to the list of arguments for the format string
- */
- void SEGGER_SYSVIEW_VPrintfTargetEx(const char* s, U32 Options, va_list *pParamList) {
- _VPrintTarget(s, Options, pParamList);
- }
Source Code: SEGGER_SYSVIEW.c
- /*********************************************************************
- *
- * SEGGER_SYSVIEW_VPrintfTarget()
- *
- * Function description
- * Print a string which is formatted on the target before sent to
- * the host.
- *
- * Parameters
- * s - String to be formatted.
- * pParamList - Pointer to the list of arguments for the format string
- */
- void SEGGER_SYSVIEW_VPrintfTarget(const char* s, va_list* pParamList) {
- _VPrintTarget(s, SEGGER_SYSVIEW_LOG, pParamList);
- }
I can provide proper patch files if you like?
Best regards
Philipp Häfele