summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorDominik Sliwa <dominik.sliwa@toradex.com>2017-05-16 14:31:59 +0200
committerDominik Sliwa <dominik.sliwa@toradex.com>2017-05-16 14:31:59 +0200
commitc9d5d6b248a12f7c6b66d8a64b93fb0c8c6cae4d (patch)
treedc9f3329f9fd2fc67aa8202b2d3cb4e537deb17d /utilities
parentd0e5a94a55334b0a27652959fba5066f56128135 (diff)
ksd:ksdk update to 2.2
This include FreeRTOS update to version 9.0.0 Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'utilities')
-rw-r--r--utilities/fsl_debug_console.c247
-rw-r--r--utilities/fsl_debug_console.h28
2 files changed, 214 insertions, 61 deletions
diff --git a/utilities/fsl_debug_console.c b/utilities/fsl_debug_console.c
index 10c64a4..bd0b241 100644
--- a/utilities/fsl_debug_console.c
+++ b/utilities/fsl_debug_console.c
@@ -30,7 +30,7 @@
* of this software
* Copyright (c) 2015, Freescale Semiconductor, Inc.
- * All rights reserved.
+ * Copyright 2016-2017 NXP
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -42,7 +42,7 @@
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
- * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
+ * o Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
@@ -66,9 +66,10 @@
#include <math.h>
#include "fsl_debug_console.h"
-#if defined(FSL_FEATURE_SOC_UART_COUNT) && (FSL_FEATURE_SOC_UART_COUNT > 0)
+#if (defined(FSL_FEATURE_SOC_UART_COUNT) && (FSL_FEATURE_SOC_UART_COUNT > 0)) || \
+ (defined(FSL_FEATURE_SOC_IUART_COUNT) && (FSL_FEATURE_SOC_IUART_COUNT > 0))
#include "fsl_uart.h"
-#endif /* FSL_FEATURE_SOC_UART_COUNT */
+#endif /* FSL_FEATURE_SOC_UART_COUNT || FSL_FEATURE_SOC_IUART_COUNT */
#if defined(FSL_FEATURE_SOC_LPSCI_COUNT) && (FSL_FEATURE_SOC_LPSCI_COUNT > 0)
#include "fsl_lpsci.h"
@@ -86,6 +87,10 @@
#include "virtual_com.h"
#endif
+#if defined(FSL_FEATURE_SOC_FLEXCOMM_COUNT) && (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 0)
+#include "fsl_usart.h"
+#endif /* FSL_FEATURE_SOC_FLEXCOMM_COUNT */
+
/*! @brief Keil: suppress ellipsis warning in va_arg usage below. */
#if defined(__CC_ARM)
#pragma diag_suppress 1256
@@ -113,9 +118,10 @@ typedef struct DebugConsoleOperationFunctions
union
{
void (*PutChar)(void *base, const uint8_t *buffer, size_t length);
-#if defined(FSL_FEATURE_SOC_UART_COUNT) && (FSL_FEATURE_SOC_UART_COUNT > 0)
+#if (defined(FSL_FEATURE_SOC_UART_COUNT) && (FSL_FEATURE_SOC_UART_COUNT > 0)) || \
+ (defined(FSL_FEATURE_SOC_IUART_COUNT) && (FSL_FEATURE_SOC_IUART_COUNT > 0))
void (*UART_PutChar)(UART_Type *base, const uint8_t *buffer, size_t length);
-#endif /* FSL_FEATURE_SOC_UART_COUNT */
+#endif /* FSL_FEATURE_SOC_UART_COUNT || FSL_FEATURE_SOC_IUART_COUNT */
#if defined(FSL_FEATURE_SOC_LPSCI_COUNT) && (FSL_FEATURE_SOC_LPSCI_COUNT > 0)
void (*LPSCI_PutChar)(UART0_Type *base, const uint8_t *buffer, size_t length);
#endif /* FSL_FEATURE_SOC_LPSCI_COUNT */
@@ -125,13 +131,17 @@ typedef struct DebugConsoleOperationFunctions
#if defined(FSL_FEATURE_SOC_USB_COUNT) && (FSL_FEATURE_SOC_USB_COUNT > 0) && defined(BOARD_USE_VIRTUALCOM)
void (*USB_PutChar)(usb_device_handle base, const uint8_t *buf, size_t count);
#endif /* FSL_FEATURE_SOC_USB_COUNT && BOARD_USE_VIRTUALCOM*/
+#if defined(FSL_FEATURE_SOC_FLEXCOMM_COUNT) && (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 0)
+ void (*USART_PutChar)(USART_Type *base, const uint8_t *data, size_t length);
+#endif /* FSL_FEATURE_SOC_FLEXCOMM_COUNT */
} tx_union;
union
{
- void (*GetChar)(void *base, const uint8_t *buffer, size_t length);
-#if defined(FSL_FEATURE_SOC_UART_COUNT) && (FSL_FEATURE_SOC_UART_COUNT > 0)
+ status_t (*GetChar)(void *base, const uint8_t *buffer, size_t length);
+#if (defined(FSL_FEATURE_SOC_UART_COUNT) && (FSL_FEATURE_SOC_UART_COUNT > 0)) || \
+ (defined(FSL_FEATURE_SOC_IUART_COUNT) && (FSL_FEATURE_SOC_IUART_COUNT > 0))
status_t (*UART_GetChar)(UART_Type *base, uint8_t *buffer, size_t length);
-#endif /* FSL_FEATURE_SOC_UART_COUNT */
+#endif /* FSL_FEATURE_SOC_UART_COUNT || FSL_FEATURE_SOC_IUART_COUNT*/
#if defined(FSL_FEATURE_SOC_LPSCI_COUNT) && (FSL_FEATURE_SOC_LPSCI_COUNT > 0)
status_t (*LPSCI_GetChar)(UART0_Type *base, uint8_t *buffer, size_t length);
#endif /* FSL_FEATURE_SOC_LPSCI_COUNT */
@@ -141,6 +151,9 @@ typedef struct DebugConsoleOperationFunctions
#if defined(FSL_FEATURE_SOC_USB_COUNT) && (FSL_FEATURE_SOC_USB_COUNT > 0) && defined(BOARD_USE_VIRTUALCOM)
status_t (*USB_GetChar)(usb_device_handle base, uint8_t *buf, size_t count);
#endif /* FSL_FEATURE_SOC_USB_COUNT && BOARD_USE_VIRTUALCOM*/
+#if defined(FSL_FEATURE_SOC_FLEXCOMM_COUNT) && (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 0)
+ status_t (*USART_GetChar)(USART_Type *base, uint8_t *data, size_t length);
+#endif
} rx_union;
} debug_console_ops_t;
@@ -229,8 +242,10 @@ status_t DbgConsole_Init(uint32_t baseAddr, uint32_t baudRate, uint8_t device, u
/* Switch between different device. */
switch (device)
{
-#if defined(FSL_FEATURE_SOC_UART_COUNT) && (FSL_FEATURE_SOC_UART_COUNT > 0)
+#if (defined(FSL_FEATURE_SOC_UART_COUNT) && (FSL_FEATURE_SOC_UART_COUNT > 0)) || \
+ (defined(FSL_FEATURE_SOC_IUART_COUNT) && (FSL_FEATURE_SOC_IUART_COUNT > 0))
case DEBUG_CONSOLE_DEVICE_TYPE_UART:
+ case DEBUG_CONSOLE_DEVICE_TYPE_IUART:
{
uart_config_t uart_config;
s_debugConsole.base = (UART_Type *)baseAddr;
@@ -288,7 +303,22 @@ status_t DbgConsole_Init(uint32_t baseAddr, uint32_t baudRate, uint8_t device, u
s_debugConsole.ops.rx_union.USB_GetChar = USB_VcomReadBlocking;
}
break;
-#endif /* FSL_FEATURE_SOC_USB_COUNT && BOARD_USE_VIRTUALCOM*/
+#endif /* FSL_FEATURE_SOC_USB_COUNT && BOARD_USE_VIRTUALCOM*/
+#if defined(FSL_FEATURE_SOC_FLEXCOMM_COUNT) && (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 0)
+ case DEBUG_CONSOLE_DEVICE_TYPE_FLEXCOMM:
+ {
+ usart_config_t usart_config;
+ s_debugConsole.base = (USART_Type *)baseAddr;
+ USART_GetDefaultConfig(&usart_config);
+ usart_config.baudRate_Bps = baudRate;
+ /* Enable clock and initial UART module follow user configure structure. */
+ USART_Init(s_debugConsole.base, &usart_config, clkSrcFreq);
+ /* Set the function pointer for send and receive for this kind of device. */
+ s_debugConsole.ops.tx_union.USART_PutChar = USART_WriteBlocking;
+ s_debugConsole.ops.rx_union.USART_GetChar = USART_ReadBlocking;
+ }
+ break;
+#endif /* FSL_FEATURE_SOC_FLEXCOMM_COUNT*/
/* If new device is required as the low level device for debug console,
* Add the case branch and add the preprocessor macro to judge whether
* this kind of device exist in this SOC. */
@@ -310,8 +340,10 @@ status_t DbgConsole_Deinit(void)
switch (s_debugConsole.type)
{
-#if defined(FSL_FEATURE_SOC_UART_COUNT) && (FSL_FEATURE_SOC_UART_COUNT > 0)
+#if (defined(FSL_FEATURE_SOC_UART_COUNT) && (FSL_FEATURE_SOC_UART_COUNT > 0)) || \
+ (defined(FSL_FEATURE_SOC_IUART_COUNT) && (FSL_FEATURE_SOC_IUART_COUNT > 0))
case DEBUG_CONSOLE_DEVICE_TYPE_UART:
+ case DEBUG_CONSOLE_DEVICE_TYPE_IUART:
/* Disable UART module. */
UART_Deinit(s_debugConsole.base);
break;
@@ -334,11 +366,24 @@ status_t DbgConsole_Deinit(void)
USB_VcomDeinit(s_debugConsole.base);
break;
#endif /* FSL_FEATURE_SOC_USB_COUNT && BOARD_USE_VIRTUALCOM*/
+#if defined(FSL_FEATURE_SOC_FLEXCOMM_COUNT) && (FSL_FEATURE_SOC_FLEXCOMM_COUNT > 0)
+ case DEBUG_CONSOLE_DEVICE_TYPE_FLEXCOMM:
+ {
+ USART_Deinit((USART_Type *)s_debugConsole.base);
+ }
+ break;
+#endif /* FSL_FEATURE_SOC_FLEXCOMM_COUNT*/
default:
- /* Device identified is invalid, return invalid device error code. */
s_debugConsole.type = DEBUG_CONSOLE_DEVICE_TYPE_NONE;
- return kStatus_InvalidArgument;
+ break;
}
+
+ /* Device identified is invalid, return invalid device error code. */
+ if (s_debugConsole.type == DEBUG_CONSOLE_DEVICE_TYPE_NONE)
+ {
+ return kStatus_InvalidArgument;
+ }
+
s_debugConsole.type = DEBUG_CONSOLE_DEVICE_TYPE_NONE;
return kStatus_Success;
}
@@ -399,7 +444,7 @@ int DbgConsole_Scanf(char *fmt_ptr, ...)
if ((result == '\r') || (result == '\n'))
{
/* End of Line. */
- if(i == 0)
+ if (i == 0)
{
temp_buf[i] = '\0';
i = -1;
@@ -417,7 +462,7 @@ int DbgConsole_Scanf(char *fmt_ptr, ...)
}
else
{
- temp_buf[i+1] = '\0';
+ temp_buf[i + 1] = '\0';
}
result = DbgConsole_ScanfFormattedData(temp_buf, fmt_ptr, ap);
va_end(ap);
@@ -434,7 +479,10 @@ int DbgConsole_Getchar(void)
{
return -1;
}
- s_debugConsole.ops.rx_union.GetChar(s_debugConsole.base, (uint8_t *)(&ch), 1);
+ while (kStatus_Success != s_debugConsole.ops.rx_union.GetChar(s_debugConsole.base, (uint8_t *)(&ch), 1))
+ {
+ return -1;
+ }
return ch;
}
@@ -749,6 +797,7 @@ static int DbgConsole_PrintfFormattedData(PUTCHAR_FUNC func_ptr, const char *fmt
int32_t schar, dschar;
int64_t ival;
uint64_t uval = 0;
+ bool valid_precision_width;
#else
int32_t ival;
uint32_t uval = 0;
@@ -819,6 +868,12 @@ static int DbgConsole_PrintfFormattedData(PUTCHAR_FUNC func_ptr, const char *fmt
{
field_width = (field_width * 10) + (c - '0');
}
+#if PRINTF_ADVANCED_ENABLE
+ else if (c == '*')
+ {
+ field_width = (uint32_t)va_arg(ap, uint32_t);
+ }
+#endif /* PRINTF_ADVANCED_ENABLE */
else
{
/* We've gone one char too far. */
@@ -828,6 +883,9 @@ static int DbgConsole_PrintfFormattedData(PUTCHAR_FUNC func_ptr, const char *fmt
}
/* Next check for the width and precision field separator. */
precision_width = 6;
+#if PRINTF_ADVANCED_ENABLE
+ valid_precision_width = false;
+#endif /* PRINTF_ADVANCED_ENABLE */
if (*++p == '.')
{
/* Must get precision field width, if present. */
@@ -839,7 +897,17 @@ static int DbgConsole_PrintfFormattedData(PUTCHAR_FUNC func_ptr, const char *fmt
if ((c >= '0') && (c <= '9'))
{
precision_width = (precision_width * 10) + (c - '0');
+#if PRINTF_ADVANCED_ENABLE
+ valid_precision_width = true;
+#endif /* PRINTF_ADVANCED_ENABLE */
}
+#if PRINTF_ADVANCED_ENABLE
+ else if (c == '*')
+ {
+ precision_width = (uint32_t)va_arg(ap, uint32_t);
+ valid_precision_width = true;
+ }
+#endif /* PRINTF_ADVANCED_ENABLE */
else
{
/* We've gone one char too far. */
@@ -1098,31 +1166,35 @@ static int DbgConsole_PrintfFormattedData(PUTCHAR_FUNC func_ptr, const char *fmt
}
#endif /* PRINTF_ADVANCED_ENABLE */
}
- if (c == 'o')
- {
- uval = (uint32_t)va_arg(ap, uint32_t);
- radix = 8;
- }
- if (c == 'b')
- {
- uval = (uint32_t)va_arg(ap, uint32_t);
- radix = 2;
- vstrp = &vstr[vlen];
- }
- if (c == 'p')
- {
- uval = (uint32_t)va_arg(ap, void *);
- radix = 16;
- vstrp = &vstr[vlen];
- }
- if (c == 'u')
- {
- uval = (uint32_t)va_arg(ap, uint32_t);
- radix = 10;
- vstrp = &vstr[vlen];
- }
if ((c == 'o') || (c == 'b') || (c == 'p') || (c == 'u'))
{
+#if PRINTF_ADVANCED_ENABLE
+ if (flags_used & kPRINTF_LengthLongLongInt)
+ {
+ uval = (uint64_t)va_arg(ap, uint64_t);
+ }
+ else
+#endif /* PRINTF_ADVANCED_ENABLE */
+ {
+ uval = (uint32_t)va_arg(ap, uint32_t);
+ }
+ switch (c)
+ {
+ case 'o':
+ radix = 8;
+ break;
+ case 'b':
+ radix = 2;
+ break;
+ case 'p':
+ radix = 16;
+ break;
+ case 'u':
+ radix = 10;
+ break;
+ default:
+ break;
+ }
vlen = DbgConsole_ConvertRadixNumToString(vstr, &uval, false, radix, use_caps);
vstrp = &vstr[vlen];
#if PRINTF_ADVANCED_ENABLE
@@ -1169,18 +1241,49 @@ static int DbgConsole_PrintfFormattedData(PUTCHAR_FUNC func_ptr, const char *fmt
sval = (char *)va_arg(ap, char *);
if (sval)
{
+#if PRINTF_ADVANCED_ENABLE
+ if (valid_precision_width)
+ {
+ vlen = precision_width;
+ }
+ else
+ {
+ vlen = strlen(sval);
+ }
+#else
vlen = strlen(sval);
+#endif /* PRINTF_ADVANCED_ENABLE */
#if PRINTF_ADVANCED_ENABLE
if (!(flags_used & kPRINTF_Minus))
#endif /* PRINTF_ADVANCED_ENABLE */
{
DbgConsole_PrintfPaddingCharacter(' ', vlen, field_width, &count, func_ptr);
}
- while (*sval)
+
+#if PRINTF_ADVANCED_ENABLE
+ if (valid_precision_width)
{
- func_ptr(*sval++);
- count++;
+ while ((*sval) && (vlen > 0))
+ {
+ func_ptr(*sval++);
+ count++;
+ vlen--;
+ }
+ /* In case that vlen sval is shorter than vlen */
+ vlen = precision_width - vlen;
}
+ else
+ {
+#endif /* PRINTF_ADVANCED_ENABLE */
+ while (*sval)
+ {
+ func_ptr(*sval++);
+ count++;
+ }
+#if PRINTF_ADVANCED_ENABLE
+ }
+#endif /* PRINTF_ADVANCED_ENABLE */
+
#if PRINTF_ADVANCED_ENABLE
if (flags_used & kPRINTF_Minus)
{
@@ -1712,10 +1815,58 @@ size_t __read(int handle, unsigned char *buffer, size_t size)
return size;
}
+
+/* support LPC Xpresso with RedLib */
+#elif(defined(__REDLIB__))
+
+#if (!SDK_DEBUGCONSOLE) && (defined(SDK_DEBUGCONSOLE_UART))
+int __attribute__((weak)) __sys_write(int handle, char *buffer, int size)
+{
+ if (buffer == 0)
+ {
+ /* return -1 if error. */
+ return -1;
+ }
+
+ /* This function only writes to "standard out" and "standard err" for all other file handles it returns failure. */
+ if ((handle != 1) && (handle != 2))
+ {
+ return -1;
+ }
+
+ /* Do nothing if the debug UART is not initialized. */
+ if (s_debugConsole.type == DEBUG_CONSOLE_DEVICE_TYPE_NONE)
+ {
+ return -1;
+ }
+
+ /* Send data. */
+ s_debugConsole.ops.tx_union.PutChar(s_debugConsole.base, (uint8_t *)buffer, size);
+ return 0;
+}
+
+int __attribute__((weak)) __sys_readc(void)
+{
+ char tmp;
+ /* Do nothing if the debug UART is not initialized. */
+ if (s_debugConsole.type == DEBUG_CONSOLE_DEVICE_TYPE_NONE)
+ {
+ return -1;
+ }
+
+ /* Receive data. */
+ s_debugConsole.ops.rx_union.GetChar(s_debugConsole.base, (uint8_t *)&tmp, sizeof(tmp));
+ return tmp;
+}
+#endif
+
/* These function __write and __read is used to support ARM_GCC, KDS, Atollic toolchains to printf and scanf*/
#elif(defined(__GNUC__))
-#pragma weak __write
-int _write(int handle, char *buffer, int size)
+
+#if ((defined(__GNUC__) && (!defined(__MCUXPRESSO))) || \
+ (defined(__MCUXPRESSO) && (!SDK_DEBUGCONSOLE) && (defined(SDK_DEBUGCONSOLE_UART))))
+
+int __attribute__((weak)) _write(int handle, char *buffer, int size)
{
if (buffer == 0)
{
@@ -1740,8 +1891,7 @@ int _write(int handle, char *buffer, int size)
return size;
}
-#pragma weak __read
-int _read(int handle, char *buffer, int size)
+int __attribute__((weak)) _read(int handle, char *buffer, int size)
{
/* This function only reads from "standard in", for all other file handles it returns failure. */
if (handle != 0)
@@ -1759,6 +1909,8 @@ int _read(int handle, char *buffer, int size)
s_debugConsole.ops.rx_union.GetChar(s_debugConsole.base, (uint8_t *)buffer, size);
return size;
}
+#endif
+
/* These function fputc and fgetc is used to support KEIL toolchain to printf and scanf*/
#elif defined(__CC_ARM)
struct __FILE
@@ -1772,6 +1924,7 @@ struct __FILE
/* FILE is typedef in stdio.h. */
#pragma weak __stdout
+#pragma weak __stdin
FILE __stdout;
FILE __stdin;
diff --git a/utilities/fsl_debug_console.h b/utilities/fsl_debug_console.h
index 3ef50cf..6c50de5 100644
--- a/utilities/fsl_debug_console.h
+++ b/utilities/fsl_debug_console.h
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013 - 2015, Freescale Semiconductor, Inc.
- * All rights reserved.
+ * Copyright 2016-2017 NXP
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -12,7 +12,7 @@
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
- * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
+ * o Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
@@ -64,12 +64,12 @@
#include <stdio.h>
#endif
-/*! @brief Definition to printf float number. */
+/*! @brief Definition to printf the float number. */
#ifndef PRINTF_FLOAT_ENABLE
#define PRINTF_FLOAT_ENABLE 0U
#endif /* PRINTF_FLOAT_ENABLE */
-/*! @brief Definition to scanf float number. */
+/*! @brief Definition to scanf the float number. */
#ifndef SCANF_FLOAT_ENABLE
#define SCANF_FLOAT_ENABLE 0U
#endif /* SCANF_FLOAT_ENABLE */
@@ -108,22 +108,22 @@ extern "C" {
/* @{ */
/*!
- * @brief Initialize the the peripheral used for debug messages.
+ * @brief Initializes the the peripheral used for debug messages.
*
* Call this function to enable debug log messages to be output via the specified peripheral,
- * frequency of peripheral source clock, base address at the specified baud rate.
- * After this function has returned, stdout and stdin will be connected to the selected peripheral.
+ * frequency of peripheral source clock, and base address at the specified baud rate.
+ * After this function has returned, stdout and stdin are connected to the selected peripheral.
*
- * @param baseAddr Which address of peripheral is used to send debug messages.
+ * @param baseAddr Indicates the address of the peripheral used to send debug messages.
* @param baudRate The desired baud rate in bits per second.
- * @param device Low level device type for the debug console, could be one of:
+ * @param device Low level device type for the debug console, can be one of the following.
* @arg DEBUG_CONSOLE_DEVICE_TYPE_UART,
* @arg DEBUG_CONSOLE_DEVICE_TYPE_LPUART,
* @arg DEBUG_CONSOLE_DEVICE_TYPE_LPSCI,
* @arg DEBUG_CONSOLE_DEVICE_TYPE_USBCDC.
* @param clkSrcFreq Frequency of peripheral source clock.
*
- * @return Whether initialization was successful or not.
+ * @return Indicates whether initialization was successful or not.
* @retval kStatus_Success Execution successfully
* @retval kStatus_Fail Execution failure
* @retval kStatus_InvalidArgument Invalid argument existed
@@ -131,12 +131,12 @@ extern "C" {
status_t DbgConsole_Init(uint32_t baseAddr, uint32_t baudRate, uint8_t device, uint32_t clkSrcFreq);
/*!
- * @brief De-initialize the peripheral used for debug messages.
+ * @brief De-initializes the peripheral used for debug messages.
*
* Call this function to disable debug log messages to be output via the specified peripheral
* base address and at the specified baud rate.
*
- * @return Whether de-initialization was successful or not.
+ * @return Indicates whether de-initialization was successful or not.
*/
status_t DbgConsole_Deinit(void);
@@ -144,10 +144,10 @@ status_t DbgConsole_Deinit(void);
/*!
* @brief Writes formatted output to the standard output stream.
*
- * Call this function to Writes formatted output to the standard output stream.
+ * Call this function to write a formatted output to the standard output stream.
*
* @param fmt_s Format control string.
- * @return Returns the number of characters printed, or a negative value if an error occurs.
+ * @return Returns the number of characters printed or a negative value if an error occurs.
*/
int DbgConsole_Printf(const char *fmt_s, ...);